安定性とバージョニング
big-code-analysis is on the 2.x line (currently 2.4.0). The full stability contract lives in STABILITY.md at the root of the repository. That file is the source of truth and is updated alongside the changelog at every release; this page is the summary for library consumers.
The headlines:
- パッチ・マイナーバンプをまたぐ形状の安定性。 STABILITY.md § “What is stable in shape” に列挙されたすべての公開型と関数シグネチャは、
2.x系列を通じて維持されます。追加的変更(新しい項目、新しいLANGバリアント、新しいMetricsErrorバリアント、新しい言語フィーチャ)はマイナーバンプで許可されます。破壊的な形状変更は次のメジャーバンプまで保留され、チェンジログ の3.0.0セクションに (breaking) として記載されます。 - No value stability guarantee within
2.x. A grammar pin bump or a bug fix in a metric definition can shift any metric value on any file in any direction, even across a patch bump. Each such drift is flagged in the changelog. Pin to an exact version (big-code-analysis = "= 2.4.0") if you need bit-for-bit reproducibility across runs. - The minimum supported Rust version (MSRV) is
1.94. Bumping the MSRV is treated as a minor-bump event and is flagged in the changelog under (breaking); see STABILITY.md § MSRV policy. - Escape hatches. The
Nodewrapper exposes itstree_sitter::NodethroughNode::as_tree_sitter(), and thetree_sittercrate is re-exported asbig_code_analysis::tree_sitter.Nodealso carries the accessors the metric walk itself uses (kind,kind_id,child,children,child_by_field_name,utf8_text, the position accessors). Their signatures are shape-stable, but the values they return (node kinds andkind_idnumbers) belong to the pinned grammar and move when it does. Anything reached through those seams follows the pinnedtree-sitterversion rather than our own SemVer. See STABILITY.md § Escape hatches before depending on them. big-code-analysis-astis not a stability surface. Since #1376 the parse and classification layer lives in that separate published crate, which this one pins exactly and releases in lockstep. It appears in yourcargo tree. Nothing in it carries a promise of its own: depend onbig-code-analysisand use what it re-exports.
3.0 に向けて
The breaking changes once staged for 2.0 shipped in 2.0.0: the #[non_exhaustive] markers on the open public enums and the per-metric Stats structs, the serialized-key normalization, the integer-metric u64 shift, the language-dispatch and grammar defaults, the Python and REST surface changes, and a consolidated metric-value re-baseline folding in the drift accumulated since 1.0. The path-positional callback dispatch (action / the Callback trait), the free metrics / metrics_with_options / get_function_spaces / metrics_from_tree / get_ops functions, and the generic Parser<T> / ParserTrait plumbing were removed at the same time; analyze and Ast are now the single analysis seam. Since #1376 Parser, ParserTrait and the per-language parser and tag types live in big-code-analysis-ast, which this crate does not re-export.
No 3.0 is scheduled. The #[non_exhaustive] markers added at 2.0 keep most future additions (new enum variants, new fields) non-breaking, so 2.x is the surface you should depend on. See STABILITY.md § On the 3.0 horizon.