-
Notifications
You must be signed in to change notification settings - Fork 424
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
Simple way to apply cargo_config to rust_rules bootstrapping? #2859
Comments
I'd be happy to review a change that wires all that up. |
I'm a little new to bazel, what's the process here - work backwards from every instance of crates_repository/crates_vendor that can take a |
I'm starting on this, but immediately with a clone of latest (up from 0.31) our basic rules are not working:
Is there something more I need to do to upgrade our WORKSPACE to 0.50 before I can start on this work? |
Never mind, I'm figuring it out reading the DEVELOPMENT.md inside crate_universe |
I'm a little unclear what So, the goal now is to make |
Sorry, I may have misunderstood your question. There is no way to have a Cargo |
That might help a great deal, I will try it out! |
This seems like it should work (and if I |
Okay, so I think the examples in that source are wrong - I think the regex is matching only the part of the source URL after
works fine. Just a bit weird that the https:// is not there when you are matching.. is that intentional [@shs96c] ? This is in bazel 7.3.1 |
Okay so this was super clutch, thank you! Combined with passing |
In a corporate environment, where crates.io is intermediated by an artifactory mirror, we must have a
cargo_config.toml
which creates new registries and sources and areplace-with
rule. It's not too bad getting this to work for our own rust targets, but to get e.g.rust_analyzer
working, thiscargo_config
also needs to be passed (I suspect) in various places in3rdparty/deps.bzl
sort of stuff which is doingcrates_vendor
in order to bootstrap the build of rust analyzer.How do people typically deal with this? If we pull in
rules_rust
viahttp_archive
then I guess I am supposed to patch it in all the places that I find? Should I instead addrust_analyzer
to my project myself, so that it its deps get pulled in using thecargo_config
of mycrates_repository
call inWORKSPACE
?EDIT: this is all basically in order to build
rust-project.json
for our LSP.The text was updated successfully, but these errors were encountered: