Bear 4.2.3 is a maintenance release. It recognizes four more compiler
drivers, stops leaving a temp file behind when the build cannot start, and
makes error messages short and consistent. The test suite now also passes
inside the Nix build sandbox.
Features
- More compilers recognized - Intel
icx-cl(the MSVC-compatible
oneAPI driver, so it takes/options and MSVC response files), Arm
Compiler for Linuxarmflang, and Embarcadero C++Builderbcc64x,
bcc64andbcc32x. - Error messages read like the rest of a build log - errors that stop
Bear before the build starts used to print Rust's defaultError: ...
text, often wrapped in internal names such as "Failed to create
consumer" or "Generic IO error". Every diagnostic now uses the
bear: error:format, and an error about a file names the file once,
with the action and the cause, for example
bear: error: cannot write <file>: <cause>. If you match on the old
wording in scripts, update the pattern. Command-line usage errors still
print the usage text.
Bug Fixes
- Output files are written all or nothing - a build command that could
not start left an emptycompile_commands.tmpbehind (#718). Now the
output is committed only when the run ends without an error of Bear's
own. A build that runs and fails still publishes what was captured.- The events file follows the same rule.
- A failed replay no longer replaces a good database.
- The temp file has a random, hidden name next to the output, so it
cannot clash with an output named*.tmpor with another run. - An existing output that is not a regular file, such as
/dev/null,
is written in place instead of being replaced.
Internal Refactoring
- Tests pass in the Nix build sandbox - the popen/system tests now
assert thesh -cexecution Bear reports itself, not the grandchild a
static busybox shell never loads the preload library into. Theexec*p
empty-environment runs get aPATHthat containsecho, and the
parallel test matches the full argv so a compiler wrapper script is not
counted twice. (#717) - A new test pins that a configured
as:family wins over another
family's name match (for examplef95mapped to flang). - Spell checking moved from codespell to typos.
- CI runs CodeQL static analysis on every push and pull request.
- Refreshed
Cargo.lockwith semver-compatible updates, among themcc
1.8 andserde-saphyr1.3.encoding_rsarrives withserde-saphyr
and brings five small crates into the shipped binaries.
Documentation
- Added a security policy (
SECURITY.md): report vulnerabilities
privately through GitHub security advisories. - The requirements list
zigas deliberately not recognized (it picks the
compiler by subcommand, likeswift) and no longer listarmcl, which
the TI family has recognized for a while. - Per-compiler recipe pages are now asked for only when interception
needs extra setup.
Closed Issues
- #718 - compile_commands.tmp left behind when the build command cannot start
Thanks
Thanks to @dmfrpro for the Nix sandbox fixes in #717. They found three
tests that made assumptions about the host which the sandbox does not
hold, and fixed each one without weakening what it checks.
Thanks to the downstream packagers who keep Bear available and current -
chronically invisible work that this project depends on. Everyone below
shipped 4.2.2:
- Alpine - @rtmongold
- Arch, Artix, Manjaro, and Parabola maintainers
- Fedora maintainers
- FreeBSD - aokblast
- Gentoo and LiGurOS - @DarthGandalf, with Gentoo proxy-maint
- Homebrew
- MSYS2
- openSUSE Tumbleweed
- Termux - @nguynkhn
New Contributors
Full Changelog: 4.2.2...4.2.3