bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
22.95k stars 4.02k forks source link

Add a note in the 'Distribution file directories' #19396

Open evn10 opened 1 year ago

evn10 commented 1 year ago

Page link:

https://bazel.build/run/build#running-bazel-in-an-airgapped-environment

Problem description (include actual vs expected text, if applicable):

It took me a while to understand that the the tar files need to be located in the directory uncompressed. I would be nice to just add a little note or an an example, e.g. (I was using the cpp-tuturial and had to include this to make it work)

$HOME/bazel/repos |----- rules_cc-0.0.2.tar.gz |----- bazelci_rules-1.0.0.tar.gz

bazel run --distdir=$HOME/bazel/repos //main:hello-world

Where do you see this issue? (include link to specific section of the page, if applicable)

It is not really an issue, just make the documentation a bit clearer

Any other information you'd like to share?

This entry on stackoverflow put me on the right track

https://stackoverflow.com/questions/67077183/bazel-build-air-gapped

keertk commented 11 months ago

Hi @evn10 would you be open to submitting a PR for this? Thanks!

evn10 commented 8 months ago

Hi @evn10 would you be open to submitting a PR for this? Thanks! Apologies for the late reply, I am actually a newbie on bazel and not a professional developer but rather a bazel enthousiast. In the meantime, I managed to move to bazel 7.0 where things are a bit different. So in short, yes I am open for submitting a PR for this (and maybe some other items which I came across during my journey).

evn10 commented 8 months ago

Hi again,

I tried to create a PR (draft and otherwise) but that rejected as I am not a collaborator. I don't really see how I have to handle that so I publish her what I intended to put in the PR (so apologies for the blast):

-----(snip)---- In the section "Repository cache (with Bazel 7 or later)", it is mentioned to use the repository cache. In my case, I cannot use a 'source' server as our servers are not connected to the Internet [ I use a Windows 10 VDI and a Linux Redhat 7 server with no Internet access]. Therefore, I propose to add the following text at the end of section Repository cache (with Bazel 7 or later)': "In case you don't have an 'source' server with Internet connectivity to execute the above procedure, the --dist_dir option still works in Bazel 7. This might be a path to follow in case if you don't have access. The --repository_cache option is preferred in case you don't experience this constraint. Some considerations :

@keertk, is it possible to take a look at the above please and advice on how to proceed?

keertk commented 7 months ago

Hi @evn10 apologies for the delay. Could you please look into creating a PR for this? You should be able to submit one by forking this repo, even without being a collaborator. We unfortunately won't be able to submit these changes on your behalf. Thanks!

evn10 commented 7 months ago

Hi @evn10 would you be open to submitting a PR for this? Thanks!

Sorry, it took a while being a nob :-) The PR is #21136. I'll close this issue for now.

Thanks for all your help, I hope that the PR makes sense.

Have a nice day, Erik