-
Notifications
You must be signed in to change notification settings - Fork 245
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 #263
Comments
Reading https://bazel.build/external/migration, looks like we can add a Reading https://bazel.build/external/module#compatibility_level, it should be 2 since we follow SemVer. Mind send a PR? |
Ah, looks like someone on the Bazel team created this module to aid the android migration to Bazel. Are you sure you want to use bzlmod to pull in absl-py? The alternative is to use e.g. rules_python pip.parse() to pull it in.
For Yilei's context: the gist of what the MODULE compatibility level does is force an upgrade. It's basically saying that a version changed enough that you have to change your dependency specifications. The major version part of a module ("1" from "1.4.0", in this case) doesn't automatically become the compatibility level. In requirements.txt language, it's like if pypi package resolution refused to cross a major version boundary. e.g. if one put So, question to @yilei is then: Are the changes between 1.4 and 2.0 significant enough they should be treated as requiring an upgrade (i.e. any user module setting |
Hmm, the compatibility level seems tricky. The main compatibility issue is abseil-py |
The reason we don't want to use If we have I'll leave the compatibility level question to you and the Bazel folks, since I also don't know how to solve the Python 3.6 problem you mention above :) |
Do you see harm in sending a pull request with the more conservative compatibility level 2 and possibly changing this to 1 later? (For me personally, the python minimum requirement would warrant level 2 as it could actively break existing users due to a change within absl-py introduced in a major version). |
I'm inclined to agree in making it 2 as that can prevent downstream "gotchas" and encourages folks to think about whether the upgrade will break things. |
Python 3.6 (and also 3.7) are out of support. Bumping the compatibility level for every Python version change doesn't seem appropriate (imagine a lot of projects just drop unsupported versions, so they would at least once per year have to bump their compatibility level). |
Are there any other issues with backwards compat from 1.x.x to 2.x.x? I'm OK with setting a new compatibility level to match the major version number. That's not as world-breaking as changing it every time we drop a Python version and seems to make logical sense. |
Based on above reasoning, I think we should set |
It appears that on Bazel Central Registry (BCR), a patch is needed to add MODULE.bazel so this can work as a Bazel module.
See https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/abseil-py/1.4.0/MODULE.bazel.
Can someone consider adding MODULE.bazel to this Git repository directly?
I did not issue a pull request yet because the latest version is
2.0.0
, unlike1.4.0
on the BCR. I am not sure whether the compatibility level should be 1 or 2.Filing this issue for discussion.
The text was updated successfully, but these errors were encountered: