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

allow for project specific rust file server mirrors #550

Closed
dirkboye opened this issue Jan 15, 2021 · 6 comments
Closed

allow for project specific rust file server mirrors #550

dirkboye opened this issue Jan 15, 2021 · 6 comments

Comments

@dirkboye
Copy link
Contributor

We mirror all external dependencies to our local network so that we do not need any internet access for building our software.
Using environment variable STATIC_RUST_URL is good for our CI but it's cumbersome for developers who need
to have the environment variable set as well.

A better solution can be seen in go_rules method go_download_sdk ( see https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go-download-sdk ) where you can set the mirror urls.

I'd like to propose to add something similar to rust_toolchain_repository which would make it possible to
have project-specific rust mirrors.

damienmg pushed a commit that referenced this issue Jan 15, 2021
…ust file server mirrors (#551)

* rust_toolchain_repository: add urls to enable project specific rust file server mirrors

* fixup! rust_toolchain_repository: add urls to enable project specific rust file server mirrors

* Regenerate documentation
@dirkboye
Copy link
Contributor Author

PR was merged!

@UebelAndre
Copy link
Collaborator

UebelAndre commented Jan 15, 2021

@dirkboye Oh, one other thing I just came accross this morning. You might have been able to add a .bazelrc file to your projects and specify a repo_env. Would that have also worked for you?

@dirkboye
Copy link
Contributor Author

@UebelAndre unfortunately that doesn't work so well and increases build times for our CI as we use bazel query in our scripts.

bazel query does not support --repo_env or --action_env

running bazel build with repo_env will then result in

INFO: Build option --repo_env has changed, discarding analysis cache.

@UebelAndre
Copy link
Collaborator

Oh wow, really good to know. That seems like a bug on Bazel's side though 😞 I otherwise don't understand why --repo_env shouldn't be supported by all commands

@dirkboye
Copy link
Contributor Author

@UebelAndre here's an open issue on the bazel side for that:
bazelbuild/bazel#11943

@UebelAndre
Copy link
Collaborator

@dirkboye Oh wow, you're a hero! Thank you 🙏 😄

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