Repository navigation
Move bazel.rc to workspace root to support bazel-0.18.0 - #21374
Conversation
|
There is a fatal error if the .bazelrc imports a .tf_configure.bazelrc that does not exist. I will open a bazel issue to make it nonfatal. Changing the import to workspace-relative should make things a little better, but care will still need to be taken to ensure that the import is not accidentally committed to the file anyway. |
|
Filed: bazelbuild/bazel#5765 |
|
Thanks for the PR! One question. Why do we have to update io_bazel_rules_closure in WORKSPACE file for this change? |
|
@case540 oh, i guess we dont. I just saw it was out of date and updated it. Do you want me to remove that commit and make a separate PR for that? |
|
Yeah, please remove that change from this PR. Only create a separate PR if there is a very specific reason you need to update the dependency. Thanks again |
|
@case540 done. but maybe we want to wait till bazel decides on how they want to name things before merging this? |
|
Sounds good to me. |
|
Nagging Assignee @case540: It has been 20 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
|
Rebased to quiet the bot. The rc file change was rolled back for bazel-0.17 and will be in 0.18 instead so gotta wait a little more so we get the new syntax right. |
|
Any progress on this? We also need this change to fix TensorFlow failure with Bazel@HEAD on our CI. |
|
@meteorcloudy when will try-import hit a released version of Bazel? Once I update ./configure to use try-import it'll also need to have the minimum required version set higher too so I was thinking to do this only once bazel is released? Having people use bazel from git is a bunch more complicated. |
|
Or should I just do this change first using import then we change to try-import a bit later? (but not too long) |
|
Hi @perfinion , thanks for working on this. |
|
@meteorcloudy my main concern is if people accidentally commit anything weird in the /.bazelrc file. Everyone will just have to be careful to make sure the import line does not get committed to the file until we switch to try-import. @martinwicke @yifeif Can we make one of the test bots double check the .bazelrc line to confirm no PR accidentally commits the "import %workspace%/.bazelrc" line? Or if the sanity stuff is in the tree somewhere i'll add a commit to update that together. |
|
Is the test failure related to this change? |
|
rebased and updated commit messages to 0.18.0 from 0.17.0 |
|
@case540 @meteorcloudy looks like the auto-import failed, you'll have to do it manually i think |
|
@case540 Can you help importing this change? |
|
huh, no idea why import/copybara isnt running properly. Yeah, I can handle importing this. |
|
Didnt forget about this. Will hopefully have this PR pulled internally over the weekend. Just needs some internal update due to the way our migration scripts work (this PR removes an opensource-only file). |
|
@case540 thanks for the help! is there also something you can add (to the sanity bot maybe?) to flag if a PR accidentally commits the "import %workspace%/.bazelrc" line until we get the try-import stuff? |
|
@case540 Do you want me to rebase and fix the conflicts? or is it already in the queue? |
|
Yes, could you fix the conflicts please. I tried to merge this in this morning and hit a bunch of random errors. |
Bazel 0.18.0 will contain a change for which rc files it accepts. bazelbuild/bazel@ec83598 bazelbuild/bazel#4502 Old bazel used to read %workspace%/tools/bazel.rc. New bazel will not read that and instead will only read %workspace%/.bazelrc. Signed-off-by: Jason Zaman <[email protected]>
/.bazelrc is not gitignored anymore so this should help in case the import line is accidentally committed. Bazel 0.18.0 will support a new 'try-import' statement that should be used once 0.18.0 has been out long enough. Signed-off-by: Jason Zaman <[email protected]>
|
@case540 done :) |
PiperOrigin-RevId: 215483141
Bazel 0.17.0 will contain a change for which rc files it accepts.
bazelbuild/bazel@ec83598
bazelbuild/bazel#4502
Old bazel used to read %workspace%/tools/bazel.rc. New bazel will not
read that and instead will only read %workspace%/.bazelrc.
Signed-off-by: Jason Zaman [email protected]
Also updates bazel rules_closure to the latest and changes ./configure to echo a workspace relative path instead of full path in case the .bazelrc accidentally gets committed.