Fix Swift macro declarations with short names #33
main fromrefs/pull/33/head·merged by tannerlinsley Recognize macro as a keyword in declarations such as public macro m() and public macro m<T>(). The existing contextual-keyword rule misses these short lowercase names.
Keep identifiers (let macro = value) and member calls (value.macro()) unchanged. Add a focused regression test and patch changeset.
This isolates the Swift fix previously included in #26. It was branched from main at 0541f2f and has no PowerShell dependency.
Validation on Node 24.19.0:
- The regression test fails on unchanged main and passes with the fix.
pnpm run verifypasses: typecheck, build, docs, skills, package lint, package/packed tests, 217 tests, size budgets, and benchmarks.pnpm run changeset:statusreports a patch;git diff --checkpasses.
CI for daab0dc passed verification and the Node 18, 20, 22, 24, and 26 runtime checks.
- 1
Codex Review Summary#
This comment shows the latest Codex review activity on this pull request.
Review Status Commit Review trigger 📝 Code Review ✅ Completed 2026-10-21T02:06:28.816792Z daab0dcPR opened ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Warning
Review limit reached#
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 59 minutes.
View limit details
-
Limit details: You’ve used the included review currently available.
Review configuration:
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a12cbd02-3d09-437f-85c8-455c506c2c4b
Commits-
Reviewing files that changed from the base of the PR and between 59cc1d177a6b9b7797a66ca741491fef4af88a96 and 889f797a2757d14e01078cbc31d7bcec644c898f.
Files selected for processing: 7-
.changeset/swift-reentrant-strings.md.changeset/swift-short-macro.mdsrc/languages/swift.tstest/swift-pre-exec.test.tstest/swift-reentry.test.tstest/swift-spacing.test.tstest/swift.test.ts
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
CodeRabbit Verify#
- Run CodeRabbit Verify to test the changes in this pull request.
-
Thanks for the Swift fix! I brought the branch up to date and kept short macro names working with spaces before the signature too.
AI review notes: Commit
f1679a90a13105b6ec83d0f6ddcb3fc26f94e7b0resolves the current-main conflict, preserves identifier/member-call behavior, and adds macro-spacing coverage. It also fixes a separately reproduced cached string-cursor reentry bug, with a regression. These source changes passed local current-main composition checks; the updated PR branch still needs its own current CI before merging.tannerlinsley merged this9c88155
tannerlinsley closed this
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 889f797a2757d14e01078cbc31d7bcec644c898f
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR