build2 | 0.9.0 Release Notes

These notes provide a more detailed discussion of major new features, including the motivation for implementing them and their usage examples. For the complete list of changes, see the Release Announcement or the NEWS files in the individual packages.

Overall, the main focus of this release was "quality of life" improvements. It includes a large number of bug fixes, tweaks to existing features, as well as new features that should all make for a smoother, more pleasant development experience.

With this release we are also starting to support automated upgrades via the package manager of the build2 toolchain itself. While you could do this manually, the install scripts now provide the --upgrade option for the fully automated process. See the Installation Instruction for details.

Build System

The bulk of the work in the build system went into cleaning up, regularizing, and improving the buildfile syntax. One of the notable new features is support for dependency chaining. Now, instead of writing:

exe{foo}: libue{foo}
libue{foo}: cxx{*}

We can do:

exe{foo}: libue{foo}: cxx{*}

Projects created by bdep-new(1) now take full advantage of these improvements.

On the documentation front, the new Diagnostics and Debugging section covers techniques and mechanisms that can help us understand the causes of misbehaving builds.

Project Dependency Manager

The project dependency manager, bdep(1), added the new bdep-release(1) command for managing a project's version during release.

More specifically, this command can be used to automatically change the project's version from snapshot to release (or the other way around), commit this change, tag this commit, and push everything to the remote. Here is an example to give you a sense of the workflow:

$ bdep release --push
releasing:
  package: hello
  current: 0.1.0-a.1.z
  release: 0.1.0
  commit:  yes
  tag:     v0.1.0
  push:    origin/master
continue? [y/n] y
[master 00ed45a] Release version 0.1.0
pushing branch master, tag v0.1.0
To github.com:john-doe/hello.git
   5d5094c..00ed45a  master -> master
 * [new tag]         v0.1.0 -> v0.1.0

See Versioning and Release Management for details and more examples.

Another notable new feature is the binless option for the bdep-new(1) command's c++ language parameter. This option causes the creation of a simpler buildfile for header-only (and, in the future, for module interface-only) libraries. For example:

$ bdep new -t lib -l c++,binless libhello

Package Dependency Manager

The package dependency manager, bpkg(1), added the builds package manifest value that allows specifying the build configuration classes the package should or should not be built for by the CI service. For example, to exclude all Windows builds we can add the following to our manifest:

builds: -windows

See Build Configurations for the list of defined classes as well as the builds manifest value for details and more examples.

Another notable new feature is the support for the ssh:// protocol in the git repository URLs. Plus, the repository type can now be specified in the repository URL's scheme component. For example (notice the lack of the .git extension in the URL):

$ bpkg build git+https://example.org/project