Open mihails-strasuns opened 9 years ago
In a recent commit I removed the dependency on dub for bootstrapping reggae (that's what bootstrap.sh
does now). dub is only needed to run the unit-tests since they depend on unit-threaded
. Likewise, Cucumber is only needed if one wants to run the tests.
For now I don't think I'll do anything about this, if it comes down to including it as part of the distribution I'll have to rethink it.
Sure, it is not really a problem right now, just something to keep in mind for future.
If this tool is to be advertised as a standard build system for D, it needs to be able to build and run tests with minimal to no external dependencies. I know you love cucumber but this can easily become a contribution blocker if project is to be maintained as part of D-Programming-Language organization :)
I second this.
I could always finish the unencumbered work I did and be able to run the feature tests in pure D.
I just tried building reggae from source, ran into a few issues related to this. I guess my environment is non-standard: I don't have a dmd in my path and don't use dub. This causes bootstrap.sh
to fail, first because it can't find dmd, then because it can't find dub. OK, I tried the minimal_bootstrap.sh
after modifying it with the path to my dmd: that worked.
I then tried to build reggae using that minimal reggae and ran into several hard-coded calls to dmd
despite passing --dc=/path/to/my/dmd
. Also, reggaefile.d
references a defaults.d
that doesn't seem to exist. I finally got reggae to run on reggae by using the binary backend, after modifying reggaefile.d
and src/reggae/reggae.d
to call the local dmd and getting rid of the reference to defaults.d
, so that it finally spit out "Nothing to do." :)
@joakim-noah Yeah, that's what happens when I implement something and don't test it on every commit... I'll take a look
@joakim-noah I modified both bootstrap scripts but it'd be hard for me to find all the hard-coded paths myself since I do have dmd in my PATH. Would you be willing to post the error messages? Also, wouldn't it be easier to just add dmd to the PATH?
They're not hard to find.
$ grep -r dmd payload/ src/
payload/reggae/config.d: "dmd",
payload/reggae/dcompile.d://takes a dmd command line and maps arguments to gdc ones
payload/reggae/options.d: if(!dCompiler) dCompiler = environment.get("DC", "dmd");
payload/reggae/options.d: "dc", "D compiler to use (default dmd).", &options.dCompiler,
payload/reggae/package.d:// reggae as a library: tool generated by rdmd
payload/reggae/rules/d.d: calculating which files must be compiled in a similar way to rdmd.
payload/reggae/rules/d.d: immutable compiler = "dmd";
src/reggae/dub/interop.d: immutable dubBuildArgs = ["dub", "--annotate", "build", "--compiler=dmd", "--print-configs"];
src/reggae/reggae.d: ["dmd",
src/reggae/reggae.d: buildBinary(output, options, Binary(buildGenName, ["dmd", "-of" ~ buildGenName] ~ objFiles));
src/reggae/reggae.d: immutable cmd = ["dmd",
src/reggae/reggae.d: "dmd"] ~
I don't add dmd to my path, setting an environment variable to the D compiler I'm currently using instead, then having build scripts refer to that variable. This makes it easy to switch out the D compiler, and I haven't messed much with external build tools like dub or other scripts yet.
Just ran into this again on a different setup: is there any reason why the compiler specified in the build script cannot be passed along to the source? Instead of those four(!) separate calls to dmd in reggae.reggae
, pass the path of the dmd that's being used by either bootstrap script to the source before compiling it, so it always calls that same dmd. If you're worried about the path changing, try the pathless dmd only if the first fails.
The only reason is I was lazy or didn't think about it or assumed things I shouldn't be assuming. Your suggestion makes sense; I don't know when I'll have time to look at this though. You might get it sooner via a PR.
I will submit a PR.
Thanks!
I also ran into this problem when choosing a new build system for a project.
Report at Choose build system , reggae at line 144. Maybe, hopefully, I did something wrong when trying to bootstrap it without an Internet connection.
The bootstrap requires unit-threaded? That's news to me. Did you try the minimal bootstrap script instead?
If this tool is to be advertised as a standard build system for D, it needs to be able to build and run tests with minimal to no external dependencies. I know you love cucumber but this can easily become a contribution blocker if project is to be maintained as part of
D-Programming-Language
organization :)