-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build option to package for specific config #78
Comments
Another suggestion was to make the different build types customizable. It could look similar to this:
The reason I would prefer such an approach is that configurations are meant more for switching between different feature sets/target configurations of a package, mostly useful when used as a library/dependency. Debugging, testing, profiling etc. is meant to be orthogonal to avoid the combinatorial explosion that would otherwise arise. Of course, often the two concepts are not always easy to keep apart (more or less the same problem as the decision to use a configuration vs. making a separate package). Would such a build type customizing approach work in your case? PS: I realize that there is currently one issue with |
I think your proposal is better, and yeah, it'd work in my case. Thanks! |
Very late ping. First of all, this contradicts the documentation: https://code.dlang.org/docs/commandline
Second, it means that it's impossible to inject DFLAGS into a dependency except via config overriding inside the project, so if a project has a version flag then this flag cannot be set when pulling in the project as a dependency. This is a problem with Vibe.d for instance, which has the rather useful |
For example, we have a config like this
https://gist.github.com/QAston/5670098
Intention of the config file is to add some specific version identifiers (could be dependencies, or maybe anything) for building testing executable for a library. Right now dub warns about enforcing a particular build type (using dflag unittest). My proposal is:
adding build="unittest" entry in "tests" config section could have same effect as using --config="tests" --build="unittest" in command line.
The text was updated successfully, but these errors were encountered: