-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Flip --legacy_external_runfiles
to false
#23574
Comments
How should we set up our .bazelrc files in the 7.3 series in order to prepare for this flip? Is this correct?
|
That is correct! |
--legacy_external_runfiles
--legacy_external_runfiles
to false
Just a note: Flipping this separately from |
Referencing my reply to the other thread here: #23576 (comment) |
@fmeum @lberki Continue the discussion about whether we should flip this flag or revert back to "legacy runfiles only" mode. A quick test with Bazel's own test suite:
I think flipping this flag could still cause some downstream projects to break, but it's probably manageable, however, not the other way around. |
@meteorcloudy that's a strong argument for flipping this flag instead of keeping the legacy paths. Should I send out a change? |
@lberki I already have one, sending it to you |
Working towards: #23574 PiperOrigin-RevId: 674247156 Change-Id: I082ca436732cbd10cde613344566570f3cf1d424
Closing this one since the flag is now flipped and there is no risk of rolling back. |
🎉 Thanks for following through with this! |
Migrate Bazel for #23574 PiperOrigin-RevId: 704687334 Change-Id: I47fe34775959d1b4ab4e6d931ddc6df256f6e59a
Motivation
This flag has been there since 2016 so we should make up our minds and I think it's better for everyone to do so.
Technically, it makes flipping
--experimental_sibling_repository_layout
somewhat more complicated since it makes the layout of the runfiles tree inconsistent with that of the execroot, but in practice, the plan is to flip them very close to each other temporally, so it doesn't matter much.Description
This incompatible change changes runfiles trees: files in external repositories are currently available at both
$RUNFILES/<main repo>/external/<external repo>/<path>
and$RUNFILES/<external repo>/<path>
. Flipping this flag removes the former.The reason why the flag is not prefixed with
--incompatible_*
is that it predates that nomenclature.Incompatible Flag
--legacy_external_runfiles
Migration Guide
If you are using the runfiles library, there isn't anything to do. If not, you'll have to update code to look for the files in their non-legacy location in the runfiles tree.
In particular, if
--experimental_sibling_repository_layout
is unset (which is the default), the path of source files in external repositories will be different between runfiles trees ($RUNFILES</repo name>/<repo-relative-path>
) and the execroot (external/<repo name>/<repo-relative-path>
). This means that some Make variables (e.g.$(JAVA)
) cannot be used to reference the runfiles tree.However, pseudo-Make variables (
$(rlocationpath)
and$(rootpath)
) do work.In which Bazel LTS version will this incompatible change be enabled?
Bazel 8
Additional Context
No response
TODO List
No response
The text was updated successfully, but these errors were encountered: