I ran into a couple compiler/dub bugs on windows yesterday. if your dub.json has:
"debug": {
"debugVersions": ["Debug"],
"dflags": ["-g"] // redudant, and explodes the pdb file at linking stage for both DMD and LDC2, windows linker will complain about
},
LINK : fatal error LNK1318: Unexpected PDB error; 'LIMIT (12)'
and another issue, perhaps because dub TOML hasn't been updated in awhile, or, a compiler bug, I can't run profile=gc with DMD (LDC2 doesn't have it? and complains of invalid options)
"dflags": [ "-profile=gc"]
It seems like its corrupting the mixins trying to insert the profiling code:
(dmd-2.112.0)novous@sparky:~/Desktop/git2/spacehole2$ dub --build=profilegc --force Starting Performing "profilegc" build using /home/novous/dlang/dmd-2.112.0/linux/bin64/dmd for x86_64.
Building raylib-d 6.0.1: building configuration [library]
Building toml 2.0.1: building configuration [library]
/home/novous/dlang/dmd-2.112.0/linux/bin64/../../src/druntime/import/core/internal/array/construction.d-mixin-685(689,27): Error: undefined identifier TOMLValue string name = TOMLValue[].stringof; ^ ../../../.dub/packages/toml/2.0.1/toml/src/toml/toml.d(1059,45): Error: template instance core.internal.array.construction._d_arrayliteralTXTrace!(TOMLValue) error instantiating set([keys[$ - 1]], TOMLValue([TOMLValue(TOML_TYPE.TABLE)])); ^ ../../../.dub/packages/toml/2.0.1/toml/src/toml/toml.d(573,11): instantiated from here: parseTOMLImpl!true return parseTOMLImpl!true(data, options); ^ ../../../.dub/packages/toml/2.0.1/toml/src/toml/toml.d(577,11): Error: template instance toml.toml.parseTOMLImpl!false error instantiating return parseTOMLImpl!false(data, options);
^ Error /home/novous/dlang/dmd-2.112.0/linux/bin64/dmd failed with exit code 1.
Versions of tools (to follow in next post)