-
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
Fixes #22 to Detect anaconda from known locations #221
Conversation
DonJayamanne
commented
Nov 14, 2017
•
edited
Loading
edited
- Fixes No option to select Anaconda root #22 to Detect anaconda from known locations
- Also added a strict linter to lint modified files (background task)
// tslint:disable-next-line:no-require-imports no-var-requires | ||
const untildify: (value: string) => string = require('untildify'); | ||
|
||
const KNOWN_CONDA_LOCATIONS = ['~/anaconda3/bin/conda', '~/miniconda3/bin/conda']; |
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.
@brettcannon the more I look at the code, I feel its just not future proof.
What happens when Anaconda4 comes out? Do we add anaconda4, and so on?
Making it dynamic could be slow as well, i.e. looking for directories '~/anaconda*`
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.
Over the time I've installed different versions of miniconda on my home and work computer, and now I have all these directories: .miniconda2
, miniconda
, miniconda3
.
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 agree about the brittleness going forward. I say just do the glob match; the number of matches for that should be rather small and the number of stat calls to resolve this won't be that high.
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.
Will go with the hacky approach for now, created an issue to be resolve separately (as I'd need to add an npm package).
#256
// tslint:disable-next-line:no-require-imports no-var-requires | ||
const untildify: (value: string) => string = require('untildify'); | ||
|
||
const KNOWN_CONDA_LOCATIONS = ['~/anaconda3/bin/conda', '~/miniconda3/bin/conda']; |
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 agree about the brittleness going forward. I say just do the glob match; the number of matches for that should be rather small and the number of stat calls to resolve this won't be that high.
.then(interpreters => interpreters.filter(this.isCondaEnvironment)) | ||
.then(condaInterpreters => this.getLatestVersion(condaInterpreters)) | ||
.then(condaInterpreter => { | ||
return condaInterpreter ? path.join(path.dirname(condaInterpreter.path), 'conda.exe') : 'conda'; |
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.
Isn't assuming conda.exe
a Windows-specific thing?
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.
Should probably change the condition. Currently its implied with the existence of registryLookupForConda
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.
Fixed
* 'master' of https://github.com/Microsoft/vscode-python: Fixes #56 list all environments (#219) Fixes #57 Disable activation on debugging (#220) Fixes #26 Do not run linters when linters are disabled (#222)
* upstream/master: Fix typo in README.md (#252) Disable linter without workspaces (#241)
* upstream/master: Fix feedback service (#246) Fix django context initializer (#248) disable generation of tags file upon extension load (#264)
@brettcannon fixed. |