Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 3, 2023

  • Explanation: Currently, SwiftSyntax declares all of its libraries as static, which shouldn’t be necessary. If we make them .automatic, we have more flexibility to use dylibs for the SwiftSyntax libraries in the future
  • Scope: Building SwiftSyntax as a package dependency
  • Risk: Low, automatic library dependencies default to static
  • Testing: CI didn’t find any issues
  • Issue: rdar://108816888
  • Reviewer: @bnbarham on Change all library types to automatic #1545

ahoppen added 2 commits May 2, 2023 16:58
`automatic` and `static` currently have the same behavior in SwiftPM and we should allow flexibility here, there’s no reason to specify that the libraries need to be `static`.
We can’t build library products if they have library type `automatic`. Instead build their targets.

While doing that, I defined a fake target that depends on all targets in the SwiftSyntax package. This way, we can build all targets concurrently, before we were only building `SwiftSyntax` and `SwiftSyntaxBuilder` sequentially. All other targets only got build when running tests.
@ahoppen ahoppen requested a review from DougGregor May 3, 2023 00:01
@ahoppen
Copy link
Member Author

ahoppen commented May 3, 2023

@swift-ci Please test

@ahoppen ahoppen merged commit 586e6f2 into swiftlang:release/5.9 May 4, 2023
@ahoppen ahoppen deleted the ahoppen/5.9/automatic-libraries branch May 4, 2023 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants