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

Bazel shows bogus WARNING for the rc files, if they are symlinks. #6469

Closed
PiotrSikora opened this issue Oct 23, 2018 · 8 comments
Closed

Bazel shows bogus WARNING for the rc files, if they are symlinks. #6469

PiotrSikora opened this issue Oct 23, 2018 · 8 comments
Assignees
Labels
team-Bazel General Bazel product/strategy issues untriaged

Comments

@PiotrSikora
Copy link
Contributor

Description of the problem / feature request:

Bazel shows bogus WARNING for the rc files, if they are symlinks:

WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/tmp/workspace/.bazelrc

But the rc file is correctly processed, as seen in the reproduction below.

Note that this is new in 0.19rc6 and there is no warning in 0.18.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

mkdir -p /tmp/workspace/tools
cd /tmp/workspace
touch WORKSPACE
touch BUILD
echo "build:test --copt=-DTEST" > tools/bazel.rc
ln -s tools/bazel.rc .bazelrc
bazel build --config=test :all
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/tmp/workspace/.bazelrc
Starting local Bazel server and connecting to it...
INFO: Analysed 0 targets (3 packages loaded, 0 targets configured).
INFO: Found 0 targets...
INFO: Elapsed time: 1.298s, Critical Path: 0.02s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

What operating system are you running Bazel on?

Linux.

What's the output of bazel info release?

release 0.19.0rc6

Any other information, logs, or outputs that you want to share?

Backstory (mostly irrelevant to the actual issue):

The .bazelrc symlink to tools/bazel.rc was added to ease the migration instead of import %workspace%/tools/bazel.rc suggested in #6319, since we have projects (e.g. https://github.com/envoyproxy/envoy-filter-example) importing the main project (https://github.com/envoyproxy/envoy) as a submodule and linking to its tools/bazel.rc, so import breaks, because workspace-relative location changes.

@PiotrSikora
Copy link
Contributor Author

cc @katre, since this is new in 0.19 (#6116), but probably not a release blocker.

@katre
Copy link
Member

katre commented Oct 23, 2018

This is a small enough use-case that I don't want to risk a breakage due to cherrypick. We should try and address it for 0.20, however.

@baskus
Copy link

baskus commented Nov 2, 2018

I'm getting the same error message for non-symlinks on Windows with Bazel 0.19.0:

D:\src\codebase>bazel build //...
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
d:\src\codebase/.bazelrc

@Xjs
Copy link
Contributor

Xjs commented Nov 9, 2018

Same as @baskus. Can somebody please confirm this is not the intended behaviour?

@katre
Copy link
Member

katre commented Nov 9, 2018

Assigning to @dslomov to decide if this is a blocker for 0.20

@jin
Copy link
Member

jin commented Nov 30, 2018

/sub, this is causing confusing issues on the Mac too. The system_rc is /etc/bazel.bazelrc on the Mac, but /etc is a symlink to /private/etc. This results in confusing warning messages like:

$ cat /etc/bazel.bazelrc
build --jobs=4
$ bazel version
WARNING: The following rc files are no longer being read, please transfer
their contents or import their path into one of the standard rc files:
/etc/bazel.bazelrc

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Dec 17, 2018

Thanks @excitoon for linking to #6138! That might indeed be the same issue.

Someone with a Mac at hand, could you please Bazel built at e9a9085 and see if that commit fixes this issue? Oh wait, never mind, it happens on Linux too I see.

@laszlocsomor laszlocsomor self-assigned this Dec 17, 2018
@laszlocsomor
Copy link
Contributor

Confirming that e9a9085 fixes this issue too, so I'll say this is a duplicate of #6138.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Bazel General Bazel product/strategy issues untriaged
Projects
None yet
Development

No branches or pull requests

8 participants