dub icon indicating copy to clipboard operation
dub copied to clipboard

dub master cannot be built by older compilers

Open ibuclaw opened this issue 2 years ago • 5 comments

The stable branch can be built by compilers based on 2.076.x (i.e: gdc-11). But master fails to build with anything younger than 2.099.x.

dmd 2.098:

source/dub/dub.d(746): Error: expression expected, not `throw`
source/dub/dub.d(746): Error: found `new` when expecting `)` following template argument list
source/dub/dub.d(746): Error: semicolon expected following auto declaration, not `Exception`
source/dub/dub.d(747): Error: expression expected, not `)`

ibuclaw avatar Aug 15 '22 22:08 ibuclaw

I don't think we should support v2.076, but we should support the last 10 versions. That looks like a rather simple fix.

Geod24 avatar Aug 16 '22 08:08 Geod24

It's not a simple fix. Since we are using std.sumtype, which is in Phobos only since v2.097.0, it creates a lot of issues. Using dyaml.stdsumtype leads to other problems.

Geod24 avatar Aug 16 '22 09:08 Geod24

Hack it with -mv?

maxhaton avatar Aug 16 '22 22:08 maxhaton

Using dyaml.stdsumtype leads to other problems.

-mv is never the answer. And as I mentioned:

Using dyaml.stdsumtype leads to other problems.

Geod24 avatar Aug 22 '22 20:08 Geod24

2.097 and above is still better than 2.099 and above. Probably worth just going with that and putting

frontend=">=2.097"

In the dub.sdl

SingingBush avatar Sep 19 '22 08:09 SingingBush

DMD nightly builds are the latest victim of this issue.

https://github.com/dlang/dmd/actions/workflows/nightlies.yml

source/dyaml/stdsumtype.d(235): Error: module `spec` is in file 'std/format/spec.d' which cannot be read
import path[0] = /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp.Ov5XR4/clones/dub/source

ibuclaw avatar Oct 17 '22 17:10 ibuclaw