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

repin when using bazel modules #3156

Open
pdeva opened this issue Jan 4, 2025 · 1 comment
Open

repin when using bazel modules #3156

pdeva opened this issue Jan 4, 2025 · 1 comment

Comments

@pdeva
Copy link

pdeva commented Jan 4, 2025

ever since switching from WORKSPACE to bazel modules, i no longer get repin warnings from rules_rust.

i do notice tho from time to time that the build from cargo build differs from bazel build and every time that happens i have to manually delete module.bazel.lock and run bazel build to recreate it.

i assume this is happening due to lack of repinning?

what is the recommended way to repin/keep bazel in sync with cargo.lock when using rules_rust with bazel modules.

@afsluit
Copy link

afsluit commented Jan 5, 2025

Does bazel mod deps --lockfile_mode=update work for you (see also here)? I just had the same issue and the docs of crate_universe do not seem up to date anymore as the advice on how to repin fail with ERROR: WORKSPACE has to be enabled for sync command to work, run with --enable_workspace. if you don't have a WORKSPACE anymore.

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

No branches or pull requests

2 participants