Files
Laszlo NagyandClaude Fable 5 149fcd7720 refactor(semantic): extract semantic into its own crate
With the config dependency gone, the analysis core can live where the
compiler enforces its boundaries. `crates/semantic` now owns compiler
recognition, flag parsing, and the compilers/*.yaml definitions with
their codegen build script; `crates/bear` keeps the application layer
and gains a dependency on it. A back-edge from the driver into the
analysis core is now a dependency cycle rather than a convention.

The crate states a deliberate public API instead of inheriting the
module's blanket visibility. `interpreters::compilers` narrowed to
`pub(crate)`, so `CompilerType`, `CompilerId`, `CompilerInterpreter`,
the interpreter combinators and `IgnoreByPath` are unreachable from
outside; the driver sees only what it uses. The manifest lists what
analysis actually needs, which turned out to exclude serde entirely.

The `testing` module is feature-gated rather than `cfg(test)`, because
a dependency's test code is not compiled for its dependents' tests. The
gate is `any(test, feature = "testing")` so the crate's own fast test
loop still covers the module. `bear` enables the feature as a
dev-dependency; release builds carry no test factories.

Build scripts and scripts that read the YAML directory follow it:
intercept's env-key codegen, the codegen snapshot tests, the docs-site
generator, and the integration build script's rerun trigger.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 10:02:52 +00:00
..