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

@rules_rust//tools/rust_analyzer:gen_rust_project is broken with bzlmod #2388

Closed
mortenmj opened this issue Jan 2, 2024 · 0 comments · Fixed by #2395
Closed

@rules_rust//tools/rust_analyzer:gen_rust_project is broken with bzlmod #2388

mortenmj opened this issue Jan 2, 2024 · 0 comments · Fixed by #2395
Assignees

Comments

@mortenmj
Copy link

mortenmj commented Jan 2, 2024

Using the bzlmod support in 0.35.0, bazel build @rules_rust//tools/rust_analyzer:gen_rust_project throws an error:

INFO: Repository rules_rust~0.35.0~rust~rust_darwin_aarch64__aarch64-apple-darwin__stable_tools instantiated at:
  <builtin>: in <toplevel>
Repository rule rust_toolchain_tools_repository defined at:
  /private/var/tmp/<snip>/external/rules_rust~0.35.0/rust/repositories.bzl:373:50: in <toplevel>
ERROR: no such package '@@[unknown repo 'rust_analyzer_1.74.0_srcs' requested from @@rules_rust~0.35.0~rust~rust_toolchains]//': The repository '@@[unknown repo 'rust_analyzer_1.74.0_srcs' requested from @@rules_rust~0.35.0~rust~rust_toolchains]' could not be resolved: No repository visible as '@rust_analyzer_1.74.0_srcs' from repository '@@rules_rust~0.35.0~rust~rust_toolchains'
ERROR: /private/var/tmp/<snip>/external/rules_rust~0.35.0/rust/private/BUILD.bazel:33:29: Target '@@rules_rust~0.35.0//rust/private:rust_analyzer_detect_sysroot' depends on toolchain '@@[unknown repo 'rust_analyzer_1.74.0_srcs' requested from @@rules_rust~0.35.0~rust~rust_toolchains]//:rust_analyzer_toolchain', which cannot be found: no such package '@@[unknown repo 'rust_analyzer_1.74.0_srcs' requested from @@rules_rust~0.35.0~rust~rust_toolchains]//': The repository '@@[unknown repo 'rust_analyzer_1.74.0_srcs' requested from @@rules_rust~0.35.0~rust~rust_toolchains]' could not be resolved: No repository visible as '@rust_analyzer_1.74.0_srcs' from repository '@@rules_rust~0.35.0~rust~rust_toolchains''
ERROR: Analysis of target '//:gen_rust_project' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.501s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
    Fetching repository @@bazel_tools~cc_configure_extension~local_config_cc; starting

Reproduction here: https://github.com/mortenmj/rules_rust_analyzer_repro

@illicitonion illicitonion self-assigned this Jan 4, 2024
illicitonion added a commit that referenced this issue Jan 5, 2024
It looks like we register these as _tools not as _srcs, this looks like
it was maybe a typo in
#1528

Fixes #2388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants