-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
MODULE.bazel.lock file contains user specific paths #18936
Comments
@Wyverald @SalmaSamy The absolute paths come from If we want to preserve it, we would probably need to make the path relative to its root. But this doesn't look that easy since the root can vary (workspace root, external repo root, ...). |
In some cases the |
We shouldn't just completely drop the location, since the lockfile might not contain an extension that 1) hasn't been evaluated yet and 2) throws on evaluation. In this case we will need the location to report the error. I was thinking that we should maybe just store a label-y thing for locations in MODULE.bazel files of modules with non-registry overrides. So |
@bazel-io fork 6.3.0 |
Sounds good! If we use
|
Having thought about this some more, I like canonical labels more than the display form as they are closer to the actual location on disk. We should probably also handle the root module specially as it is the one where errors are most likely to originate from. I am working on a PR for this aspect here. |
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
The absolute paths of the root module file path in Starlark `Location`s is replaced with a constant when written to the lock file and replaced back when reading from the file. Work towards bazelbuild#18936
I have a change in flight to fix non-registry overrides. |
…overrides Fixes #18936 PiperOrigin-RevId: 549310245 Change-Id: I852570fbc81c1592c2fc0b3848d4b58e1c9ffb7d
* Redact absolute root module file path in `MODULE.bazel.lock` The absolute path of the root module file in Starlark `Location`s is replaced with a constant when writing to the lock file. Work towards #18936 Closes #18949. PiperOrigin-RevId: 549118781 Change-Id: Ie689f7b5edf92296772c605845d694d872074214 * Use a label as the location of the MODULE.bazel file of non-registry overrides Fixes #18936 PiperOrigin-RevId: 549310245 Change-Id: I852570fbc81c1592c2fc0b3848d4b58e1c9ffb7d
Description of the bug:
The lock file includes user specific paths in the location part of the extension usage sections.
This is a side effect of the change made to improve error messages by @fmeum.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?6.3.0rc1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
Yes this is a regression due to #18612
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: