Autocompletion fails for dependencies declared in a configuration block
andrejp88 opened this issue · 1 comments
Example dub.sdl:
name "dcd-unittest-bug"
configuration "application" {
targetType "executable"
}
configuration "unittest" {
dependency "unit-threaded" version="~>1.0.11"
}
And an example source/app.d (caret is at |):
import std.stdio;
version(unittest)
{
import unit_threaded : |;
}
else
{
void main()
{
writeln("Edit source/app.d to start your project.");
}
}
In code-d, with the caret at that position, when I trigger autocompletions it doesn't show me any symbols from unit-threaded. The output pane in VSCode shows the following:
2020-12-01T14:21:58.884 [trace] dcd.d:180:__lambda5 Server: 2020-12-01T14:21:58.884 [warning] complete.d:389:importCompletion Could not resolve location of unit_threaded
If I move unit-threaded out of the "unittest" configuration block then restart VSCode, the autocompletion works. However, I would rather have my test-only dependencies declared in the unittest configuration block in the dub file.
DCD does not do anything with dub, please make an issue on the code-d/serve-d repository instead or reduce it to raw dcd server/client calls.