Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No hatch environment is discovered on Windows #23121

Closed
karthiknadig opened this issue Mar 25, 2024 · 5 comments · Fixed by #23129
Closed

No hatch environment is discovered on Windows #23121

karthiknadig opened this issue Mar 25, 2024 · 5 comments · Fixed by #23129
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Milestone

Comments

@karthiknadig
Copy link
Member

karthiknadig commented Mar 25, 2024

Testing #23088

@flying-sheep

Platform: Windows

Follow the steps in the TPI. After running hatch run python -V and waiting for it to finish. Run Select interpreter command, it takes some time to refresh environments. But the hatch environment is not seen,

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 25, 2024
@karthiknadig
Copy link
Member Author

From logs:

2024-03-25 11:17:18.682 [info] > hatch env show --json
2024-03-25 11:17:18.682 [info] cwd: .
2024-03-25 11:17:19.195 [info] > hatch env find default
2024-03-25 11:17:19.195 [info] cwd: .

From command line:

> hatch env find default
C:\Users\kanadig\AppData\Local\hatch\env\virtual\something\XIyUl07c\something

@karthiknadig
Copy link
Member Author

This might be a bug is hatch itself, from VS Code with same CWD hatch returns: C:\Users\kanadig\AppData\Local\hatch\env\virtual\something\Lwno8mvj\something

The issue seems to be that VS Code (node APIs) use lowercase for Drive letters, the CWD set while running this might have lowercase drive letter and that might be changing the hash.

@karrtikr
Copy link

Yep I discovered the same issue while debugging, this was previously encountered with poetry as well: python-poetry/poetry#3829. Opened an issue on Hatch while incorporating the same workaround as Poetry.

@karrtikr karrtikr added bug Issue identified by VS Code Team member as probable bug area-environments Features relating to handling interpreter environments needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Mar 26, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Mar 26, 2024
@karrtikr karrtikr added this to the March 2024 milestone Mar 26, 2024
@karrtikr karrtikr changed the title No hatch environment seen in select environment QuickPick No hatch environment is discovered on Windows Mar 26, 2024
@karthiknadig
Copy link
Member Author

Upstream issue pypa/hatch#1350

@rzhao271 rzhao271 removed the info-needed Issue requires more information from poster label Mar 27, 2024
@karthiknadig karthiknadig added the verified Verification succeeded label Mar 27, 2024
@karthiknadig
Copy link
Member Author

This is working now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants