Factor old conda locator out of conda service#15276
Merged
Merged
Conversation
da91fb4 to
7d3f93a
Compare
karrtikr
commented
Feb 1, 2021
Comment on lines
+80
to
+96
| /** | ||
| * Interface carries the properties which are not available via the discovery component interface. | ||
| */ | ||
| export interface ICondaService { | ||
| readonly condaEnvironmentsFile: string | undefined; | ||
| getCondaFile(): Promise<string>; | ||
| isCondaAvailable(): Promise<boolean>; | ||
| getCondaVersion(): Promise<SemVer | undefined>; | ||
| getCondaFileFromInterpreter(interpreterPath?: string, envName?: string): Promise<string | undefined>; | ||
| } | ||
|
|
||
| export const ICondaLocatorService = Symbol('ICondaLocatorService'); | ||
| /** | ||
| * @deprecated Use the new discovery component when in experiment, use this otherwise. | ||
| */ | ||
| export interface ICondaLocatorService { | ||
| readonly condaEnvironmentsFile: string | undefined; | ||
| getCondaFile(): Promise<string>; |
Author
There was a problem hiding this comment.
Check out these interfaces to see what was moved.
Comment on lines
83
to
+88
| export interface ICondaService { | ||
| readonly condaEnvironmentsFile: string | undefined; | ||
| getCondaFile(): Promise<string>; | ||
| isCondaAvailable(): Promise<boolean>; | ||
| getCondaVersion(): Promise<SemVer | undefined>; | ||
| getCondaFileFromInterpreter(interpreterPath?: string, envName?: string): Promise<string | undefined>; | ||
| } |
Author
There was a problem hiding this comment.
The 4 properties left here cannot be implemented using the discovery component API, hence we cannot get rid of all of CondaService.
karthiknadig
approved these changes
Feb 1, 2021
kimadeline
approved these changes
Feb 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Almost no new code is added, just moved a bunch of code to other class.
Some methods of conda service are not specific to discovery and used all over the extension. We cannot disable those even when in discovery experiment. Hence put the locator part into
CondaLocatorService, which we can directly delete later once we remove the experiment.I plan to put
CondaLocatorServicebehind the experiment flag in a later PR, where I'll also implement methods ofCondaServiceusingconda.ts, our new conda code that was added.