[build2] publishing packages with external tests

Boris Kolpackov boris at codesynthesis.com
Thu Mar 12 09:32:42 UTC 2020


[CC'ing users at build2.org]

Markus Pawellek <markuspawellek at gmail.com> writes:

> On Tue, Mar 10, 2020 at 2:29 PM Boris Kolpackov <boris at codesynthesis.com> wrote:
> >
> > I don't know if you have noticed (you should have received a bunch of
> > "build error" emails), your pxart submission fails to build because
> > you haven't also submitted the pxart-tests package:
> >
> > https://queue.cppget.org/pxart/0.1.0-a.1
> >
> > If you submit it, I can push your package to public.
> >
> > Also, for the future, from bdep-publish(1):
> >
> > "If no project or package directory is specified, then the current working
> > directory is assumed. [...] If the specified directory is a project directory,
> > then all the packages in the project are published."
> >
> > So if you run bdep-publish from the root of your project, it should
> > automatically submit everything.
>
> My current problem is the following:
> I have a project repository, called 'pxart', containing the four
> packages 'pxart', 'pxart-tests', 'pxart-benchmarks', and 'pxrun'
> (https://github.com/lyrahgames/pxart).
> I have chosen this specific package scheme to be able to have
> different dependencies for the different packages, such as no
> dependencies for the package 'pxart' and the dependency 'doctest' for
> the package 'pxart-tests'.

Yes, that's one of the two main reasons why we've added support for
having tests as an external package (the other is that the tests may
have to be built in a different configuration, as is the case, for
example, for build system modules).


> Until now if I wanted to test the 'pxart' package with 'bdep ci', the
> entry in the manifest file of 'pxart' linking its tests to the package
> 'pxart-tests' in the same project was enough for the CI environment to
> find the package in the same repository.
> Additionally, I only wanted to publish the package 'pxart' with the
> corresponding library and not its tests, benchmarks, and so on.
> So the other packages would not be available through cppget.org.
> Therefore I thought it would be the best to submit only the package
> containing the library itself.

Generally, it is a good idea to publish at least the tests package so
that those who want to verify the functionality of the package can get
the extra dependencies and run the tests.

Is there a reason why you would not want to publish them?



More information about the users mailing list