Open mine-cetinkaya-rundel opened 3 months ago
Thank you for the super clear issue notes!
I was able to reproduce with a combination of your steps and the steps from the other issue you mentioned. Creating the project is successful (the expected files are created and the selected runtime is activated), but the Python extension error notifications show. It does look like the same error as #3339 to me as well, so I've posted my repro notes over there.
Although we prioritize starting the interpreter chosen in the Project Wizard, our runtime startup process will still proceed with the usual interpreter discovery. I think https://github.com/posit-dev/positron/issues/3575 tracks adding the ability to skip/disable discovery of specific languages.
In the meantime, if you're not an active Python user, you could disable the Python extension to skip Python runtime discovery in general, noted by Jonathan: https://github.com/posit-dev/positron/issues/3575#issuecomment-2176591849.
Perhaps a future enhancement to the new project flow is to ask the runtime service to make interpreter discovery of other languages opt-in. For example, for an R Project created via the Project Wizard, we wouldn't do Python interpreter discovery unless the user deliberately asks for Python interpreters through some UI affordance. Another thought is that we could ask the language extensions to do discovery "quietly" and not show notifications/errors unless the user is actively using that language.
If it makes sense to you too, I'll change this issue into an enhancement
regarding skipping discovery of non-relevant language runtimes when creating a new project, with the bug
part of this issue captured in #3339.
@sharon-wang That makes sense to me.
I am an active user of both languages, so I don't want to disable one, but thanks for that pointer nonetheless.
However, if such a thing is offered as an "R project," there should be no discovery for other languages, or at least, it should be quiet. An R-only user shouldn't feel like they need to have Python installed to use Positron and vice versa.
Another idea is to have a multi-language project type being offered, and then discovery can happen for both languages, and errors around those wouldn't seem out of place.
Positron Version:
2024.07.0 (Universal) build 41
Steps to reproduce the issue:
renv
to create a reproducible environment"Two issues arise:
myPythonProject
in the wrong path (not the path I chose for my new project)What did you expect to happen?
I did not expect Positron to look for Python interpreters since I started an R project.
Were there any error messages in the output or Developer Tools console?
In the Developer Tools console:
I can't tell if this is related to #3339, but it is the same error.