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
{{ message }}
Repository navigation
DCD does not behave as expected when compiled with LDC #665
First off, I'm not really sure where to report this. I suspect this is actually a bug in LDC, but I'm a long way from figuring out what the root cause could be. I hope this report is still useful to the DCD team, if not, I can post it over on the LDC page.
Long story short, VSCode wasn't giving me any useful auto-completions. After a while digging and manually experimenting with DCD, I found that DCD doesn't work right when it's compiled using LDC, but works fine when compiled with DMD. Specifically, it fails to find declarations and usages and prints logs along the lines of:
2022-04-19T19:18:03.151 [warning] util.d:225:getSymbolsByTokenChain Could not find declaration of istring("numFailures") from position 5041
2022-04-19T19:18:03.151 [warning] localuse.d:120:findLocalUse No or ambiguous symbol for the identifier at cursor
(where numFailures is the name of the variable at the given position of the file in question).
But when I recompiled DCD via make (which uses dmd) rather than make ldc, the auto-completion worked as expected.
The issue happens with DCD both at master (which is 2bfd3d0 as of this writing) and at tag v0.13.6.
My LDC is at version 1.29.0 and DMD at 2.099.1 — the latest releases of both.
The platform is Linux x86-64.
DMD and LDC were installed by the install.sh script found here: https://dlang.org/install.sh
I realize there are many layers here (DCD, make, DMD, LDC) but I don't really know how to narrow things down any more than I already have. It's easy enough to work around though (compile with DMD, not LDC) so if nothing else, I hope this is useful to someone.
Activity
WebFreak001 commentedon Apr 21, 2022
platform? self compiled dmd with ldc or the one from the releases page?
andrej-petrovic commentedon Apr 21, 2022
The platform is Linux x86-64.
DMD and LDC were installed by the
install.shscript found here: https://dlang.org/install.shI'll add this information to the OP.