[build2] Adding a package in a project seems to break the project build

Klaim - Joël Lamotte mjklaim at gmail.com
Wed Jul 18 12:27:13 UTC 2018


On 18 July 2018 at 14:12, Boris Kolpackov <boris at codesynthesis.com> wrote:
> Klaim - Joėl Lamotte <mjklaim at gmail.com> writes:
>
>> By the way, I found a similar but slightly different issue: if I have a
>> package repository, so not-a-package, but I have a buildfile (that build the
>> packages in subdirectories), then when trying to use this repository as a
>> dependency I end up with other errors. Similarly, this should be prevented:
>> having a buildfile in the rood directory of a package repository.
>
> For any reasonably complex build setup (and we are talking C++ here) there
> will be a million bizarre ways to shoot oneself in the foot if one is not
> paying attention. I don't think it is practical to try and diagnose every
> such way. At least let's see if this really becomes a common problem.

I agree in general.
But still I think that having explicitly documented 2 directory kinds
and stating that they are exclusive should imply at least a check
about that before doing any operation.
It looks like there is no other case to check than presence or absence
of packages.manifest vs (buildfile || manifest), and that would be
similar to
the check done by, say git checking if the directory is or not a repository.
So to me it would be a cheap way to avoid early abandons (because
currently the error reports are not always helpful).
Of course if you think that in the long term these directory kinds
could not be exclusive anymore (as I initially thought), that's
another story.

But we'll see I guess.

Joël



More information about the users mailing list