You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit 30db3e0 (Updated host to use provided solution file., 2021-02-28) from #2099
seems to have regressed rootUri handling (cc @david-driscoll).
Before that commit, initializeParams.RootUri was always used if non-null.
After that commit, application.ApplicationRoot was always used if non-null, potentially overriding a non-null initializeParams.RootUri.
Specifically, if there are two projects
someproject.sln
somesubproject/somesubproject.sln
and if OmniSharp is started with somesubproject/ as working directory,
then application.ApplicationRoot will be somesubproject/,
even if initializeParams.RootUri sent by the LSP requests to use the parent directory.
My guess is that the reason for this commit was to enable a user override with the omnisharp -s.
That's fine but I don't think the override should happen when starting OmniSharp without -s.
It is wrong in this case because OmniSharp uses only the current working directory to determine application.ApplicationRoot;
but the LSP client also uses the current file, which may be outside the working directory.
Commit 30db3e0 (Updated host to use provided solution file., 2021-02-28) from #2099
seems to have regressed rootUri handling (cc @david-driscoll).
Before that commit,
initializeParams.RootUri
was always used if non-null.After that commit,
application.ApplicationRoot
was always used if non-null, potentially overriding a non-nullinitializeParams.RootUri
.Specifically, if there are two projects
and if OmniSharp is started with
somesubproject/
as working directory,then
application.ApplicationRoot
will besomesubproject/
,even if
initializeParams.RootUri
sent by the LSP requests to use the parent directory.My guess is that the reason for this commit was to enable a user override with the
omnisharp -s
.That's fine but I don't think the override should happen when starting OmniSharp without
-s
.It is wrong in this case because OmniSharp uses only the current working directory to determine
application.ApplicationRoot
;but the LSP client also uses the current file, which may be outside the working directory.
Originally reported at kakoune-lsp/kakoune-lsp#746
The text was updated successfully, but these errors were encountered: