Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCD does not behave as expected when compiled with LDC #665

Open
andrejp88 opened this issue Apr 19, 2022 · 2 comments
Open

DCD does not behave as expected when compiled with LDC #665

andrejp88 opened this issue Apr 19, 2022 · 2 comments

Comments

@andrejp88
Copy link

andrejp88 commented Apr 19, 2022

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.

@WebFreak001
Copy link
Member

WebFreak001 commented Apr 21, 2022

platform? self compiled dmd with ldc or the one from the releases page?

@andrejp88
Copy link
Author

The platform is Linux x86-64.
DMD and LDC were installed by the install.sh script found here: https://dlang.org/install.sh

I'll add this information to the OP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants