Skip to content

Commit ad3dff6

Browse files
authored
better debug name for interned query arguments (#837)
* feat: Improve debug name for interned query arguments * Change name again
1 parent 42f1583 commit ad3dff6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

components/salsa-macro-rules/src/setup_tracked_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ macro_rules! setup_tracked_fn {
139139
file: file!(),
140140
line: line!(),
141141
};
142-
const DEBUG_NAME: &'static str = "Configuration";
142+
const DEBUG_NAME: &'static str = concat!(stringify!($fn_name), "::interned_arguments");
143143

144144
type Fields<$db_lt> = ($($input_ty),*);
145145

tests/cycle_output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ fn revalidate_no_changes() {
141141
[
142142
"salsa_event(DidSetCancellationFlag)",
143143
"salsa_event(DidValidateMemoizedValue { database_key: read_value(Id(403)) })",
144-
"salsa_event(DidReinternValue { key: Configuration(Id(800)), revision: R2 })",
144+
"salsa_event(DidReinternValue { key: query_d::interned_arguments(Id(800)), revision: R2 })",
145145
"salsa_event(DidValidateMemoizedValue { database_key: query_d(Id(800)) })",
146146
"salsa_event(DidValidateMemoizedValue { database_key: query_b(Id(0)) })",
147-
"salsa_event(DidReinternValue { key: Configuration(Id(800)), revision: R2 })",
147+
"salsa_event(DidReinternValue { key: query_d::interned_arguments(Id(800)), revision: R2 })",
148148
"salsa_event(DidValidateMemoizedValue { database_key: query_a(Id(0)) })",
149149
"salsa_event(DidValidateMemoizedValue { database_key: query_b(Id(0)) })",
150150
]"#]]);
@@ -171,7 +171,7 @@ fn revalidate_with_change_after_output_read() {
171171
[
172172
"salsa_event(DidSetCancellationFlag)",
173173
"salsa_event(DidValidateMemoizedValue { database_key: read_value(Id(403)) })",
174-
"salsa_event(DidReinternValue { key: Configuration(Id(800)), revision: R2 })",
174+
"salsa_event(DidReinternValue { key: query_d::interned_arguments(Id(800)), revision: R2 })",
175175
"salsa_event(WillExecute { database_key: query_d(Id(800)) })",
176176
"salsa_event(WillExecute { database_key: query_a(Id(0)) })",
177177
"salsa_event(DidValidateMemoizedValue { database_key: read_value(Id(400)) })",

tests/preverify-struct-with-leaked-data-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn test_leaked_inputs_ignored() {
6464
[
6565
"WillCheckCancellation",
6666
"WillExecute { database_key: function(Id(0)) }",
67-
"DidInternValue { key: Configuration(Id(800)), revision: R1 }",
67+
"DidInternValue { key: counter_field::interned_arguments(Id(800)), revision: R1 }",
6868
"WillCheckCancellation",
6969
"WillExecute { database_key: counter_field(Id(800)) }",
7070
]"#]]);
@@ -83,7 +83,7 @@ fn test_leaked_inputs_ignored() {
8383
[
8484
"DidSetCancellationFlag",
8585
"WillCheckCancellation",
86-
"DidReinternValue { key: Configuration(Id(800)), revision: R2 }",
86+
"DidReinternValue { key: counter_field::interned_arguments(Id(800)), revision: R2 }",
8787
"WillCheckCancellation",
8888
"WillExecute { database_key: counter_field(Id(800)) }",
8989
"WillExecute { database_key: function(Id(0)) }",

0 commit comments

Comments
 (0)