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
On the webpage of code.dlang.org is an example for a situation where a project shall simply boundle multiple subprojects. This example does not work. Dub refuses to build the parent project if the buildType is none and complains "Error executing command build: main package must have a binary target type, not none. Cannot build." The second approach has the same error. Changing the targetType of the parent to a binary type like executable fails as there are no source files in the parent directory.
Tested on Win7 64bit with dub version 0.9.22
The text was updated successfully, but these errors were encountered:
I've encountered this issue as well, and I think the cause for this is that there's a conflict in philosophy. Some people, such as me, are used to make files where the command make is usually synonymous with make all, so coming from that to the dub world, we try to replicate this behaviour so that dub build would, by default, build all sub-packages.
To achieve this, one logically makes the main package empty and adds all sub-packages as dependencies, however, the above mentioned failure occurs. Additionally, this isn't all that pretty since technically the sub-packages aren't really required dependencies of the main package. We just specify them as such because we want them to be built when using dub build.
In my use-case, I have a library which comes with a bunch of utilities. I now have moved the library into the main package, and all the utilities are sub-packages. This allows one to dub build, but unfortunately means all the sub-packages need to be built one-by-one. Having something like dub build --all or making dub build default to compiling all sub-packages would probably cover a lot of cases where somebody would want to use an empty main package.
On the webpage of code.dlang.org is an example for a situation where a project shall simply boundle multiple subprojects. This example does not work. Dub refuses to build the parent project if the
buildTypeisnoneand complains "Error executing command build: main package must have a binary target type, not none. Cannot build." The second approach has the same error. Changing thetargetTypeof the parent to a binary type likeexecutablefails as there are no source files in the parent directory.Tested on Win7 64bit with dub version 0.9.22
The text was updated successfully, but these errors were encountered: