-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improve _format command #3684
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
Improve _format command #3684
Conversation
This makes 2 changes to `_format`: 1. Only invoke `swift-format` once, this is helpful for larger projects 2. Include the `Package.swift` file for formatting
@swift-ci please smoke test |
I don't believe the failure here is related |
@abertelrud this is something we should refactor out a plugin when the framework is ready. could you please review in that light. |
@swift-ci please smoke test |
Seems like this failure is new and reproduces, but unrelated to this PR:
|
I can repro the failure locally. |
Looks like some of the builds are simply failing, but we aren't propagating the errors from XCBuild correctly. |
The underlying error is: |
Seems like this indeed works when using 12.5 as the installed Xcode, so this isn't due to any changes to SwiftPM. |
I think the most reasonable thing for now is to change the test so that it doesn't hit this and then figure out whether SwiftPM and/or XCBuild should change separately. We should also fix SwiftPM's parsing of XCBuild's output so that we don't drop the error on the floor. |
Absolutely — I didn't actually realize there was a command for this already; the mentioning of |
Oh wait, PackageBuilder just construct the memory model of a package, it doesn't actually create a build system for building the package — name is confusing. |
@swift-ci please smoke test |
Thanks! |
thank you @keith |
This makes 2 changes to
_format
:swift-format
once, this is helpful for larger projectsPackage.swift
file for formatting