Currently, the language server will use <workspace>/.curry as an output directory in any case since defaultOutDir points to ./.curry and the language server's working directory is the workspace:
Given that the user will compile projects anyway from their respective subdirectories, it would make sense for the language server to use the local .curry directories as well, which is what this PR does. This additionally prevents clashes if the user has a module under the same name in multiple packages and unexpected cross-visibility between packages in the same workspace once compiled.
Some more testing is needed, however, especially to make sure that dependencies use the correct out dir too etc.
Consider the following project layout
Currently, the language server will use
<workspace>/.curry
as an output directory in any case sincedefaultOutDir
points to./.curry
and the language server's working directory is the workspace:https://github.com/fwcd/curry-language-server/blob/668edfc7fe34e1023549a61a84d94a2a63cec97e/src/Curry/LanguageServer/Index/Store.hs#L261
Given that the user will compile projects anyway from their respective subdirectories, it would make sense for the language server to use the local
.curry
directories as well, which is what this PR does. This additionally prevents clashes if the user has a module under the same name in multiple packages and unexpected cross-visibility between packages in the same workspace once compiled.Some more testing is needed, however, especially to make sure that dependencies use the correct out dir too etc.