Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

安定性とバージョニング

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 Node wrapper exposes its tree_sitter::Node through Node::as_tree_sitter(), and the tree_sitter crate is re-exported as big_code_analysis::tree_sitter. Node also 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 and kind_id numbers) belong to the pinned grammar and move when it does. Anything reached through those seams follows the pinned tree-sitter version rather than our own SemVer. See STABILITY.md § Escape hatches before depending on them.
  • big-code-analysis-ast is 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 your cargo tree. Nothing in it carries a promise of its own: depend on big-code-analysis and 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.