www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dub and source libraries

reply drug <drug2004 bk.ru> writes:
Currently, if you try to build a package that is a source library, dub 
fails:
```bash
$dub build
Main package must not have target type "sourceLibrary". Cannot build.
```
it fails exactly:
```bash
$echo $?
2
```
But is it the error at all? Shouldn't it be like "Nothing to build" (w/o 
any error) instead of "Cannot build"? For example if you try to build 
all packages in a directory you need to check if the package is a source 
library and that really complicates things.
Aug 11 2021
parent bauss <jj_1337 live.dk> writes:
On Wednesday, 11 August 2021 at 08:24:24 UTC, drug wrote:
 Currently, if you try to build a package that is a source 
 library, dub fails:
 ```bash
 $dub build
 Main package must not have target type "sourceLibrary". Cannot 
 build.
 ```
 it fails exactly:
 ```bash
 $echo $?
 2
 ```
 But is it the error at all? Shouldn't it be like "Nothing to 
 build" (w/o any error) instead of "Cannot build"? For example 
 if you try to build all packages in a directory you need to 
 check if the package is a source library and that really 
 complicates things.
I kinda agree with you. I think it should skip such packages instead.
Aug 11 2021