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

Clear cached interpreter on active interpreter change #5474

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

joyceerhl
Copy link
Contributor

@joyceerhl joyceerhl commented Apr 9, 2021

For #5470

This needs to be ported to the April point release.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

@joyceerhl joyceerhl marked this pull request as ready for review April 9, 2021 18:52
@joyceerhl joyceerhl requested a review from a team as a code owner April 9, 2021 18:52
@joyceerhl
Copy link
Contributor Author

I started working on a smoke test for this scenario, then realized the Python extension's command handler for the 'python.setInterpreter' command doesn't take arguments, so we don't currently have a programmatic way to change the active interpreter. I think we should make one (and that would involve changes in the Python extension) so I'm going to file a new issue for that.

api.onDidChangeInterpreter(
() => {
this.didChangeInterpreter.fire();
this.workspaceCachedActiveInterpreter.clear();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This restores a single line of code that was dropped in #5199. The original code is 1c4fad8#diff-f851568311c1811b9b71d6bb014982757402f39702bb9df14075e1954199abc1L301-L305

@joyceerhl joyceerhl merged commit 4d854f2 into main Apr 9, 2021
@joyceerhl joyceerhl deleted the dev/joyceerhl/clear-cached-interpreters branch April 9, 2021 20:51
joyceerhl added a commit that referenced this pull request Apr 9, 2021
* Clear cache on active interpreter change

* Add smoke test but skipped due to changes required in Python extension
joyceerhl added a commit that referenced this pull request Apr 9, 2021
* Clear cache on active interpreter change

* Add smoke test but skipped due to changes required in Python extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants