-
Notifications
You must be signed in to change notification settings - Fork 439
Migrate build script to Swift #1618
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
Migrate build script to Swift #1618
Conversation
Open PR to show the progress. I'm already open for feedback but it's still WIP |
78950c9
to
fc012b1
Compare
6bcc786
to
1b6ebb2
Compare
ebfed09
to
3d0cc38
Compare
One high-level comment: I think the build script should live in the I would like to keep |
Cool. I'll try to merge CodeGeneration package and this one into a single Package.
Just to be clear, I would revert the commit or will you still move it out of the swift-syntax package but just in it's own package? (As now. It is it's own executable) |
Yes, I think moving |
Will remove this PR so it focus on migrate the build script only then |
I think a separate PR for moving |
d12a844
to
5789a5c
Compare
The CLI look like OVERVIEW: Build and test script for SwiftSyntax.
The build script can also drive the test suite included in the SwiftSyntax
repo. This requires a custom build of the compiler project since it accesses
test utilities that are not shipped as part of the toolchains. See the Testing
section for arguments that need to be specified for this.
USAGE: swift-syntax-cli <subcommand>
OPTIONS:
-h, --help Show help information.
SUBCOMMANDS:
build
generate-source-code
test
verify-source-code
See 'swift-syntax-cli help <subcommand>' for detailed help. Build help
Generate source code help
Test help
Generate source code help
|
1e8939b
to
529be49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, @kimdv. I think the Swift implementation is really so much easier to read and work with. I’ve got a few comments though. Just to warn you, once you’ve addressed those, I might come up with another big-ish set of comments, but we’re definitely heading in the right direction.
SwiftSyntaxCLI/Sources/swift-syntax-cli/commands/GenerateSourceCode.swift
Outdated
Show resolved
Hide resolved
SwiftSyntaxCLI/Sources/swift-syntax-cli/common/BuilderArguments.swift
Outdated
Show resolved
Hide resolved
One thought just came to me: With the current design, you won't be able to build the build script (or With that in mind, I think CodeGeneration will need to continue being its own package so that the build script itself can continue to be free of a SwiftSyntax dependency. |
0da0cc5
to
d7b3c42
Compare
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/Paths.swift
Outdated
Show resolved
Hide resolved
e68d010
to
0052d81
Compare
@swift-ci please test |
0052d81
to
539d80b
Compare
@swift-ci please test |
To debug the latest failure (and in general), I think it would be good if |
539d80b
to
8bfc4b4
Compare
@swift-ci please test |
8bfc4b4
to
d3ed7e4
Compare
@swift-ci please test |
d3ed7e4
to
894d0c5
Compare
@swift-ci please test |
95a3b22
to
cd1370a
Compare
@swift-ci please test |
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/Test.swift
Outdated
Show resolved
Hide resolved
cd1370a
to
c87486b
Compare
@swift-ci please test |
c87486b
to
f1471e8
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳 macOS is passing. Linux can’t be far
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/Paths.swift
Outdated
Show resolved
Hide resolved
f1471e8
to
c148db3
Compare
@swift-ci please test |
@swift-ci please test windows |
1 similar comment
@swift-ci please test windows |
Fixes #1465