Skip to content

Build fails with gdc 13.x #2577

Description

@ximion

System information

  • dub version: 1.30 & master
  • OS Platform and distribution: Linux (Debian)
  • compiler version gdc 12.2.0

Bug Description

When trying to compile dub using GDC, the build fails while the previous 1.29 version built fine.
Error message:

Command `["gdmd", "-of/tmp/dub/bin/dub", "-I/tmp/dub/source", "-version=DubUseCurl", "-version=DubApplication", "-g", "-O", "-w", "@build-files.txt"]` failed, output was:
Serializing composite type Flags!(BuildRequirement) which has no serializable fields
Serializing composite type Flags!(BuildOption) which has no serializable fields
source/dub/internal/dyaml/stdsumtype.d:2053:13: error: static assert:  "`handlers[0]` of type `template` never matches"
 2053 |             static assert(matches[].canFind(hid),
      |             ^
source/dub/internal/dyaml/stdsumtype.d:1717:52: note: instantiated from here: ‘matchImpl!(const(SumType!(NativePath, Version)))’
 1717 |         return matchImpl!(Yes.exhaustive, handlers)(args);
      |                                                    ^
source/dub/commandline.d:2319:43: note: instantiated from here: ‘match!(const(SumType!(NativePath, Version)))’
 2319 |                                 ovr.target.match!(
      |                                           ^

How to reproduce?

Try to build dub using gdc

Expected Behavior

Either the build succeeds as it did before, or dub emits a message that the compiler/version is unsupported for building dub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions