Skip to content

Work around a diagnostic using CommandLine.arguments on older toolchains #2622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

grynspan
Copy link
Contributor

CommandLine.arguments is declared read/write in older toolchains and this causes an error diagnostic when it's used in Swift 6 mode. This PR uses CommandLine.argc and CommandLine.unsafeArgv directly instead so the diagnostic does not occur.

…hains.

`CommandLine.arguments` is declared read/write in older toolchains and this
causes an error diagnostic when it's used in Swift 6 mode. This PR uses
`CommandLine.argc` and `CommandLine.unsafeArgv` directly instead so the
diagnostic does not occur.
@grynspan grynspan added bug Something isn't working Macros Issues in the SwiftSyntaxMacro… modules labels Apr 24, 2024
@grynspan grynspan self-assigned this Apr 24, 2024
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan enabled auto-merge (squash) April 24, 2024 21:18
@grynspan grynspan merged commit 6c459f2 into main Apr 24, 2024
@grynspan grynspan deleted the jgrynspan/command-line-args-concurrency branch April 24, 2024 22:06
grynspan added a commit that referenced this pull request Apr 25, 2024
…hains. (#2622)

`CommandLine.arguments` is declared read/write in older toolchains and this
causes an error diagnostic when it's used in Swift 6 mode. This PR uses
`CommandLine.argc` and `CommandLine.unsafeArgv` directly instead so the
diagnostic does not occur.
grynspan added a commit that referenced this pull request Apr 25, 2024
…hains. (#2622) (#2625)

`CommandLine.arguments` is declared read/write in older toolchains and this
causes an error diagnostic when it's used in Swift 6 mode. This PR uses
`CommandLine.argc` and `CommandLine.unsafeArgv` directly instead so the
diagnostic does not occur.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Macros Issues in the SwiftSyntaxMacro… modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants