Replies: 3 comments 6 replies
-
Isn't this just a combination of Another problem is that repository rules are able to call whatever tool with |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion since the official resolution is "use |
Beta Was this translation helpful? Give feedback.
-
Sometimes, it's useful to tell Bazel that it's not supposed to access the Internet. Of course, if you want a real security boundary, it's best to put up a firewall, but asking Bazel to error out when it tries to access the Internet results in better diagnostics.
To this end, we have two tools:
--experimental_repository_disable_download
, which makes Bazel raise an error if it tries to access the Internet--nofetch
, which makes Bazel to error out if a repository (even a local one) isn't fetched but needs to beIt looks like there is room for another alternative in between: erroring out if
ctx.download()
is called at all, regardless of whether the download is cached or not. This would be useful if one wants to test whether their build is independent of the Internet without going through the trouble of wiping the local download cache and because this way, success of builds with a "do not download" flag set would not be dependent of the state of local caches.@meteorcloudy , WDYT?
(This came up because we ran into an issue not a long time ago where this exact thing happened)
Beta Was this translation helpful? Give feedback.
All reactions