You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: correctly obtain relative path required for the venv created by --bootstrap_impl=script (#2439)
Computing the relative path from the venv interpreter to the underlying
interpreter was
incorrectly using the actual interpreter's directory depth, not the venv
interpreter's
directory depth, when computing the distance from the venv interpreter
to the runfiles root.
The net effect is the correct relative path would only be computed for
binaries with
the same directory depth as the actual interpreter (e.g. 2).
This went undetected in CI because the tests for this logic just happen
to have the
same directory depth as the actual interpreter used.
To fix, compute the relative path to the runfiles root using the venv
interpreter
directory. Also added a test in a more nested directory to test this
case.
Along the way:
* Change relative path computation to compute a minimum relative path.
* Fix the internals to pass a runfiles-root relative path, not main-repo
relative path,
for the actual interpreter, as intended.
Fixes#2169
---------
Co-authored-by: Richard Levasseur <[email protected]>
Co-authored-by: Richard Levasseur <[email protected]>
Co-authored-by: Ignas Anikevicius <[email protected]>
0 commit comments