bazelbuild / bazelbuild/bazel

--distdir is not working in combination with --experimental_downloader_config

Open
#12,339 3 comments 0 reactions 1 assignee Claimed by @meteorcloudy View on GitHub
P2 team-ExternalDeps type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

Related to 9d29464.
When using combination of --distdir and --experimental_downloader_config it seems to be a problem with resolving paths.
I have a self-contained Bazel installation in a folder that I specify using --distdir. Folder contains all downloaded files that Bazel need (I use bazel sync for that) so no downloads from Internet are necessary. When applying --experimental_downloader_config flag with "block *" value all paths are being replaced including Bazel internal ones. So files needed by Bazel and present in distdir can no longer be used which results in build error.

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build with --experimental_downloader_config having "block *" as well as --distdir pointing to the location of a complete Bazel installation.

### What operating system are you running Bazel on?
Red Hat Enterprise Linux Server release 7.8 (Maipo)

### What's the output of bazel info release?
release 3.7.0

### What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?
I run 8cffdf1 commit which is 3.7.0 release commit.

### Have you found anything relevant by searching the web?
No

### Any other information, logs, or outputs that you want to share?
$ bazel build --experimental_remote_downloader_config=.bazel_download_config ...
....
INFO: Rewritten [https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip, https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip] as []
....
ERROR: no such package '@rules_cc//cc': java.io.IOException: Cache miss and no url specified

File 8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip is present in the folder that I provide via --distdir.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.