Skip to content

regressive commit #1166

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

Closed
wt opened this issue Mar 5, 2022 · 26 comments · Fixed by #1177
Closed

regressive commit #1166

wt opened this issue Mar 5, 2022 · 26 comments · Fixed by #1177
Labels

Comments

@wt
Copy link
Contributor

wt commented Mar 5, 2022

3db49e8 is a regressive commit.

This commit breaks a very simple query for me.

I have a simple hello world rust target here: //rust/example/hello_world:hello_world.

I run the following query: bazel query 'deps(//rust/example/hello_world:hello_world)'

Before 3db49e8 (specifically 5591596), it works. After that commit, I get the following:

➜  source git:(new_rules_rust) bazel query 'deps(//rust/example/hello_world:hello_world)'
INFO: Invocation ID: 983a9a5a-480d-4f0a-8285-715f2703a72d
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:15:6: no such package '@rules_rust_util_import__aho_corasick__0_7_15//': The repository '@rules_rust_util_import__aho_corasick__0_7_15' could not be resolved: Repository '@rules_rust_util_import__aho_corasick__0_7_15' is not defined and referenced by '@rules_rust//util/import/raze:aho_corasick'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:51:6: no such package '@rules_rust_util_import__quote__1_0_10//': The repository '@rules_rust_util_import__quote__1_0_10' could not be resolved: Repository '@rules_rust_util_import__quote__1_0_10' is not defined and referenced by '@rules_rust//util/import/raze:quote'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved: Repository '@rules_rust_util_import__proc_macro2__1_0_33' is not defined and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved: Repository '@rules_rust_util_import__syn__1_0_82' is not defined and referenced by '@rules_rust//util/import/raze:syn'
ERROR: Evaluation of query "deps(//rust/example/hello_world:hello_world)" failed: errors were encountered while computing transitive closure
Loading: 8 packages loaded
Loading: 8 packages loaded

I also get this on the latest commit, which is 78d702b at the time of this issue's creation.

@UebelAndre
Copy link
Collaborator

cc @hlopko @cfredric who might have better context here.

@hlopko
Copy link
Member

hlopko commented Mar 7, 2022

Hey @wt, I'm sorry for the trouble. I think your repro instructions are a little bit off (there is no package //rust/example, and examples directory is actually a nested workspace, with its own WORKSPACE.bazel file). But those aside I think I understand what the problem is. The main WORKSPACE file of your project doesn't include these 2 lines: (https://cs.opensource.google/bazel/rules_rust/+/main:WORKSPACE.bazel;l=29):

load("@rules_rust//util/import:deps.bzl", "import_deps")

import_deps()

That said, I now realize that our change was disruptive, since it added a package that in order to be analyzed correctly needs added external repositories... We ignored this problem in the past, and our handwavy solution was to have releases of rules_rust. AFAIK there is no progress on releases in the last months though. Maybe we should push for that?

@illicitonion
Copy link
Collaborator

@hlopko Just to make sure I understand, those dependencies aren't actually used unless someone enables this new import feature with a flag, right? But the repositories (and I guess targets) now need to exist because otherwise bazel errors at loading time even though they're not actually used and it will prune them out at analysis time?

If so, maybe we could work out a less intrusive way of doing this?

In other places, I've created wrapper macros, either which internally delegate to the real rules:

def import_supporting_rust_library(**kwargs):
    proc_macro_deps = kwargs.get("proc_macro_deps", [])
    if "my_lib" not in proc_macro_deps:
        proc_macro_deps += ["my_lib"]
    kwargs["proc_macro_deps = proc_macro_deps
    rust_library(
        **kwargs,
    )

or which decorate them like maybe:

def add_import(rule, **kwargs):
    proc_macro_deps = kwargs.get("proc_macro_deps", [])
    if "my_lib" not in proc_macro_deps:
        proc_macro_deps += ["my_lib"]
    kwargs["proc_macro_deps = proc_macro_deps
    rule(**kwargs)

...

add_import(
    rust_library,
    ...
)

And these can be loaded by people who want this feature instead of the standard ones.

If that's not workable, could we perhaps have the default workspace setup script create some dummy empty repositories for them, and require that callers initialise these repos before the default workspace setup?

It feels like requiring all users of rules_rust to pull in (currently) 18 crates into a workspace, and then ignore them, is a pretty heavyweight way of implementing an experimental optional feature currently only expected to be used at Google.

@wt
Copy link
Contributor Author

wt commented Mar 7, 2022

The hello_world target is a target in my repo. My point was that there is nothing special about the target. You should be able to do the same with any rust target.

Also, is there any feasible way to revert this until a fix is found. This is blocking an upgrade to 1.59.0 for us, and I just want to know what our options are.

@UebelAndre
Copy link
Collaborator

UebelAndre commented Mar 7, 2022

Potentially related, It does seem the new import_macro target introduced a regression for the rust-analyzer rules

ERROR: /Users/user/Code/rules_rust/util/import/BUILD.bazel:6:37: in //rust/private:rust_analyzer.bzl%rust_analyzer_aspect aspect on with_import_macro_bootstrapping_mode rule //util/import:import_macro: 
Traceback (most recent call last):
        File "/Users/user/Code/rules_rust/rust/private/rust_analyzer.bzl", line 58, column 29, in _rust_analyzer_aspect_impl
                for dep in ctx.rule.attr.deps:
Error: No attribute 'deps' in attr. Make sure you declared a rule attribute with this name.

A repro is just following the setup for https://bazelbuild.github.io/rules_rust/rust_analyzer.html within rules_rust

@hlopko
Copy link
Member

hlopko commented Mar 7, 2022

@illicitonion yup I agree, this is not handled well, I just didn't think of this scenario.

@wt could you try #1177? I think it should fix your issue.

@UebelAndre going to take a look now.

@wt
Copy link
Contributor Author

wt commented Mar 7, 2022

#1177 does not fix this:

➜  source git:(new_rules_rust) bazel query 'deps(//rust/example/hello_world:hello_world)'
INFO: Invocation ID: df88a958-2c5b-4fb9-b906-b88b72e70275
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved: Repository '@rules_rust_util_import__syn__1_0_82' is not defined and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:51:6: no such package '@rules_rust_util_import__quote__1_0_10//': The repository '@rules_rust_util_import__quote__1_0_10' could not be resolved: Repository '@rules_rust_util_import__quote__1_0_10' is not defined and referenced by '@rules_rust//util/import/raze:quote'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:15:6: no such package '@rules_rust_util_import__aho_corasick__0_7_15//': The repository '@rules_rust_util_import__aho_corasick__0_7_15' could not be resolved: Repository '@rules_rust_util_import__aho_corasick__0_7_15' is not defined and referenced by '@rules_rust//util/import/raze:aho_corasick'
ERROR: /private/var/tmp/_bazel_wturkal/98aac8fab9f210d0477cc94a59a95ebe/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved: Repository '@rules_rust_util_import__proc_macro2__1_0_33' is not defined and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: Evaluation of query "deps(//rust/example/hello_world:hello_world)" failed: errors were encountered while computing transitive closure
Loading: 25 packages loaded
Loading: 25 packages loaded

@wt
Copy link
Contributor Author

wt commented Mar 7, 2022

This should be reverted if no solution is on the horizon.

@UebelAndre
Copy link
Collaborator

This should be reverted if no solution is on the horizon.

@wt Can you provide your example workspace so someone could iterate on this locally?

@wt
Copy link
Contributor Author

wt commented Mar 7, 2022

You don't need my workspace. Starting at your rules_rust root:

$ cd examples/hello_world
$ bazel query 'deps(//hello_world:hello_world)'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved: Repository '@rules_rust_util_import__syn__1_0_82' is not defined and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:51:6: no such package '@rules_rust_util_import__quote__1_0_10//': The repository '@rules_rust_util_import__quote__1_0_10' could not be resolved: Repository '@rules_rust_util_import__quote__1_0_10' is not defined and referenced by '@rules_rust//util/import/raze:quote'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved: Repository '@rules_rust_util_import__syn__1_0_82' is not defined and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved: Repository '@rules_rust_util_import__proc_macro2__1_0_33' is not defined and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: /private/var/tmp/_bazel_wturkal/01c9c9910ede67e819e3abb5cd571541/external/rules_rust/util/import/raze/BUILD.bazel:15:6: no such package '@rules_rust_util_import__aho_corasick__0_7_15//': The repository '@rules_rust_util_import__aho_corasick__0_7_15' could not be resolved: Repository '@rules_rust_util_import__aho_corasick__0_7_15' is not defined and referenced by '@rules_rust//util/import/raze:aho_corasick'
ERROR: Evaluation of query "deps(//hello_world:hello_world)" failed: errors were encountered while computing transitive closure
Loading: 23 packages loaded

@UebelAndre
Copy link
Collaborator

UebelAndre commented Mar 8, 2022

@rules_rust//hello_world:hello_world is not a valid target. Do you mean from within @rules_rust//examples?

@wt
Copy link
Contributor Author

wt commented Mar 8, 2022

There is another command before the bazel query command. It changes to the right directory.

@wt
Copy link
Contributor Author

wt commented Mar 8, 2022

Yes, I probably do mean that.

@wt
Copy link
Contributor Author

wt commented Mar 8, 2022

Nope, you have to change into the directory.

You can't just do bazel query 'deps(@rules_rust//examples/hello_world:hello_world)'.

It's another workspace.

@hlopko
Copy link
Member

hlopko commented Mar 8, 2022

I'm afraid I cannot repro the precise scenario you are hitting. More specifically, #1177 fixes all the scenarios I tested.

git checkout main
cd examples
bazel query 'deps(//hello_world/...)'

produces the failure (as expected):

RROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved: Repository '@rules_rust_util_import__proc_macro2__1_0_33' is not defined and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved: Repository '@rules_rust_util_import__proc_macro2__1_0_33' is not defined and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved: Repository '@rules_rust_util_import__syn__1_0_82' is not defined and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:51:6: no such package '@rules_rust_util_import__quote__1_0_10//': The repository '@rules_rust_util_import__quote__1_0_10' could not be resolved: Repository '@rules_rust_util_import__quote__1_0_10' is not defined and referenced by '@rules_rust//util/import/raze:quote'
ERROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:15:6: no such package '@rules_rust_util_import__aho_corasick__0_7_15//': The repository '@rules_rust_util_import__aho_corasick__0_7_15' could not be resolved: Repository '@rules_rust_util_import__aho_corasick__0_7_15' is not defined and referenced by '@rules_rust//util/import/raze:aho_corasick'
ERROR: /home/hlopko/.cache/bazel/_bazel_hlopko/3fff2c70c40747247d66ab37fb8097d3/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved: Repository '@rules_rust_util_import__lazy_static__1_4_0' is not defined and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: Evaluation of query "deps(//hello_world/...)" failed: errors were encountered while computing transitive closure
Loading: 4 packages loaded

Now with #1177:

git checkout fix_import_macro_loading_time_deps
cd examples
bazel query 'deps(//hello_world/...)'

I get a successful run. The output is a bit long, so grepping for import I get:

@rules_rust//rust/settings:use_real_import_macro
@rules_rust//util/import:fake_import_macro_impl
@rules_rust//util/import:fake_import_macro_impl.sh
@rules_rust//util/import:import
@rules_rust//util/import:import_macro_label
@rules_rust//util/import:use_fake_import_macro

There is no raze mentioned in the output. I tried also in the main rules_rust repository, with commented out part of the WORKSPACE file that pulls the import macro deps, still seems #1177 fixes the issue.

Could you try to isolate and minimize the repro case? For the time being, you can use the patches attribute in standard repository rules (for example for git_repository: https://docs.bazel.build/versions/main/repo/git.html#git_repository-patches) to unblock your upgrade to newest Rust. I'm happy to revert the offending PR, but since there is a workaround, and at this point I'm not sure what exactly is causing the issue you are seeing in your workspace, I'll wait for you to get back to us.

@wt
Copy link
Contributor Author

wt commented Mar 8, 2022

#1177 now seems to fix this issue. I had sync'd the branch before a merge with master. After the merge, we are all good. Please land with prejudice.

@dfreese
Copy link
Collaborator

dfreese commented Mar 19, 2022

I ran into this, since I use bazel query to find build/test targets and invoke them in my workflow.

WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_rust",
    sha256 = "4bc9124b7ac63ccca8e5eb1a09d57d00dc5e442a9c7fef16cc6f7958ae95c05a",
    strip_prefix = "rules_rust-7c865ffeb1472c6ff2541c221169ba706ea0d839",
    urls = [
        "https://github.com/bazelbuild/rules_rust/archive/7c865ffeb1472c6ff2541c221169ba706ea0d839.tar.gz",
    ],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

rules_rust_dependencies()

load("@rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories()

# Fails with this commented out
# load("@rules_rust//util/import:deps.bzl", "import_deps")
#
# import_deps()

BUILD

load("@rules_rust//rust:defs.bzl", "rust_library")

rust_library(
    name = "lib",
    srcs = ["lib.rs"],
)

lib.rs

pub fn test() {}

When invoking a basic query:

viz@vizblade:~/query_repro$ bazel query 'deps(//:lib)'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:33:6: no such package '@rules_rust_util_import__proc_macro2__1_0_33//': The repository '@rules_rust_util_import__proc_macro2__1_0_33' could not be resolved and referenced by '@rules_rust//util/import/raze:proc_macro2'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:51:6: no such package '@rules_rust_util_import__quote__1_0_10//': The repository '@rules_rust_util_import__quote__1_0_10' could not be resolved and referenced by '@rules_rust//util/import/raze:quote'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:60:6: no such package '@rules_rust_util_import__syn__1_0_82//': The repository '@rules_rust_util_import__syn__1_0_82' could not be resolved and referenced by '@rules_rust//util/import/raze:syn'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:15:6: no such package '@rules_rust_util_import__aho_corasick__0_7_15//': The repository '@rules_rust_util_import__aho_corasick__0_7_15' could not be resolved and referenced by '@rules_rust//util/import/raze:aho_corasick'
ERROR: /home/viz/.cache/bazel/_bazel_viz/2a819faec116417ac151d6e11b830676/external/rules_rust/util/import/raze/BUILD.bazel:24:6: no such package '@rules_rust_util_import__lazy_static__1_4_0//': The repository '@rules_rust_util_import__lazy_static__1_4_0' could not be resolved and referenced by '@rules_rust//util/import/raze:lazy_static'
ERROR: Evaluation of query "deps(//:lib)" failed: errors were encountered while computing transitive closure

Uncommenting the import_deps() causes this to work as expected, but that's:

  1. Expecting a lot of trust that the import isn't going to be invoked now, or unexpectedly in the future
  2. Trust that it won't cause problems with other http_repository targets
  3. Not listed in the docs.

All of this feels pretty invasive for for something that's intended to be optional and probably won't be used outside of google. Reopening primarily because of 3) in that list.

@dfreese dfreese reopened this Mar 19, 2022
@dfreese
Copy link
Collaborator

dfreese commented Mar 19, 2022

Clarifying further, @hlopko, the fix in #1177 appears to be only valid for bazel 4.2 and later.

# Errors
bazel-4.0.0 query 'deps(//:lib)'
# Errors
bazel-4.1.0 query 'deps(//:lib)'
# Fine
bazel-4.2.1 query 'deps(//:lib)'
# Fine
bazel-5.0.0 query 'deps(//:lib)'

@wt
Copy link
Contributor Author

wt commented Mar 21, 2022

What version are you using?

@UebelAndre UebelAndre added the bug label Mar 21, 2022
@UebelAndre
Copy link
Collaborator

What version are you using?

@wt was this directed at @dfreese ?

@wt
Copy link
Contributor Author

wt commented Mar 23, 2022

Apologies for the confusion, yes.

@hlopko
Copy link
Member

hlopko commented Mar 24, 2022

@dfreese do you need to support Bazel <4.2? I was about to suggest to bump the min bazel version to 5.0 since we're only claiming in COMPATIBILITY that we support the latest Bazel LTS (and the overlap time with previous LTS is 3 months, and is going to pass soon).

@dfreese
Copy link
Collaborator

dfreese commented Mar 26, 2022

Sorry for the delay, missed the response. I was able to bump our team to 5.0, so bumping to 4.2 would be fine, though, unless it. It would be nice not to directly inject this unless it was really necessary.

@hlopko is a wrapping macro usable internally?

If not, do we expect this to be enough of a pattern that it's worth adding something to the toolchain to support injecting dependencies folks may want to add globally, such as in this case?

@wt
Copy link
Contributor Author

wt commented Apr 29, 2022

Can this issue be closed at this point?

If not, what would be needed to close it out?

@hlopko
Copy link
Member

hlopko commented May 6, 2022

If not, do we expect this to be enough of a pattern that it's worth adding something to the toolchain to support injecting dependencies folks may want to add globally, such as in this case?

Yes I do anticipate that folks will need to inject dependencies, so adding a principled, supported feature for this sounds like a great idea. We'll explore the options in a separate issue/PR. Thanks!

@hlopko
Copy link
Member

hlopko commented May 6, 2022

As for this issue, closing sounds good to me.

@hlopko hlopko closed this as completed May 6, 2022
jwnrt added a commit to jwnrt/opentitan that referenced this issue Aug 26, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
jwnrt added a commit to jwnrt/opentitan that referenced this issue Aug 26, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
jwnrt added a commit to jwnrt/opentitan that referenced this issue Aug 27, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
jwnrt added a commit to jwnrt/opentitan that referenced this issue Sep 8, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
jwnrt added a commit to lowRISC/opentitan that referenced this issue Sep 17, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
github-actions bot pushed a commit to lowRISC/opentitan that referenced this issue Dec 11, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue Dec 12, 2024
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue Jan 13, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue Apr 8, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue Apr 21, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue Apr 21, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to jwnrt/opentitan that referenced this issue May 5, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to jwnrt/opentitan that referenced this issue May 19, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
jwnrt added a commit to lowRISC/opentitan that referenced this issue May 21, 2025
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <[email protected]>
(cherry picked from commit f9f257a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants