RC files inconsistently ignored on Windows on master.
git clone https://github.com/filipesilva/bazel-windows-rc
cd bazel-windows-rc
bazel build shell_build
The following lines will be logged:
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:\sandbox\bazel-windows-rc/.bazelrc
d:\sandbox\bazel-windows-rc/tools/bazel.rc
Although the logs say the files were ignored, the explain.log file (referenced in .bazelrc) was still created. The build_event_binary file (referenced in tools/bazel.rc) was not created though.
Windows 10
bazel info release?development version
bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.Replace this line with your answer.
Checked out https://github.com/bazelbuild/bazel/commit/b629238a8af71ae5262e69e423d18cbe8f0687af, ran `bazel build //src:bazel, and copied the logged binary to my PATH.
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?b629238a8af71ae5262e69e423d18cbe8f0687af
I looked in https://github.com/bazelbuild/bazel/issues for issues in the last month about RC files and couldn't find anything open or closed that seemed related.
Also tried to use the --bazelrc option but it seems to be gone (ERROR: Unrecognized option: --bazelrc). It doesn't show on help anymore so I suppose that is intended.
The issue is that blaze_util::JoinPath is used to build the file paths in old_files, but it simply joins the path parts with a / instead of something platform-dependent. Since read_files are delimited by \, and lost_files is simply a set intersection, none of the read files are properly removed from old_files, and so all of the paths are shown.
It seems like changing blaze_util::JoinPath to delimit things properly would be the appropriate move here?
Actually it seems like changing blaze_util::JoinPath to delimit with \ might not be the appropriate move here, since Bazel internal paths are Cygwin paths. Perhaps converting old_files with ConvertPath is appropriate?
Hi. Can you give an estimate for this issue?
Let me take a look! I'll get back to this bug with an ETA today.
I have a fix for this bug. Will create a PR shortly.
Hold on, as I was adding tests it turned out RC file path handling is buggy. ETA for the fix should be this week, I'll comment again if there are more updates.
Status update: PR is out for review.
Expected release with this fix is 0.22.0
Sadly, the commit was rolled back because it seems to have broken some targets in Google's own codebase: https://github.com/bazelbuild/bazel/commit/37335187bf31dac48155e77f404bd11008d68ea7
Problem found and fix sent for review; ETA for rolling forward this PR is tomorrow.
Thank you!
Btw, I've found another similar issue #6469, it may be the same thing...
Is this released? I still see this behavior on Windows 10 and bazel 0.21:
PS C:\Users\rwsim\Documents\GitHub\decitrig> bazel info release
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:
C:\Users\rwsim/.bazelrc
INFO: Invocation ID: 640a8eb9-5ab8-4d83-8c09-c14b1e457e86
release 0.21.0
PS C:\Users\rwsim\Documents\GitHub\decitrig>
The fix should be in 0.22.
Most helpful comment
Status update: PR is out for review.
Expected release with this fix is 0.22.0