microsoft / microsoft/vscode-python-environments

Python Extension and Python Environment Extension both activate when `python.useEnvironmentsExtension` defaults to false

Đang mở
#1,778 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
triage-needed
Ngôn ngữ chính
TypeScript
Star
138
Fork
62
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
35

Mô tả

## Environment data

## Repro Steps

* Install the Python extension
* Install the Python environment extension
* Set the user configuration to:

```json
"workbench.enableExperiments": false,
"python.experiments.enabled": false
```

Reload the window

## Expected behavior

* The Python and Python environment extension agree on which extension is responsible for managing environments

## Actual behavior

* Both extensions activate
* I see two Python selectors
* The `Select Python Environment` selector from the Python Environment extension is missing

Image

## Additional context

The Python Environment Extension uses `inspect` to decide whether `useEnvironmentsExtension` is set to false, but this does not take into account a default value.

The `when` condition of the Command Palette entry uses `when`, which takes default values into account

The Python Extension uses `get`, which takes default values into account

This came up in https://github.com/astral-sh/ty-vscode/issues/551 because it's now unclear which extension ty should consider as being authoritative when it comes to selecting an environment.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định logic kiểm tra cấu hình và kích hoạt của Python Environment Extension, sau đó so sánh với hành vi get có tính đến giá trị mặc định của Python Extension và when condition của Command Palette. Tái hiện với cả hai extension đã được cài đặt và các thử nghiệm đã bị tắt; được xem là hoàn tất khi các extension thống nhất về quyền sở hữu môi trường và chỉ selector dự kiến được hiển thị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, typescript, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.