-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Changed public API for execution to return an object and provide a callback which is called when interpreter setting changes #12597
Conversation
src/client/api.ts
Outdated
* Returns the Python execution command corresponding to the specified resource, taking into account | ||
* An event that is emitted when the interpreter configuration changes. | ||
*/ | ||
readonly onDidChangeExecDetails: Event<Uri | undefined>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename ExeDetails
to something else.
The comments are related to interpreter configuration, but event has work exec
.
E.g. why not onDidChangeInterpreterDetails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or at a minimum onDidChangeExecutionDetails
to be consistent with Execution
in other API. Else feels weird to use exec
in one place and execution
in another (specially for PUblic API).
On a side note, not sold on the word execution
is a state of a current process, where as we're dealing with the environment that has been selected (not its state).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. why not onDidChangeInterpreterDetails
Because an API method getExecutionDetails
exists, it only makes sense to have a change event API associated with the method, which is why having onDidChangeExecutionDetails
makes more sense.
The comments are related to interpreter configuration, but event has work exec.
It currently only deals with sending interpreter configuration change event, but can change along with changes in getExecutionDetails
API. I am thinking to have something like,
"An event that is emitted when execution details (for a resource) change. For instance, when interpreter configuration changes."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a side note, not sold on the word execution is a state of a current process, where as we're dealing with the environment that has been selected (not its state).
The motivation for using "Execution details" here is : An API which gives all the details the consumer needs to execute code within the environment.
I think having a doc comment should make things clearer.
Kudos, SonarCloud Quality Gate passed!
|
For #12596
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).