Skip to content

Ensure hasInterpreters() API isn't used where necessary, and information returned by it is roughly accurate #19169

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

Merged
merged 1 commit into from
May 19, 2022

Conversation

karrtikr
Copy link

Closes #19102

Places where hasInterpreters() was being used:

  • Mac interpreters
    • hasInterpreters
    • hasANonMacInterpreter
    • Fix tests
  • Python is not installed prompt
  • If no active interpreter is present, a random interpreter is picked to launch the DA
  • Startup telemetry sends whether we have python3 available

All these scenarios were considered, for mac interpreter we now do not use hasInterpreters() and diagnostics were combined. Using hasInterpreters() without a filter is okay because we trigger a discovery if no Python is installed. For the startup telemetry, using python3 is now only roughly accurate as refresh is no longer guaranteed to be triggered.

We also now don't get conda version if active interpreter is not conda, to avoid running conda binary, and as it isn't useful to send.

@karrtikr karrtikr added the no-changelog No news entry required label May 19, 2022
@karrtikr karrtikr merged commit 9d81a19 into microsoft:main May 19, 2022
@karrtikr karrtikr deleted the hasinterpreters branch May 19, 2022 21:34
wesm pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog No news entry required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate environment detection in our overall environment UX to see if there are scenarios where discovery is unnecessary
1 participant