github rizsotto/Bear 4.2.3

4 hours ago

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 Linux armflang, and Embarcadero C++Builder bcc64x,
    bcc64 and bcc32x.
  • Error messages read like the rest of a build log - errors that stop
    Bear before the build starts used to print Rust's default Error: ...
    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 empty compile_commands.tmp behind (#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 *.tmp or 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 the sh -c execution Bear reports itself, not the grandchild a
    static busybox shell never loads the preload library into. The exec*p
    empty-environment runs get a PATH that contains echo, 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 example f95 mapped to flang).
  • Spell checking moved from codespell to typos.
  • CI runs CodeQL static analysis on every push and pull request.
  • Refreshed Cargo.lock with semver-compatible updates, among them cc
    1.8 and serde-saphyr 1.3. encoding_rs arrives with serde-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 zig as deliberately not recognized (it picks the
    compiler by subcommand, like swift) and no longer list armcl, 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

Don't miss a new Bear release

NewReleases is sending notifications on new releases.