1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
[]
= "3"
= [
"big-code-analysis-cli",
"big-code-analysis-py",
"big-code-analysis-web",
"xtask",
]
# `xtask` and `big-code-analysis-py` are intentionally excluded from
# `default-members`. `xtask` is a build-time helper that renders man
# pages from the live clap definitions (see `xtask/src/main.rs` and
# `man/`); `big-code-analysis-py` is a PyO3 cdylib that requires
# Python headers and is built via `maturin`, not pure cargo. Both
# build cleanly under `cargo build --workspace`, but a bare
# `cargo build` at the repo root should not pull in artefacts that
# have no shipping counterpart in a Rust-only build.
= [".", "big-code-analysis-cli", "big-code-analysis-web"]
= [
"enums",
"tree-sitter-ccomment",
"tree-sitter-mozcpp",
"tree-sitter-mozjs",
"tree-sitter-preproc",
"tree-sitter-tcl",
]
[]
= "2.0.0"
= "2024"
= "1.94"
= "MPL-2.0"
= "https://github.com/dekobon/big-code-analysis"
= [
"Calixte Denizet <cdenizet@mozilla.com>",
"Elijah Zupancic <elijah@zupancic.name>",
]
# Pins below mirror enums/Cargo.toml. The `enums` crate is excluded from
# this workspace (see [workspace].exclude above) and cannot inherit these
# entries via `.workspace = true`, so any grammar bump here MUST be
# applied to enums/Cargo.toml in lockstep (see recreate-grammars.sh).
[]
= "=0.26.9"
= "=0.25.1"
= "=0.23.5"
= "=0.3.5"
= "=0.25.0"
= "=0.2.2"
= "=0.1.1"
= "=0.23.5"
= "=0.25.0"
= "=1.1.0"
= "=0.5.0"
= "=3.0.2"
= "=1.1.2"
= "=0.24.2"
= "=0.25.0"
= "=0.23.1"
= "=0.24.2"
= "=0.23.2"
# Upstream community C++ grammar backing `LANG::Cpp` since #720 (the
# Mozilla fork `tree-sitter-mozcpp` moved to the opt-in `LANG::Mozcpp`).
# Pinned to mozcpp's exact base so the flip diffs only by the Gecko
# overlay (see #719). Mirror in enums/Cargo.toml.
= "=0.23.4"
# Upstream community C grammar backing the dedicated `LANG::C` since
# #721 (`.c` previously routed through the C++ grammar). Mirror in
# enums/Cargo.toml.
= "=0.24.2"
# Vendored grammar forks. Each is published under a `bca-tree-sitter-*`
# package name (so we do not collide with the upstream Mozilla / community
# crates on crates.io), but the produced Rust crate keeps its original
# `tree_sitter_<lang>` import path via `[lib] name = ...` in the leaf
# manifest. Cargo's `package = ...` alias here means consumer code that
# pulls in the dep as `tree-sitter-<lang>` continues to work unchanged.
# Rationale and the rejected alternatives live on the umbrella
# issue (dekobon/big-code-analysis#149); the operational details
# (publish order, first-bootstrap workflow) live in `RELEASING.md`.
= { = "bca-tree-sitter-ccomment", = "./tree-sitter-ccomment", = "=2.0.0" }
= { = "bca-tree-sitter-mozcpp", = "./tree-sitter-mozcpp", = "=2.0.0" }
= { = "bca-tree-sitter-mozjs", = "./tree-sitter-mozjs", = "=2.0.0" }
= { = "bca-tree-sitter-preproc", = "./tree-sitter-preproc", = "=2.0.0" }
= { = "bca-tree-sitter-tcl", = "./tree-sitter-tcl", = "=2.0.0" }
# PyO3 powers the `big-code-analysis-py` cdylib. Pinned to a major
# series; bumping is a deliberate, separate change because the Bound
# API shape changed across minors.
= "=0.29.0"
= { = "^1.0", = ["derive"] }
= "^1.0"
= "=1.4.0"
= "^3.0"
# Workspace-wide lint posture. The allow set is intentionally minimal
# — additional allows go at file or function level so the carve-out
# stays visible at the affected site rather than weakening the whole
# workspace.
[]
= "warn"
[]
= { = "warn", = -1 }
= "allow"
[]
= "big-code-analysis"
= true
= true
= true
= true
= true
= true
= "https://docs.rs/big-code-analysis/"
= "README.md"
= ["metrics"]
= "Tool to compute and export code metrics"
# Whitelist what ends up in the published .crate. Without this,
# cargo picks up the entire repo — including tests/repositories/
# (30k+ files of real-world corpora used for snapshot tests, ~130
# MiB compressed) and the mdBook source. None of that is needed by
# downstream consumers.
= [
"/src/**/*",
"/Cargo.toml",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
]
[]
= "^1.0"
# `bstr` carries the raw, possibly-non-UTF-8 bytes git stores for paths
# and author identities through the VCS pipeline; UTF-8 conversion is
# deferred to the output boundary with explicit error handling (per the
# path rules in AGENTS.md). Gated behind `vcs-git`.
= { = "^1.12", = true }
= { = "^0.8", = ["crossbeam-channel"] }
= true
# `gix` is the pure-Rust git implementation backing the `vcs-git`
# backend (issue #328). The feature set is deliberately minimal:
# `max-performance-safe` (zlib-ng without `unsafe`), `blob-diff` (line
# churn), `mailmap` (identity canonicalisation), `revision` (rev-walk +
# revspec parsing), `blame` (per-function line→commit attribution,
# issue #329). `index` is listed defensively — `revision`/`mailmap`
# enable it transitively today, so it is pinned to survive a future gix
# refactor that decouples them (the walk itself is tree-to-tree and does
# not read the index/worktree). `sha1` (see below). Gated behind
# `vcs-git`.
= { = "^0.83", = false, = [
"max-performance-safe",
"blob-diff",
"mailmap",
"revision",
"blame",
"index",
# `sha1` enables `gix-hash/sha1`, which gates the `ObjectId` hash
# kind. It is part of gix's default feature set; we pin
# `default-features = false` for a minimal surface, so it must be
# listed explicitly or `gix-hash::Kind` compiles with no variants.
"sha1",
], = true }
= "^0.4"
= "^0.4"
= "^0.2"
= "^0.8"
= "^1.7"
= true
# `float_roundtrip` makes serde_json's float *parser* bit-exact, so a value
# serialized and read back through `wire` (#532) round-trips losslessly
# (the default parser can be off by 1 ULP). Parse-only: serialized output
# is unchanged, so no snapshot churn.
#
# `preserve_order` is deliberately NOT enabled: it would flip every
# `Value::Object` workspace-wide to insertion order, perturbing the frozen
# code-climate / SARIF fingerprint contracts (#559). The text metric dump
# (#674) therefore renders fields in serde_json's default sorted-key order,
# which is deterministic and gives the uniform field set #674 requires.
= { = true, = ["float_roundtrip"] }
# Pinned to match the version already locked transitively via grammar
# crates (Cargo.lock). Used by the GitLab Code Climate writer to
# compute stable per-violation fingerprints.
= "=0.10.9"
# HMAC-SHA256 for the opt-in keyed author-identity hashing
# (`--author-hash-key`, #956). Shares the RustCrypto `digest` 0.10 trait
# family with `sha2`, so it adds no new transitive trait version.
= "=0.12.1"
= "^1.2"
= true
# Grammar crates are gated behind per-language Cargo features (see
# `[features]` below). The default feature set `all-languages` enables
# every grammar so a bare `cargo build` matches the historical
# behaviour; consumers that only need a subset of languages can opt
# into a narrower set with `--no-default-features --features rust,…`.
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
# Per-language Cargo features. `default = ["all-languages"]` keeps the
# library's historical "every grammar compiled in" behaviour for
# callers that take the crate as a black box (the CLI and web crates
# pin to `features = ["all-languages"]` for exactly this reason).
#
# Each language feature pulls in only the grammar crate(s) the
# matching `src/languages/language_*.rs` module needs at runtime — the
# token enums themselves carry no grammar-crate references and stay
# unconditionally compiled, so the `LANG` enum, the per-language
# `*Code` / `*Parser` tags, and the `Tree::new` / `analyze` dispatch
# surface remain identical across feature sets. Disabling a feature
# strips the grammar crate from the dep graph; calling into a
# disabled variant produces `Err(MetricsError::LanguageDisabled(LANG))`
# from every entry point that returns a `Result`.
#
# `cpp`, `c`, and `mozcpp` share the C-family helper crates
# (`tree-sitter-ccomment`, `tree-sitter-preproc`); listing the deps on
# each leaves their union enabled when any of those features is on.
[]
= ["all-languages"]
# Change-history (VCS) metrics (issue #328). `vcs` is the umbrella
# feature mirroring `all-languages`: it turns on every shipped backend.
# `vcs-git` is the one v1 backend (gitoxide). Future backends land as
# additional leaves (`vcs-hg`, `vcs-jj`, …) folded into the umbrella,
# so consumers that opt into `vcs` automatically pick them up without a
# manifest edit. The generic `src/vcs/` types are gated on `vcs-git`
# today because it is the only backend; the gate widens to
# `any(feature = "vcs-git", feature = "vcs-hg", …)` when a second
# backend lands.
= ["vcs-git"]
= ["dep:gix", "dep:bstr"]
= [
"bash",
"c",
"cpp",
"csharp",
"elixir",
"go",
"groovy",
"irules",
"java",
"javascript",
"kotlin",
"lua",
"mozcpp",
"mozjs",
"objc",
"perl",
"php",
"python",
"ruby",
"rust",
"tcl",
"typescript",
]
= ["dep:tree-sitter-bash"]
# Since #720 the `Cpp` LANG variant uses the upstream community
# `tree-sitter-cpp` grammar (see `get_language!(tree_sitter_cpp)` in
# `src/macros.rs`); the Mozilla fork moved to the opt-in `mozcpp`
# feature / `LANG::Mozcpp` below. The `Ccomment` and `Preproc` LANG
# variants are internal C-family helpers (comment stripping +
# preprocessor directives) shared by all three C-family features, so
# `cpp`, `c` (added in #721), and `mozcpp` each pull them. NOTE: the
# `cpp` dep set changed in #720 (`tree-sitter-mozcpp` → `tree-sitter-cpp`)
# — a SemVer break for `--no-default-features` consumers, recorded in
# CHANGELOG under the 2.0 milestone.
# Internal: the C-family comment-stripping (`Ccomment`) and
# preprocessor (`Preproc`) helper variants. Enabled automatically by
# every C-family language feature below (`cpp`, `c`, `mozcpp`) so those
# helper LANG variants are compiled in whenever any C-family grammar is.
# Not meant to be selected on its own — it pulls no user-facing language.
# (Before #721 these crates were listed directly on each C-family
# feature, but the `Ccomment` / `Preproc` LANG variants were gated on
# `cpp` alone, so a `--features c` / `--features mozcpp` build without
# `cpp` had the crates yet disabled the variants — breaking `strip-comments`
# / `preproc` for C-only and Mozcpp-only builds.)
= ["dep:tree-sitter-ccomment", "dep:tree-sitter-preproc"]
= ["dep:tree-sitter-cpp", "c-family-helpers"]
# Dedicated C language (`LANG::C`, upstream `tree-sitter-c`), added in
# #721. Owns `.c`; shares the C-family `ccomment` / `preproc` helpers.
= ["dep:tree-sitter-c", "c-family-helpers"]
# Opt-in Mozilla/Gecko C++ dialect (vendored `tree-sitter-mozcpp` fork,
# `LANG::Mozcpp`). Owns zero file extensions — selected only explicitly
# (`--language mozcpp`, manifest, API), mirroring `mozjs` since #507.
# Enabling `mozcpp` alone therefore analyzes no files by extension.
= ["dep:tree-sitter-mozcpp", "c-family-helpers"]
= ["dep:tree-sitter-c-sharp"]
= ["dep:tree-sitter-elixir"]
= ["dep:tree-sitter-go"]
= ["dep:dekobon-tree-sitter-groovy"]
= ["dep:tree-sitter-irules"]
= ["dep:tree-sitter-java"]
= ["dep:tree-sitter-javascript"]
= ["dep:tree-sitter-kotlin-ng"]
= ["dep:tree-sitter-lua"]
= ["dep:tree-sitter-mozjs"]
# Objective-C (`LANG::Objc`, upstream `tree-sitter-objc`). Owns `.m`;
# `.mm` Objective-C++ stays on `LANG::Cpp` (the ObjC grammar parses C
# but not the C++ half of `.mm` files) — see #724.
= ["dep:tree-sitter-objc"]
= ["dep:tree-sitter-perl"]
= ["dep:tree-sitter-php"]
= ["dep:tree-sitter-python"]
= ["dep:tree-sitter-ruby"]
= ["dep:tree-sitter-rust"]
= ["dep:tree-sitter-tcl"]
= ["dep:tree-sitter-typescript"]
[]
= true
[]
= { = "1.29.0", = ["yaml", "json", "redactions"] }
= "^0.46"
= true
= "^1.3"
= "^0.39"
# Test-only: the integration corpus harness and the concurrent_files
# unit tests walk fixture trees; production code no longer walks (#495).
= "^2.3"
# Test-only: the integration corpus harness builds include/exclude
# globsets to filter the resolved corpus file list; production code no
# longer filters via globsets (the CLI owns the walk seam) (#495).
= "^0.4"
# Test-only: the non-finite serialize-boundary test (#531) renders the
# crate-internal `NonFinite` newtype through every structured output
# format the project supports (JSON via serde_json above, plus these
# three) to pin the uniform null/omit policy across all of them. Versions
# mirror the `big-code-analysis-cli` pins; these crates already sit in the
# workspace graph, so listing them here adds no new resolved dependency.
= "^0.9"
= "^0.2"
= "^1.1"
[]
= 3
[]
= 3
[]
= 3
= "line-tables-only"
= false
= true
= false
= 1
= "unwind"
= false
= false