SimonN / LixD

Lix: Lemmings-like game with puzzles, editor, multiplayer
https://www.lixgame.com
132 stars 16 forks source link

Build fails with dmd 2.091 until sdlang-d merges PR #396

Closed SimonN closed 4 years ago

SimonN commented 4 years ago

Repro:

  1. Update dmd to 2.091, the current stable.
  2. Keep or delete dub.selections.json from Lix's main directory.
  3. Force a complete rebuild with dub -f.

Output of a session with a kept dub.selections.json:

Performing "debug" build using /usr/bin/dmd for x86_64.
allegro 4.0.4+5.2.0: building configuration "no-libs"...
derelict-util 3.0.0-beta.2: building configuration "library"...
derelict-enet 4.1.0: building configuration "library"...
enumap 0.4.2: building configuration "library"...
bolts 0.7.1: building configuration "library"...
optional 0.6.3: building configuration "unittest"...
libinputvisitor 1.2.2: building configuration "library"...
taggedalgebraic 0.10.12: building configuration "library"...
sdlang-d 0.10.4: building configuration "library"...
../../../.dub/packages/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d(28,21): Error: undefined identifier FracSec, did you mean function fracSec?
../../../.dub/packages/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d(29,18): Error: undefined identifier FracSec, did you mean function fracSec?
../../../.dub/packages/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d(48,21): Error: undefined identifier FracSec, did you mean function fracSec?
../../../.dub/packages/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d(49,18): Error: undefined identifier FracSec, did you mean function fracSec?
/usr/bin/dmd failed with exit code 1.

When I delete dub.selections.json and edit dub.json to pin package sdlang-d to >=0.10.5, I get additional errors:

../../../.dub/packages/taggedalgebraic-0.11.9/taggedalgebraic/source/taggedalgebraic/taggedalgebraic.d-mixin-76(77,4): Error: template identifier FieldTypeByName is not a member of alias taggedalgebraic.taggedalgebraic.TaggedAlgebraic!(ParserEventUnion).TaggedAlgebraic.UnionType
../../../.dub/packages/taggedalgebraic-0.11.9/taggedalgebraic/source/taggedalgebraic/taggedalgebraic.d-mixin-76(85,9): Error: template identifier FieldTypeByName is not a member of alias taggedalgebraic.taggedalgebraic.TaggedAlgebraic!(ParserEventUnion).TaggedAlgebraic.UnionType
[...]
SimonN commented 4 years ago

There is already a pull request against sdlang-d to fix this.

schveiguy commented 4 years ago

I think the taggedalgebraic errors are due to the sdlang errors. I'm building my project fine using sdlang and taggedalgebraic with my patch for a while.

SimonN commented 4 years ago

Right, thanks! Your PR against sdlang-d indeed fixes all errors, whether they came out of sdlang-d and in taggedalgebraic.

SimonN commented 4 years ago

Fixed in Lix's commit f50fc162276c75b39031d080fe5dd20d613641d2. Thanks fo @schveiguy for the quick fix!

clort81 commented 2 years ago

Pulling 2021-12-12 gets me

/usr/lib/ldc/aarch64-linux-gnu/include/d/std/algorithm/comparison.d(1531,6): Warning: skipping definition of function std.algorithm.comparison.max!(int, int).max due to previous definition for the same mangled name: _D3std9algorithm10comparison__T3maxTiTiZQjFNaNbNiNfiiZi Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational.

SimonN commented 2 years ago

Thanks! I've noticed the same problem yesterday. Without extra configuration, warnings are errors, which is a problem when Phobos generates warnings.

To circumvent: In your dub.json, add this line:

    "buildRequirements": ["allowWarnings"],

This will make the Lix build pass despite the warning in Phobos.

I'm about to release Lix 0.9.40 tomorrow morning that contains this fix.