-
Notifications
You must be signed in to change notification settings - Fork 81
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
Improve environment handling #871
Conversation
We'll also need to figure out how this interacts with the env selector widget we have in VSCode, right? |
Yeah, for the PR as-is the widget controls the |
Ok that's probably fine for now. I'll try to review this tonight or tomorrow. |
Would the idea be that we include this in 1.2, or for later? Should we first finish the cloud downloading stuff, and support for virtual environments? For now I'm not putting that on the list of PRs to include in 1.2, but let me know if you think otherwise. |
Ok, I think we should get this in for 1.2 because we need some changes in LanguageServer.jl after merging julia-vscode/StaticLint.jl#251. |
to be LSP compliant
julia-vscode/StaticLint.jl#251
This is now in a state in which it's worth a discussion.
The general idea -
Document
that is not included by another one) get's assigned a subset of the packages in the global env. This assignment is done by checking which workspace folder the root doc is in.Example:
Global environment:
~.julia/environments/v1.7
workspace folders
["~/.julia/dev/CSTParser", "~/.julia/dev/StaticLint"]
I have both those projects in the global env.
"~/.julia/dev/CSTParser/src/CSTParser.jl"
: Gets all the dependencies specified in"~/.julia/dev/CSTParser/Project.toml"
(they're all available from the global env).CSTParser
itself is not included."~/.julia/dev/CSTParser/test/runtests.jl"
: Get's the above packages but alsoCSTParser
and anything included in theextras
section of the project file."~/Documents/someotherfile.jl"
: Gets all packages from the global env (everything in the manifest, not limited to direct dependencies)EDIT. In terms of the code - there are a lot of lines touched but most of this is just ensuring we're passing the appropriate
ExternalEnv
to various functions. Substantive changes are tolanguageserverinstance.jl
,textdocument.jl
andstaticlint.jl
closes julia-vscode/julia-vscode#1248