Commit 22c308d
authored
fix(venv_link): Restore original venv name mangling (#589)
Reported by @jimmyt857 in testing of v1.6.0-rc0
Previously running the `examples/py_binary:py_binary.venv` target would
create a link
`$BUILD_WORKING_DIRECTORY/.examples+py_binary+py_binary.venv`. This
behavior regressed in 1.5.0 and the link became simply
`$BUILD_WORKING_DIRECTORY/.py_binary.venv`.
Restore the original behavior.
---
### Changes are visible to end-users: no
- Searched for relevant documentation and updated as needed: no
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: no
### Test plan
- [x] Manual testing
```shellsession
❯ bazel run //examples/py_binary:py_binary.venv
INFO: Analyzed target //examples/py_binary:py_binary.venv (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //examples/py_binary:py_binary.venv up-to-date:
bazel-bin/examples/py_binary/py_binary.venv
INFO: Elapsed time: 0.815s, Critical Path: 0.05s
INFO: 2 processes: 1 internal, 1 darwin-sandbox.
INFO: Build completed successfully, 2 total actions
INFO: Running command line: bazel-bin/examples/py_binary/py_binary.venv
usage: link [options]
Helper to create a symlink to a virtualenv in the source tree.
optional arguments:
-h, --help show this help message and exit
--dest DEST Dir to link the virtualenv into. Default is $BUILD_WORKING_DIRECTORY. (default: /Users/arrdem/Documents/work/aspect/rules_py)
--name NAME Name to link the virtualenv as. (default: .examples+py_binary+py_binary.venv)
Linking: /private/var/tmp/_bazel_arrdem/93bfea6cdc1153cc29a75400cd38823a/execroot/aspect_rules_py/bazel-out/darwin_arm64-fastbuild/bin/examples/py_binary/.py_binary.venv -> /Users/arrdem/Documents/work/aspect/rules_py/.examples+py_binary+py_binary.venv
Link is up to date!
To configure the virtualenv in your IDE, configure an interpreter with the homedir
/Users/arrdem/Documents/work/aspect/rules_py/.examples+py_binary+py_binary.venv
To activate the virtualenv in your shell run
source /Users/arrdem/Documents/work/aspect/rules_py/.examples+py_binary+py_binary.venv/bin/activate
```1 parent 5ea06cb commit 22c308d
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 18 | + | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
| |||
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
39 | | - | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
0 commit comments