microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 769 forks source link

Pylance not working with pixi editable packages #6218

Closed clement-chaneching closed 1 month ago

clement-chaneching commented 1 month ago

Environment data

Code Snippet

A reproducible example and description is done here: https://github.com/clement-chaneching/pixi-pylance-test

It s a minimal example with 2 packages, 1 depending on the other on pixi as editable.

Repro Steps

  1. Create 2 packages as above with pixi and hatch/setuptools build, with one depending on the other as editable
  2. Navigating from package 1 to package 2 with pylance doesnt work. image

Expected behavior

Having pylance to work with pixi editable paths.

Actual behavior

Logs

Happy to get any help or redirection on this topic.

Edit : @baszalmstra, Thanks for your PR on adding pixi on vscode python. Is this something you could have a look on?

debonte commented 1 month ago

This is working for me. Do you have the Pixi environment selected within VS Code?

image

Btw, when I first tried this I couldn't get Pixi support to work within vscode-python. The Pixi environment was not shown in the environment selector list. I think this is because I was in an experiment that changed my VS Code to use https://github.com/microsoft/python-environment-tools (which doesn't have Pixi support) rather than the environment locators in vscode-python. If you're not seeing the Pixi environment in the list of options, try setting the following VS Code setting and see if that helps:

    "python.locator": "js"
clement-chaneching commented 1 month ago

Hello,

Indeed, it looks like it works for me now as well! Not sure what was happening last friday...