You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This calls a build file that builds a C++ library. The build file itself doesn't use any of dub's features, it's only here to be cross platform (because rdmd wasn't working well for a reason I forgot).
This is literally the package definition of the build.d file:
My original call, in the parent package, was dub test --compiler=dmd. dub points to the one distributed with dmd-2.094.0-beta.1, through the install script. So by default this bug should select dmd, right ?
Issue 1: ldc2 is used. Because my dub.settings.json uses ldc2 as default compiler. Obviously I override this with --compiler, but the nested one doesn't pick it up. That might be a sensible behavior, but it's a very surprising one. Conversely, if I had no dub.settings.json, dub would always use dmd regardless of what --compiler I provide.
Issue 2: What are those -extern-std=c++14 -preview=in -extern-std=c++14 flags ? The duplication is a tiny thing in the package and can be ignored. But the problem is that the parent package exports the flags as DFLAGS, which always forces the inner invocation to pick it up. That's especially problematic because not everything is propagated. The compiler, for starter, and perhaps the LFLAGS.
Issue 3: To add to the inconsistency, the root path dub seems to use is source/scpp (where the file lives), according to where the object is built. That's a behavior I think is sane, however it contradicts what dub does with the local dub.settings.json.
In short, I think dub some/single/file.d should behave as dub --root some/single/ --single path.d and the parent dflags shouldn't propagate to the child.
The text was updated successfully, but these errors were encountered:
I have the following in my
dub.json
file:Permalink: https://github.com/bpfkorea/agora/blob/952cd01b14778d5ca5e34c049c8217c59037614f/dub.json#L14
This calls a build file that builds a C++ library. The build file itself doesn't use any of
dub
's features, it's only here to be cross platform (becauserdmd
wasn't working well for a reason I forgot).This is literally the package definition of the
build.d
file:Permalink: https://github.com/bpfkorea/agora/blob/952cd01b14778d5ca5e34c049c8217c59037614f/source/scpp/build.d#L1-L7
I put a
-v
in my$DUB
invocation just to see what happens, and lo and behold found a few issues.This is the flags I see when the compiler is invoked:
My original call, in the parent package, was
dub test --compiler=dmd
.dub
points to the one distributed withdmd-2.094.0-beta.1
, through the install script. So by default this bug should selectdmd
, right ?Issue 1:
ldc2
is used. Because mydub.settings.json
usesldc2
as default compiler. Obviously I override this with--compiler
, but the nested one doesn't pick it up. That might be a sensible behavior, but it's a very surprising one. Conversely, if I had nodub.settings.json
,dub
would always usedmd
regardless of what--compiler
I provide.Issue 2: What are those
-extern-std=c++14 -preview=in -extern-std=c++14
flags ? The duplication is a tiny thing in the package and can be ignored. But the problem is that the parent package exports the flags asDFLAGS
, which always forces the inner invocation to pick it up. That's especially problematic because not everything is propagated. The compiler, for starter, and perhaps theLFLAGS
.Issue 3: To add to the inconsistency, the root path
dub
seems to use issource/scpp
(where the file lives), according to where the object is built. That's a behavior I think is sane, however it contradicts whatdub
does with the localdub.settings.json
.In short, I think
dub some/single/file.d
should behave asdub --root some/single/ --single path.d
and the parent dflags shouldn't propagate to the child.The text was updated successfully, but these errors were encountered: