Skip to content

Assert the Linkage of SwiftSyntax and SwiftParser #796

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 2 commits into from
Sep 27, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Sep 15, 2022

We want to keep this set as minimal as possible. To that end, provide a test on Darwin that the set of link-time dependencies remains known to us. If this set expands, this test will fail and we'll be able to investigate the dependency growth.

@CodaFi CodaFi requested a review from ahoppen as a code owner September 15, 2022 07:30
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 15, 2022

@swift-ci test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite clever and very good hygiene for the project, thank you!

try assertLinkage(of: swiftSyntaxURL) { linkages in
XCTAssertEqual(linkages, [
.library("-lobjc"),
.library("-lswiftCompatibilityConcurrency"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow-list all -lswiftCompatibility prefixes? For example, there's a -lswiftCompatibility56 that just got introduced and will kick in sometimes.

try assertLinkage(of: swiftParserURL) { linkages in
XCTAssertEqual(linkages, [
.library("-lobjc"),
.library("-lswiftCompatibilityConcurrency"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@CodaFi CodaFi force-pushed the unchained-melody branch 2 times, most recently from c63375d to 5df908e Compare September 19, 2022 20:59
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 19, 2022

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 20, 2022

@swift-ci test

We want to keep this set as minimal as possible. To that end, provide
a test on Darwin that the set of link-time dependencies remains known
to us. If this set expands, this test will fail and we'll be able to
investigate the dependency growth.
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 27, 2022

@swift-ci test

Allow for linkage conditions based on the language version and build configuration.
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 27, 2022

@swift-ci test

@CodaFi CodaFi merged commit 652943f into swiftlang:main Sep 27, 2022
@CodaFi CodaFi deleted the unchained-melody branch September 27, 2022 06:28
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.

3 participants