Salsify the crate graph

I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
This commit is contained in:
Chayim Refael Friedman 2025-01-02 01:45:32 +02:00
parent 44f18c3d05
commit c94e9efbef
108 changed files with 3630 additions and 2512 deletions

View file

@ -12,7 +12,7 @@ fn test_derive_empty() {
"DeriveEmpty",
r#"struct S;"#,
expect!["SUBTREE $$ 1 1"],
expect!["SUBTREE $$ 42:2@0..100#2 42:2@0..100#2"],
expect!["SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037"],
);
}
@ -29,12 +29,12 @@ fn test_derive_error() {
LITERAL Str #[derive(DeriveError)] struct S ; 1
PUNCH ; [alone] 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT compile_error 42:2@0..100#2
PUNCH ! [alone] 42:2@0..100#2
SUBTREE () 42:2@0..100#2 42:2@0..100#2
LITERAL Str #[derive(DeriveError)] struct S ; 42:2@0..100#2
PUNCH ; [alone] 42:2@0..100#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT compile_error 42:2@0..100#4294967037
PUNCH ! [alone] 42:2@0..100#4294967037
SUBTREE () 42:2@0..100#4294967037 42:2@0..100#4294967037
LITERAL Str #[derive(DeriveError)] struct S ; 42:2@0..100#4294967037
PUNCH ; [alone] 42:2@0..100#4294967037"#]],
);
}
@ -53,14 +53,14 @@ fn test_fn_like_macro_noop() {
PUNCH , [alone] 1
SUBTREE [] 1 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT ident 42:2@0..5#2
PUNCH , [alone] 42:2@5..6#2
LITERAL Integer 0 42:2@7..8#2
PUNCH , [alone] 42:2@8..9#2
LITERAL Integer 1 42:2@10..11#2
PUNCH , [alone] 42:2@11..12#2
SUBTREE [] 42:2@13..14#2 42:2@14..15#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT ident 42:2@0..5#4294967037
PUNCH , [alone] 42:2@5..6#4294967037
LITERAL Integer 0 42:2@7..8#4294967037
PUNCH , [alone] 42:2@8..9#4294967037
LITERAL Integer 1 42:2@10..11#4294967037
PUNCH , [alone] 42:2@11..12#4294967037
SUBTREE [] 42:2@13..14#4294967037 42:2@14..15#4294967037"#]],
);
}
@ -75,10 +75,10 @@ fn test_fn_like_macro_clone_ident_subtree() {
PUNCH , [alone] 1
SUBTREE [] 1 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT ident 42:2@0..5#2
PUNCH , [alone] 42:2@5..6#2
SUBTREE [] 42:2@7..8#2 42:2@7..8#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT ident 42:2@0..5#4294967037
PUNCH , [alone] 42:2@5..6#4294967037
SUBTREE [] 42:2@7..8#4294967037 42:2@7..8#4294967037"#]],
);
}
@ -91,8 +91,8 @@ fn test_fn_like_macro_clone_raw_ident() {
SUBTREE $$ 1 1
IDENT r#async 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT r#async 42:2@0..7#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT r#async 42:2@0..7#4294967037"#]],
);
}
@ -105,8 +105,8 @@ fn test_fn_like_fn_like_span_join() {
SUBTREE $$ 1 1
IDENT r#joined 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT r#joined 42:2@0..11#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT r#joined 42:2@0..11#4294967037"#]],
);
}
@ -121,10 +121,10 @@ fn test_fn_like_fn_like_span_ops() {
IDENT resolved_at_def_site 1
IDENT start_span 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT set_def_site 41:1@0..150#2
IDENT resolved_at_def_site 42:2@13..33#2
IDENT start_span 42:2@34..34#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT set_def_site 41:1@0..150#4294967037
IDENT resolved_at_def_site 42:2@13..33#4294967037
IDENT start_span 42:2@34..34#4294967037"#]],
);
}
@ -143,14 +143,14 @@ fn test_fn_like_mk_literals() {
LITERAL Integer 123i64 1
LITERAL Integer 123 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
LITERAL ByteStr byte_string 42:2@0..100#2
LITERAL Char c 42:2@0..100#2
LITERAL Str string 42:2@0..100#2
LITERAL Float 3.14f64 42:2@0..100#2
LITERAL Float 3.14 42:2@0..100#2
LITERAL Integer 123i64 42:2@0..100#2
LITERAL Integer 123 42:2@0..100#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
LITERAL ByteStr byte_string 42:2@0..100#4294967037
LITERAL Char c 42:2@0..100#4294967037
LITERAL Str string 42:2@0..100#4294967037
LITERAL Float 3.14f64 42:2@0..100#4294967037
LITERAL Float 3.14 42:2@0..100#4294967037
LITERAL Integer 123i64 42:2@0..100#4294967037
LITERAL Integer 123 42:2@0..100#4294967037"#]],
);
}
@ -164,9 +164,9 @@ fn test_fn_like_mk_idents() {
IDENT standard 1
IDENT r#raw 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT standard 42:2@0..100#2
IDENT r#raw 42:2@0..100#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT standard 42:2@0..100#4294967037
IDENT r#raw 42:2@0..100#4294967037"#]],
);
}
@ -198,27 +198,27 @@ fn test_fn_like_macro_clone_literals() {
PUNCH , [alone] 1
LITERAL CStr null 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
LITERAL Integer 1u16 42:2@0..4#2
PUNCH , [alone] 42:2@4..5#2
LITERAL Integer 2_u32 42:2@6..11#2
PUNCH , [alone] 42:2@11..12#2
PUNCH - [alone] 42:2@13..14#2
LITERAL Integer 4i64 42:2@14..18#2
PUNCH , [alone] 42:2@18..19#2
LITERAL Float 3.14f32 42:2@20..27#2
PUNCH , [alone] 42:2@27..28#2
LITERAL Str hello bridge 42:2@29..43#2
PUNCH , [alone] 42:2@43..44#2
LITERAL Str suffixedsuffix 42:2@45..61#2
PUNCH , [alone] 42:2@61..62#2
LITERAL StrRaw(2) raw 42:2@63..73#2
PUNCH , [alone] 42:2@73..74#2
LITERAL Char a 42:2@75..78#2
PUNCH , [alone] 42:2@78..79#2
LITERAL Byte b 42:2@80..84#2
PUNCH , [alone] 42:2@84..85#2
LITERAL CStr null 42:2@86..93#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
LITERAL Integer 1u16 42:2@0..4#4294967037
PUNCH , [alone] 42:2@4..5#4294967037
LITERAL Integer 2_u32 42:2@6..11#4294967037
PUNCH , [alone] 42:2@11..12#4294967037
PUNCH - [alone] 42:2@13..14#4294967037
LITERAL Integer 4i64 42:2@14..18#4294967037
PUNCH , [alone] 42:2@18..19#4294967037
LITERAL Float 3.14f32 42:2@20..27#4294967037
PUNCH , [alone] 42:2@27..28#4294967037
LITERAL Str hello bridge 42:2@29..43#4294967037
PUNCH , [alone] 42:2@43..44#4294967037
LITERAL Str suffixedsuffix 42:2@45..61#4294967037
PUNCH , [alone] 42:2@61..62#4294967037
LITERAL StrRaw(2) raw 42:2@63..73#4294967037
PUNCH , [alone] 42:2@73..74#4294967037
LITERAL Char a 42:2@75..78#4294967037
PUNCH , [alone] 42:2@78..79#4294967037
LITERAL Byte b 42:2@80..84#4294967037
PUNCH , [alone] 42:2@84..85#4294967037
LITERAL CStr null 42:2@86..93#4294967037"#]],
);
}
@ -239,12 +239,12 @@ fn test_attr_macro() {
LITERAL Str #[attr_error(some arguments)] mod m {} 1
PUNCH ; [alone] 1"#]],
expect![[r#"
SUBTREE $$ 42:2@0..100#2 42:2@0..100#2
IDENT compile_error 42:2@0..100#2
PUNCH ! [alone] 42:2@0..100#2
SUBTREE () 42:2@0..100#2 42:2@0..100#2
LITERAL Str #[attr_error(some arguments)] mod m {} 42:2@0..100#2
PUNCH ; [alone] 42:2@0..100#2"#]],
SUBTREE $$ 42:2@0..100#4294967037 42:2@0..100#4294967037
IDENT compile_error 42:2@0..100#4294967037
PUNCH ! [alone] 42:2@0..100#4294967037
SUBTREE () 42:2@0..100#4294967037 42:2@0..100#4294967037
LITERAL Str #[attr_error(some arguments)] mod m {} 42:2@0..100#4294967037
PUNCH ; [alone] 42:2@0..100#4294967037"#]],
);
}