-
-
Notifications
You must be signed in to change notification settings - Fork 584
Avoid merge conflicts in MODULE.bazel.lock #2434
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
Comments
Previous analysis/comment on why we need to have the extension as non reproducible and include all of the contents in the main lock file. Please see the comment below for just looking at the
In terms of what
In general I don't see good alternatives here except for changes in bazel or dropping support for @fmeum are there any plans to make the bzlmod extensions being able to control what goes into the lock file? EDIT: Looking that this proposal has been already implemented, it does not seem that there is any other option. EDIT2: updated based on Richard's comment. |
Just looking at the I am not sure if there is anything better we can do - @fmeum, what would be the proposed behaviour here? If we pass things as labels in the rule, are we OK to pass |
but earlier in your post you say that having a second extension just reduces the problem, not avoids it? |
FYI, just did a quick experiment to see if
So it suggests me that bazel itself is adding hashes based on the input to the tag classes. |
That Generally speaking, if New attributes that can point to real lockfiles (your fourth option) sounds best to me as it avoids introducing Bazelisms. |
@fmeum, retested with the latest RC and it is seems it is working:
Will the fix be backported to If we cannot get it to work with However that requires:
I think just supporting different lock files which have the URLs in them might be easier. |
Just checked the So just to reiterate all available options here in order to not have merge conflicts:
My current thinking:
I got to go now. |
FYI, I did some experimentation and it seems that the best way to solve this would be to leverage what was previously presented in MODULE.bazel.lock design doc. I have created an issue bazelbuild/bazel#24777. This might also help to store extra facts about which distributions are on which index servers to help with #2100. |
One idea that has been floated was to just mark the extension as reproducible and not worry too much. Yes it will cause more calls to the PyPI index, but at the same time it should still be reproducible most of the time. Once the bazelbuild/bazel#24777 is done, we can revisit this and use the storage to optimize things. |
This will remove the merge conflicts and improve the usability when the `MODULE.bazel.lock` is used together with `rules_python`. This means that the lock file will not be used to read the `URL` and `sha256` values for the Python sources when the `experimental_index_url` is used, but the idea is that that information will be kept in repo cache. Fixes bazel-contrib#2434
This will remove the merge conflicts and improve the usability when the `MODULE.bazel.lock` is used together with `rules_python`. This means that the lock file will not be used to read the `URL` and `sha256` values for the Python sources when the `experimental_index_url` is used, but the idea is that that information will be kept in repo cache. Fixes #2434 Created #2731 to leverage the bazel feature to write immutable facts to the lock file once it becomes available.
The digest of the requirements.txt file seems to be added to the lock file, which triggers merge conflicts.
Related thread on Slack https://bazelbuild.slack.com/archives/C014RARENH0/p1731817466761249
Is this necessary?
The text was updated successfully, but these errors were encountered: