Skip to content

Commit 492f5bf

Browse files
authored
[ty] Remove countme from salsa-structs (astral-sh#19257)
1 parent 934aaa2 commit 492f5bf

File tree

10 files changed

+20
-67
lines changed

10 files changed

+20
-67
lines changed

Cargo.lock

Lines changed: 19 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ty/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ argfile = { workspace = true }
2626
clap = { workspace = true, features = ["wrap_help", "string", "env"] }
2727
clap_complete_command = { workspace = true }
2828
colored = { workspace = true }
29-
countme = { workspace = true, features = ["enable"] }
3029
crossbeam = { workspace = true }
3130
ctrlc = { version = "3.4.4" }
3231
indicatif = { workspace = true }

crates/ty/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ fn run_check(args: CheckCommand) -> anyhow::Result<ExitStatus> {
5959
set_colored_override(args.color);
6060

6161
let verbosity = args.verbosity.level();
62-
countme::enable(verbosity.is_trace());
6362
let _guard = setup_tracing(verbosity, args.color.unwrap_or_default())?;
6463

6564
tracing::warn!(
@@ -152,8 +151,6 @@ fn run_check(args: CheckCommand) -> anyhow::Result<ExitStatus> {
152151
_ => {}
153152
}
154153

155-
tracing::trace!("Counts for entire CLI run:\n{}", countme::get_all());
156-
157154
std::mem::forget(db);
158155

159156
if exit_zero {
@@ -353,8 +350,6 @@ impl MainLoop {
353350
"Discarding check result for outdated revision: current: {revision}, result revision: {check_revision}"
354351
);
355352
}
356-
357-
tracing::trace!("Counts after last check:\n{}", countme::get_all());
358353
}
359354

360355
MainLoopMessage::ApplyChanges(changes) => {

crates/ty_python_semantic/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ bitflags = { workspace = true }
2929
camino = { workspace = true }
3030
colored = { workspace = true }
3131
compact_str = { workspace = true }
32-
countme = { workspace = true }
3332
drop_bomb = { workspace = true }
3433
get-size2 = { workspace = true }
3534
indexmap = { workspace = true }

crates/ty_python_semantic/src/semantic_index/builder.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
259259
.push(UseDefMapBuilder::new(is_class_scope));
260260
let ast_id_scope = self.ast_ids.push(AstIdsBuilder::default());
261261

262-
let scope_id = ScopeId::new(self.db, self.file, file_scope_id, countme::Count::default());
262+
let scope_id = ScopeId::new(self.db, self.file, file_scope_id);
263263

264264
self.scope_ids_by_scope.push(scope_id);
265265
let previous = self.scopes_by_node.insert(node.node_key(), file_scope_id);
@@ -495,7 +495,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
495495
place,
496496
kind,
497497
is_reexported,
498-
countme::Count::default(),
499498
);
500499

501500
let num_definitions = {
@@ -731,7 +730,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
731730
subject,
732731
kind,
733732
guard,
734-
countme::Count::default(),
735733
);
736734
let predicate = PredicateOrLiteral::Predicate(Predicate {
737735
node: PredicateNode::Pattern(pattern_predicate),
@@ -781,7 +779,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
781779
AstNodeRef::new(self.module, expression_node),
782780
assigned_to.map(|assigned_to| AstNodeRef::new(self.module, assigned_to)),
783781
expression_kind,
784-
countme::Count::default(),
785782
);
786783
self.expressions_by_node
787784
.insert(expression_node.into(), expression);
@@ -986,7 +983,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
986983
// Note `target` belongs to the `self.module` tree
987984
AstNodeRef::new(self.module, target),
988985
UnpackValue::new(unpackable.kind(), value),
989-
countme::Count::default(),
990986
));
991987
Some(unpackable.as_current_assignment(unpack))
992988
}

crates/ty_python_semantic/src/semantic_index/definition.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ pub struct Definition<'db> {
4040

4141
/// This is a dedicated field to avoid accessing `kind` to compute this value.
4242
pub(crate) is_reexported: bool,
43-
44-
count: countme::Count<Definition<'static>>,
4543
}
4644

4745
// The Salsa heap is tracked separately.

crates/ty_python_semantic/src/semantic_index/expression.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ pub(crate) struct Expression<'db> {
5858

5959
/// Should this expression be inferred as a normal expression or a type expression?
6060
pub(crate) kind: ExpressionKind,
61-
62-
count: countme::Count<Expression<'static>>,
6361
}
6462

6563
// The Salsa heap is tracked separately.

crates/ty_python_semantic/src/semantic_index/place.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,6 @@ pub struct ScopeId<'db> {
441441
pub file: File,
442442

443443
pub file_scope_id: FileScopeId,
444-
445-
count: countme::Count<ScopeId<'static>>,
446444
}
447445

448446
// The Salsa heap is tracked separately.

crates/ty_python_semantic/src/semantic_index/predicate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ pub(crate) struct PatternPredicate<'db> {
138138
pub(crate) kind: PatternPredicateKind<'db>,
139139

140140
pub(crate) guard: Option<Expression<'db>>,
141-
142-
count: countme::Count<PatternPredicate<'static>>,
143141
}
144142

145143
// The Salsa heap is tracked separately.

crates/ty_python_semantic/src/unpack.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ pub(crate) struct Unpack<'db> {
4444
/// The ingredient representing the value expression of the unpacking. For example, in
4545
/// `(a, b) = (1, 2)`, the value expression is `(1, 2)`.
4646
pub(crate) value: UnpackValue<'db>,
47-
48-
count: countme::Count<Unpack<'static>>,
4947
}
5048

5149
impl<'db> Unpack<'db> {

0 commit comments

Comments
 (0)