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

Untracked MODULE.bazel.lock files #223

Closed
rygx opened this issue Feb 3, 2024 · 2 comments · Fixed by #224
Closed

Untracked MODULE.bazel.lock files #223

rygx opened this issue Feb 3, 2024 · 2 comments · Fixed by #224

Comments

@rygx
Copy link
Contributor

rygx commented Feb 3, 2024

bzlmod will automatically generate MODULE.bazel.lock files, but this file is neither tracked by git nor placed in .gitignore file, causing every time git to alert MODULE.bazel.lock not being tracked, and adds to chance that this file is committed inadvertently. IMO it could be a quite simple fix by choosing either of the options:

  • Option 1: check in MODULE.bazel.lock files, if we are sure that this file is consistent across different machines (theoretically the lock file should maintain consistent on different machines, but I am not sure if there are any non-hermetic factors would cause environment-dependent contents).
  • Option 2: add MODULE.bazel.lock file into .gitignore, if we are unsure if the lock file would be consistent.

I would be happy to provide PR if either of the above options is a way to move forward.

@cloudhan
Copy link
Collaborator

cloudhan commented Feb 4, 2024

Let's opt for ignore the files.

IIRC, I read through an github issue or discussion that mention it but cannot find it again. It mentions that the lock file is not quite stable at the moment, and needs some refine on it. So lets ignore it for now and keep an eye on it.

@rygx
Copy link
Contributor Author

rygx commented Feb 4, 2024

Sounds good to me. Created #224

BTW, I saw github issue in bazel repo bazelbuild/bazel#20369, not sure if that was what you saw.

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 a pull request may close this issue.

2 participants