Commit 3077131
authored
chore: forbid the locking Id constructors with a clippy lint (#8617)
## Summary
Follow-up to #8614. A `clippy` disallowed-methods lint now forbids
`Id::new` and `Id::new_static` workspace-wide, since both intern into a
globally locked table (`ThreadedRodeo`) on every call. Static
identifiers must use a `CachedId` static instead; the sites that intern
a genuinely dynamic string (proto/flatbuffer deserialization, arrow
extension lookups, Python read contexts, tests) keep `Id::new` behind an
`#[expect(clippy::disallowed_methods, reason = "...")]`. `CachedId`
itself now interns through `Id::new_static`, so it is the single
sanctioned path for static ids.
This is the enforcement half of #8380; #8614 did the migration. It is
stacked on #8614, so it stays a draft until that merges; the shared
migration commit drops out once this is rebased onto a merged #8614.
Refs: #8380
## Testing
`cargo clippy --all-targets` is clean across the edited crates
(`vortex-array`, `vortex-layout`, `vortex-file`, `vortex-ipc`,
`vortex-zstd`, `vortex-python`, `vortex-duckdb`, `vortex-session`), with
`disallowed_methods` and `unfulfilled_lint_expectations` both at zero;
`cargo +nightly fmt --all --check` clean. `vortex-cuda` could not be
built locally (no CUDA toolchain).
---
I'm Korean, so sorry if any wording reads a little awkward.
Signed-off-by: Han Damin <miniex@daminstudio.net>1 parent 4a90e13 commit 3077131
23 files changed
Lines changed: 40 additions & 1 deletion
File tree
- encodings/zstd/src
- vortex-array/src
- aggregate_fn
- arrays/extension/compute
- arrow
- dtype/serde
- expr
- extension/tests
- scalar
- tests
- typed_view/extension
- vortex-duckdb/src/convert
- vortex-ipc/src/messages
- vortex-layout/src
- layouts
- dict
- zoned
- vortex-python-cuda/src
- vortex-python/src
- arrays/py
- serde
- vortex-session/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| 248 | + | |
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
| |||
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| |||
474 | 476 | | |
475 | 477 | | |
476 | 478 | | |
| 479 | + | |
477 | 480 | | |
478 | 481 | | |
479 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| 580 | + | |
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments