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

Klaim - Joël Lamotte mjklaim at gmail.com
Sun Jul 15 16:37:36 UTC 2018


Hi, here is a weird behavior I found while trying to simulate
evolution of a project.
(I put the versions below)

PS E:\Tests\build2-experiment> bdep new lolilol -t lib
warning: library name does not start with 'lib'
  info: this package may not be acceptable to some repositories
created new library project lolilol in E:\Tests\build2-experiment\lolilol\
PS E:\Tests\build2-experiment> cd .\lolilol\
PS E:\Tests\build2-experiment\lolilol> bdep init -C ../build-msvc cc
config.cxx=cl
initializing in project E:\Tests\build2-experiment\lolilol\
created configuration E:\Tests\build2-experiment\build-msvc\ 1
default,forwarded,auto-synchronized
synchronizing:
  new lolilol/0.1.0-a.0.19700101000000
PS E:\Tests\build2-experiment\lolilol> bdep status
lolilol configured 0.1.0-a.0.19700101000000
PS E:\Tests\build2-experiment\lolilol> bdep new kikoo --package -t exe
created new executable package kikoo in
E:\Tests\build2-experiment\lolilol\kikoo\
PS E:\Tests\build2-experiment\lolilol> bdep status
error: package directory  is not listed in E:\Tests\build2-experiment\lolilol\
PS E:\Tests\build2-experiment\lolilol> bdep init --all
error: package directory  is not listed in E:\Tests\build2-experiment\lolilol\

1. Is this a correct way to use --package?
2. Why do I actually need to use --package? Can't a new project inside
another be automatically considered as another package in the first
package? Or another librayr/exe in the same package?
3. Note that the error message have two spaces between "directory" and
"is" which imply that some name is supposed to appear here. The
message is not clear at all for me so I have no idea what is wrong.

Note that I tried several variants of these commands but always end up
with the same issue.
I also tried to add a configuration only after adding the additional
package in the repository,
but it also failed with the same error on bdep init:

PS E:\Tests\build2-experiment> bdep new lolilol -t lib
warning: library name does not start with 'lib'
  info: this package may not be acceptable to some repositories
created new library project lolilol in E:\Tests\build2-experiment\lolilol\
PS E:\Tests\build2-experiment> cd .\lolilol\
PS E:\Tests\build2-experiment\lolilol> bdep new kikoo --package -t exe
created new executable package kikoo in
E:\Tests\build2-experiment\lolilol\kikoo\
PS E:\Tests\build2-experiment\lolilol> bdep new blah --package -t exe
created new executable package blah in E:\Tests\build2-experiment\lolilol\blah\
PS E:\Tests\build2-experiment\lolilol> bdep init -C ../build-msvc cc
config.cxx=cl
error: package directory  is not listed in E:\Tests\build2-experiment\lolilol\

It seems to work better when I initially created an empty repository:

PS E:\Tests\build2-experiment> bdep new lolilol -t empty
created new empty project lolilol in E:\Tests\build2-experiment\lolilol\
PS E:\Tests\build2-experiment> cd .\lolilol\
PS E:\Tests\build2-experiment\lolilol> bdep new lolilol -t lib --package
warning: library name does not start with 'lib'
  info: this package may not be acceptable to some repositories
created new library package lolilol in
E:\Tests\build2-experiment\lolilol\lolilol\
PS E:\Tests\build2-experiment\lolilol> bdep new kikoo -t exe --package
created new executable package kikoo in
E:\Tests\build2-experiment\lolilol\kikoo\
PS E:\Tests\build2-experiment\lolilol> bdep init -C ../build-msvc cc
config.cxx=cl
initializing in project E:\Tests\build2-experiment\lolilol\
created configuration E:\Tests\build2-experiment\build-msvc\ 1
default,forwarded,auto-synchronized
initializing package lolilol
initializing package kikoo
synchronizing:
  new lolilol/0.1.0-a.0.19700101000000
  new kikoo/0.1.0-a.0.19700101000000

However when trying to imagine how a project might evolve, I think it
is reasonable to assume a project will first start as a exe/library
project, then some other libraries will be added in the same repo (is
adding packages the right abstraction level then?) then maybe authors
will reorganize where each library is in the repository, etc.

A. Joël Lamotte

Last version checked (I saw this issue and took note with 0.7.0 but I
tested with more
recent version today):

PS E:\Tests\build2-experiment\lolilol> bdep --version
bdep 0.8.0-a.0.55682e23af74
libbpkg 0.8.0-a.0.3374ce4f2982
libbutl 0.8.0-a.0.8f63b9971ac6
Copyright (c) 2014-2018 Code Synthesis Ltd
This is free software released under the MIT license.
PS E:\Tests\build2-experiment\lolilol> b --version
build2 0.8.0-a.0.3f2b42c3c01e
libbutl 0.8.0-a.0.8f63b9971ac6
host x86_64-microsoft-win32-msvc14.1
Copyright (c) 2014-2018 Code Synthesis Ltd
This is free software released under the MIT license.
PS E:\Tests\build2-experiment\lolilol> bpkg --version
bpkg 0.8.0-a.0.85d0c04498aa
libbpkg 0.8.0-a.0.3374ce4f2982
libbutl 0.8.0-a.0.8f63b9971ac6
Copyright (c) 2014-2018 Code Synthesis Ltd
This is free software released under the MIT license.



More information about the users mailing list