Skip to content
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

Add MODULE.bazel file #485

Closed
wants to merge 2 commits into from
Closed

Conversation

nacl
Copy link
Collaborator

@nacl nacl commented Dec 13, 2021

bzlmod is the upcoming package manager for Bazel's external dependencies.

While it's already in the central registry, it's apparently also helpful to
have such a file in the repository, in case, you need to use overrides.

This change adds such a file, specifically the one from the central repository
with the version bumped.

I can't quite get the tests to work yet; I think there's a bug in how runfiles
trees are created (the rules_python directory for the runfiles lib contains the
version in addition to the name). This was tested using the latest 5.0 RC; I
currently cannot test at bazel HEAD due to bazelbuild/bazel#14403.

@nacl nacl requested a review from aiuto December 13, 2021 22:49
)

bazel_dep(name = "rules_python", version = "0.4.0")
bazel_dep(name = "bazel_skylib", version = "1.0.3")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this float to head, or whatever whomever depends on rules_pkg wants to use?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we able to say we depend on bazel 5.x?

@nacl nacl marked this pull request as draft January 28, 2022 14:37
@aiuto
Copy link
Collaborator

aiuto commented Feb 14, 2022

Any update?

[bzlmod] is the upcoming package manager for Bazel's external dependencies.

While it's already in the [central registry], it's apparently also helpful to
have such a file in the repository, in case, you need to use overrides.

This change adds such a file, specifically the one from the central repository
with the version bumped.

I can't quite get the tests to work yet; I think there's a bug in how runfiles
trees are created (the rule_python directory contains the version in addition to
the name).

[bzlmod]: https://docs.bazel.build/versions/main/bzlmod.html
[central registry]: https://github.com/bazelbuild/bazel-central-registry
@nacl
Copy link
Collaborator Author

nacl commented Feb 14, 2022

The tests are still failing with bzlmod enabled on the latest rolling release. Root cause looks to be something like what's in bazelbuild/bazel#14140, but I haven't had time to completely nail down the details.

@nacl
Copy link
Collaborator Author

nacl commented Feb 14, 2022

BTW these problems might not affect users of rules_pkg, but they definitely prevent us from using it ourselves.

@aiuto
Copy link
Collaborator

aiuto commented Feb 15, 2022

Can we check in the module definition but not use it in our CI? I don't see any need to use it ourselves, but we can give others a leg up on trying it. Perhaps they will shake out any issues in the declaration.

@nacl
Copy link
Collaborator Author

nacl commented Feb 15, 2022

Can we check in the module definition but not use it in our CI? I don't see any need to use it ourselves, but we can give others a leg up on trying it. Perhaps they will shake out any issues in the declaration.

Absolutely. I'll see about doing this when I have an opportunity.

@tetsuok tetsuok mentioned this pull request Aug 18, 2022
@aiuto
Copy link
Collaborator

aiuto commented Oct 19, 2022

I've taken this up in #625.
bzlmod is not quite there yet for running our own tests, but that PR does show a use case where a user of rules_pkg can depend on it through the module.

@aiuto
Copy link
Collaborator

aiuto commented Oct 20, 2022

Closing this since I got an initial MODULE set up. There is more to learn, but we can work from that.

@aiuto aiuto closed this Oct 20, 2022
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