Skip to content

Conversation

@karthiknadig
Copy link
Member

Closes #17905

@karthiknadig karthiknadig merged commit 262019b into microsoft:main Jan 19, 2022
@karthiknadig karthiknadig deleted the proposed-api branch January 19, 2022 05:57
Comment on lines +96 to +101
if (!query) {
// `undefined` query means this is full refresh of environments.
// Trigger an event indicating that we need to clear everything and start
// fresh.
reportInterpretersChanged([{ path: undefined, type: 'clear-all' }]);
}

Choose a reason for hiding this comment

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

@karthiknadig I disagree with the behavior here, I thought we agreed that hard refresh should not be a default behavior and should be behind a flag.

undefined query is used in several places like

api.triggerRefresh().ignoreErrors();
where we do not want a hard refresh.

wesm pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
…hon#18314)

* Proposed API initial commit

* Add API description.

* Adding tests initial

* Added some tests

* add getInterpreterDetails tests

* Added tests for getInterpreterPaths

* added tests for reportActiveInterpreterChanged

* Tests for setActiveInterpreter

* Add tests for reportInterpretersChanged

* Tests for refreshInterpreters and getRefreshPromise

* Add news item.

* Update documentation and support for 'clear-all' event.

* Fix tests and linting.

* Fix logger tests.
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.

Implement the proposed public API for the extension and use it internally

2 participants