Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgrindel/bzlmod_lockfile_bug
Demonstrate bzlmod lockfile remembering previous state.
https://github.com/cgrindel/bzlmod_lockfile_bug
Last synced: 7 days ago
JSON representation
Demonstrate bzlmod lockfile remembering previous state.
- Host: GitHub
- URL: https://github.com/cgrindel/bzlmod_lockfile_bug
- Owner: cgrindel
- License: apache-2.0
- Created: 2023-05-22T20:04:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-08T02:32:39.000Z (over 1 year ago)
- Last Synced: 2024-12-31T19:30:13.271Z (18 days ago)
- Language: Starlark
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demonstrate Incorrect Bzlmod Lock File State
Bazel Version: 6.2.0
## Steps
1. Clone this repo.
2. Modify the `MODULE.bazel` upgrading `cgrindel_bazel_starlib` to `0.16.0`.
3. Run `bazel build --nobuild --lockfile_mode=update //...`. Doing a git status shows the `MODULE.bazel` and the `MODULE.bazel.lock` were updated. Perfect.
4. Run `git checkout -- .` to revert the changes. You now have the original `MODULE.bazel` and `MODULE.bazel.lock`.
5. Modify the MODULE.bazel upgrading `rules_bazel_integration_test` to `0.14.0`.
6. Run `bazel build --nobuild --lockfile_mode=update //...`.## Expected
Running `git diff MODULE.bazel.lock` would only show changes related to the upgrade of `rules_bazel_integration_test`.
## Actual
Running `git diff MODULE.bazel.lock` shows changes related to the `rules_bazel_integration_test`
upgrade and the reverted upgrade for `cgrindel_bazel_starlib`.## Other Observations
- Running `bazel clean` or `bazel clean --expunge` before Step 5 does not work around the issue. The
incorrect lock file state persists.
- After running through the reproduction steps and reverting the changes to `MODULE.bazel` and
`MODULE.bazel.lock`, running `bazel build --nobuild --lockfile_mode=update //...` does not change
the `MODULE.bazel.lock`.