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

Report packages listed in requirements.txt that correspond to missing modules in the current environment #4315

Closed
luabud opened this issue May 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@luabud
Copy link
Member

luabud commented May 3, 2023

This is an ask from the Python extension to help with microsoft/vscode-python#20133 (microsoft/vscode-python#21140)

The idea is that the Python extension would define a pip requirements language type, and mark requirements.txt files as a pip requirements language type. Pylance would then register its LS to access pip-requirements type either by language type or by using requirements path pattern, and then throw warnings for when packages listed there are not installed, and then send back a code action to trigger the create environment command.

@luabud luabud added the enhancement New feature or request label May 3, 2023
@rchiodo
Copy link
Contributor

rchiodo commented May 4, 2023

I think we can do that if the user opens the requirements file, but what if they don't? (I don't imagine people commonly open that file when they're trying to resolve why they get an import error)

Wouldn't python still need these warnings to figure out what to install? I added a comment in the python extension issue about potentially implementing support for 'pulling' diagnostics for a file. I believe pylance currently only supports 'push'.

@luabud
Copy link
Member Author

luabud commented May 4, 2023

After talking about this offline, we decided to handle it on the Python extension side.

@luabud luabud closed this as completed May 4, 2023
@luabud luabud closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants