aspect-build / aspect-build/rules_py

[Bug]: Vscode ty does not work with venv

Open
#802 3 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Starlark
Stars
145
Forks
97
Avg merge
1d 1h
Merged PRs (30d)
71

Description

### What happened?

When using the standard venv, Ty in vscode is not able to find to use the venv due to the pyvenv.cfg using relative paths as far as I could understand.
```bzl
py_venv(
name = "venv",
tags = ["manual"],
deps = all_requirements,
)
```

This might be a Ty issue not sure.

### Version

Development (host) and target OS/architectures:
Windows

Output of `bazel --version`:
8.5.1

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

Language(s) and/or frameworks involved:

### How to reproduce

```shell
py_venv(
name = "venv",
tags = ["manual"],
deps = all_requirements,
)
bazel run //:venv
If you select .venv/bin/python3 in vscode as interpreter it makes Ty crash.
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Windows failure with the py_venv rule and `bazel run //:venv`, then select the generated `.venv/bin/python3` interpreter in VS Code. Investigate whether the relative paths in `pyvenv.cfg` cause Ty to crash, and define done as Ty working with the standard venv; the issue names no source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.