Skip to content

Conversation

filmil
Copy link
Contributor

@filmil filmil commented Sep 28, 2025

@filmil filmil marked this pull request as ready for review September 28, 2025 23:54
@bazel-io
Copy link
Member

Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (zlib_foreign) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

@meteorcloudy meteorcloudy added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Sep 29, 2025
@meteorcloudy meteorcloudy enabled auto-merge (squash) September 29, 2025 09:38
@@ -0,0 +1,28 @@
module(
name = "zlib_foreign",
Copy link
Member

Choose a reason for hiding this comment

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

This is slightly less efficient, but offers a potentially easier build overall.

I don't understand the purpose of this module, ideally we should have only one zlib library in BCR to avoid potential ODR violation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was having difficulties when using the zlib module when compiling libraries that need zlib through rules_foreign_cc. To wit, the shared libraries produced by the zlib module end up being referenced via their "in-sandbox" path, which of course does not work.

It turns out that if zlib is itself compiled using rules_foreign_cc, then these difficulties go away.

If you think this is not enough of a reason to accept the module, that's not a big deal: I have it up and running in my private registry so nothing will be lost if it's not in BCR. And I suppose once we fix rules_foreign_cc, it might stop being needed altogether.

Up to you, though. I understand your concerns.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, thanks for your understanding. I do prefer to make the current zlib module work for your use case instead of creating a new one. It might be a workaround for now, but in the long term, it will probably cause more problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants