Dlang-UPB / D-scanner

Fork of the official D-scanner that uses dmd-as-a-lib
Boost Software License 1.0
6 stars 2 forks source link

Branch replace-libdparse fails to build #152

Closed nordlow closed 1 month ago

nordlow commented 1 month ago

On Ubuntu 24.04 and ldc2-1.40.0-beta3-linux-x86_64

dub --compiler=ldc2

on branch replace-libdparse fails to build for me as

    Building inifiled 1.3.3: building configuration [library-quiet]
    Building libddoc:common 0.8.0: building configuration [library]
    Building libddoc 0.8.0: building configuration [lib]
    Building dscanner ~replace_libdparse: building configuration [application]
   Pre-build Running commands
src/dscanner/analysis/base.d(12,8): Error: unable to read module `transitive`
src/dscanner/analysis/base.d(12,8):        Expected 'dmd/visitor/transitive.d' or 'dmd/visitor/transitive/package.d' in one of the following import paths:
import path[0] = src/
import path[1] = ../../../.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/
import path[2] = ../../../.dub/packages/emsi_containers/0.9.0/emsi_containers/src/
import path[3] = ../../../.dub/packages/libdparse/0.23.2/libdparse/src/
import path[4] = ../../../.dub/packages/dmd/~master/dmd/compiler/src
import path[5] = ../../../.dub/packages/inifiled/1.3.3/inifiled/source
import path[6] = ../../../.dub/packages/libddoc/0.8.0/libddoc/src/
import path[7] = ../../../.dub/packages/libddoc/0.8.0/libddoc/common/source/
import path[8] = /home/per/.local/ldc2-1.40.0-beta3-linux-x86_64/bin/../import
Error ldc2 failed with exit code 1.

. What am I missing?

RazvanN7 commented 1 month ago

Can you check whether dub has correctly downloaded dmdlib? It look like it should download master but maybe it uses some cached version?

nordlow commented 1 month ago

Can you check whether dub has correctly downloaded dmdlib?

How do I verify this? Specifically where under ~/.dub/ should I look?

RazvanN7 commented 1 month ago

Here: ~/.dub/packages/dmd/~master/dmd/compiler/src/ - check that dmd/visitor/transitive.d exists.

RazvanN7 commented 1 month ago

Ok, I was able to reproduce the failure on my machine. Manually deleting ~/.dub/packages/dmd/~master/ and then running dub build makes for a successful compile. I think this is a dub bug.

RazvanN7 commented 1 month ago

@nordlow note that you also need to recursively init all of the submodules for dub test to work. If the above fixes your issues, feel free to close this as there isn't anything that can be done on our side.

nordlow commented 1 month ago

@nordlow note that you also need to recursively init all of the submodules for dub test to work. If the above fixes your issues, feel free to close this as there isn't anything that can be done on our side.

It does. Awesome. Thanks.

nordlow commented 1 month ago

Manually deleting ~/.dub/packages/dmd/~master/ Yes, this fixed it. Thanks!