Skip to content

Enable library evolution in Bazel builds #3024

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

Closed
wants to merge 1 commit into from

Conversation

pennig
Copy link

@pennig pennig commented Mar 19, 2025

Updating Bazel builds to use library evolution

@pennig pennig requested a review from keith as a code owner March 19, 2025 23:42
@pennig
Copy link
Author

pennig commented Mar 19, 2025

I'm hoping to get this into the 6.1 release branch as well

@keith
Copy link
Member

keith commented Mar 20, 2025

is there more context about this somewhere I can read up on?

On the surface this breaks my understanding of what should have this set.

My mental model for this feature is that you should only ever enable it if you're planning on redistributing a prebuilt version of the library for potential consumption by multiple swift versions. I also believe there is some downside to setting this, I don't have a citation off hand but if that's true, I don't think this would be the right default.

Specifically I'm thinking about projects that pull this in directly and build it all the time, and just rely on the remote cache to solve the prebuilt concern. Projects like SwiftLint or Lyft's iOS project ofc never redistribute this for use by other swift compilers so they don't need this feature.

Would it be better to force a transition on this from the consumers BUILD file if this is desired? (I believe one of the *_framework rules actually tries to do this by default for you?)

Similarly I guess what makes SwiftSyntax special versus other third parties that we'd want to set it here but not more widely? (maybe you are just setting it for all third parties?)

@pennig
Copy link
Author

pennig commented Mar 20, 2025

Thanks for sharing your thoughts. This was an attempt to address the warnings about @_implementationOnly imports when consuming the project with the Swift 6 language mode. I admit I don't have a complete understanding of library evolution, particularly why you would not want it enabled.

With that in mind, closing this seems fine.

@pennig pennig closed this Mar 20, 2025
@ahoppen
Copy link
Member

ahoppen commented Mar 20, 2025

Note that I addressed the @_implementationOnly warnings in #3002, though that change won’t be in 6.1

@keith
Copy link
Member

keith commented Mar 20, 2025

I'd probably patch that in to my project in the meantime to workaround

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