julia-vscode / SymbolServer.jl

Other
23 stars 30 forks source link

Allow passing the project file as environment. #227

Open fredrikekre opened 3 years ago

davidanthoff commented 3 years ago

Why do we want to do that? I'm generally not a fan of making APIs behave a la "you can pass it either as a folder or file path, we'll just handle both cases", that seems to just add unnecessary complexity. And in this case we've used the directory path forever in the API, and the VS Code client won't pass anything else. Could other clients not just conform with that as well?

I do like the other aspects of the PR, certainly is a bit more elegant :)

fredrikekre commented 3 years ago

It's just nice to be able to pass the output of Base.active_project() I guess?

It also seems that the full path is "more canonical" since otherwise the library has to guess what the user meant (although having both Project.toml and JuliaProject.toml is pretty uncommon).

davidanthoff commented 3 years ago

I think if this is the canonical way, then we should change everything to make this the only way of specifying environments.

fredrikekre commented 1 year ago

accept file names everywhere

This is the only place where it is not accepted to pass the file I believe. Everywhere else where the environment is used it is interpreted by Juila (which accepts either the directory or the file).