Skip to content

Conversation

@arrdem
Copy link
Collaborator

@arrdem arrdem commented Jun 9, 2025

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

  • Manual testing
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

@github-actions
Copy link

github-actions bot commented Jun 9, 2025

e2e/use_release folder: LCOV of commit 3a65870 during CI #1852

Summary coverage rate:
  lines......: 100.0% (2 of 2 lines)
  functions..: 100.0% (1 of 1 function)
  branches...: no data found

Files changed coverage rate: n/a

@arrdem arrdem added this to the 1.6.0 milestone Jun 9, 2025
@arrdem arrdem merged commit 22c308d into main Jun 10, 2025
16 checks passed
@arrdem arrdem deleted the arrdem/venvs-in-src-dirs branch June 10, 2025 00:26
@arrdem arrdem mentioned this pull request Jun 10, 2025
arrdem added a commit that referenced this pull request Jun 10, 2025
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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants