github rizsotto/Bear 4.1.0

6 hours ago

What's Changed

Features

  • Shell completions: generate completions for bash, zsh, fish, and elvish
  • Compiler executable paths: preserve full compiler executable path in compilation database; resolve bare executable filenames to absolute paths
  • Install script: new scripts/install.sh with build-time INTERCEPT_LIBDIR validation, replacing manual setup
  • DevContainer: introduce devcontainer for streamlined development environment

Bug Fixes

  • fix: inline va_arg extraction in variadic exec shims for i686 compatibility
  • fix: preserve co-resident LD_PRELOAD libraries during env doctoring
  • fix: restore session env vars in system()/popen() for older glibc
  • fix: unify preload restoration for system()/popen() with exec-family doctoring
  • fix: recover from poisoned mutex in popen/pclose instead of panicking
  • fix: replace panic with TryFrom error for empty Execution arguments
  • fix: return fmt::Error instead of panicking in Configuration Display impl
  • fix: handle Prefix flags with = in name in build-time codegen

Robustness & Stability

  • Replace multiple panic!/unwrap paths with proper error handling (thiserror, TryFrom, fmt::Error)
  • Reimplement system()/popen() on top of posix_spawnp for safer process creation
  • Add hardened interception tests for environment sabotage scenarios
  • Replace serde_yml with serde-saphyr for YAML parsing

Compiler Recognition Overhaul

  • Move compiler flag definitions from Rust source to YAML with build-time code generation
  • Replace per-compiler interpreter structs with a generic FlagBasedInterpreter
  • Auto-generate recognition patterns and ignored-executable lists from YAML schema
  • Match ignored executables by filename instead of full path

Documentation

  • Expanded README with usage guidance, platform info, and limitations
  • Improved INSTALL with prerequisites, package manager instructions, and verification steps
  • Improved CONTRIBUTING with developer workflow and guidelines

Internal Refactoring

  • Split config.rs, infrastructure.rs into module directories
  • Split output module (formats.rs, writers.rs) into focused submodules
  • Centralize envp traversal into envp_iter iterator; consolidate session context
  • Replace empty-string sentinels with Option<String>
  • Extensive new test coverage across output, compiler interpreter, and interception modules

New Contributors

Full Changelog: 4.0.4...4.1.0

Don't miss a new Bear release

NewReleases is sending notifications on new releases.