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

Update crate_universe to allow re-pinning precise packages with pins #2493

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

UebelAndre
Copy link
Collaborator

This change corrects the parsing logic of CARGO_BAZEL_REPIN to solve for the following issue

[email protected] bazel build //...
ERROR: /home/user/Code/factory/WORKSPACE.bazel:162:12: fetching crates_repository rule //external:crates_io: Traceback (most recent call last):
	File "/home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/rules_rust/crate_universe/private/crates_repository.bzl", line 59, column 50, in _crates_repository_impl
		metadata_path = splice_workspace_manifest(
	File "/home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/rules_rust/crate_universe/private/splicing_utils.bzl", line 178, column 12, in splice_workspace_manifest
		execute(
	File "/home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/rules_rust/crate_universe/private/common_utils.bzl", line 54, column 13, in execute
		fail(_EXECUTE_ERROR_MESSAGE.format(
Error in fail: Command [/home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/crates_io/cargo-bazel, "splice", "--output-dir", /home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/crates_io/splicing-output, "--splicing-manifest", /home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/crates_io/splicing_manifest.json, "--config", /home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/crates_io/cargo-bazel.json, "--cargo", /home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/bin/cargo, "--rustc", /home/user/.cache/bazel/_bazel_user/2a4a06230c9b85a2073801b413943939/external/rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/bin/rustc, "--cargo-lockfile", /home/user/Code/factory/Cargo.lock] failed with exit code 1.
STDOUT ------------------------------------------------------------------------

STDERR ------------------------------------------------------------------------

warning: unused config key `source.crates-io.index` in `/tmp/.tmpAWm8NK/.cargo/config.toml`
error: There are multiple `ahash` packages in your project, and the specification `ahash` is ambiguous.
Please re-run this command with one of the following specifications:
  [email protected]
  [email protected]

Error: Failed to update lockfile: exit status: 101

After this <package_name>=<pin> can be used to distinguish which of the multiple versions of crates available in the lockfile should be updated to the assigned pin.

@UebelAndre UebelAndre enabled auto-merge (squash) February 18, 2024 20:52
auto-merge was automatically disabled February 19, 2024 11:12

Merge queue setting changed

@scentini scentini self-requested a review February 19, 2024 11:15
Copy link
Collaborator

@scentini scentini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@scentini scentini added this pull request to the merge queue Feb 19, 2024
Merged via the queue into bazelbuild:main with commit acd9e61 Feb 19, 2024
3 checks passed
@UebelAndre UebelAndre deleted the crate_universe_update branch February 19, 2024 11:29
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 this pull request may close these issues.

2 participants