@@ -8,25 +8,6 @@ pub const CODE_INDEX_UUID_NAMESPACE: Uuid = Uuid::from_bytes([
88 0xc0 , 0xde , 0x1d , 0xe0 , 0x00 , 0x00 , 0x40 , 0x00 , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
99] ) ;
1010
11- /// Generate a stable ID for an unresolved same-project callee.
12- #[ allow( dead_code) ]
13- pub fn make_unresolved_callee_id ( project_id : & str , callee_name : & str ) -> String {
14- let key = format ! ( "unresolved:{project_id}:{callee_name}" ) ;
15- Uuid :: new_v5 ( & CODE_INDEX_UUID_NAMESPACE , key. as_bytes ( ) ) . to_string ( )
16- }
17-
18- /// Generate a stable ID for an external call target.
19- #[ allow( dead_code) ]
20- pub fn make_external_symbol_id (
21- project_id : & str ,
22- callee_name : & str ,
23- module : Option < & str > ,
24- ) -> String {
25- let module_key = module. unwrap_or_default ( ) ;
26- let key = format ! ( "external:{project_id}:{module_key}:{callee_name}" ) ;
27- Uuid :: new_v5 ( & CODE_INDEX_UUID_NAMESPACE , key. as_bytes ( ) ) . to_string ( )
28- }
29-
3011/// A code symbol extracted from AST parsing.
3112#[ derive( Debug , Clone , Serialize , Deserialize ) ]
3213pub struct Symbol {
@@ -374,23 +355,6 @@ mod tests {
374355 "c0de1de0-0000-4000-8000-000000000000"
375356 ) ;
376357 }
377-
378- #[ test]
379- fn test_unresolved_callee_id_matches_gobby_contract ( ) {
380- let id = make_unresolved_callee_id ( "proj1" , "foo" ) ;
381- let expected =
382- Uuid :: new_v5 ( & CODE_INDEX_UUID_NAMESPACE , b"unresolved:proj1:foo" ) . to_string ( ) ;
383- assert_eq ! ( id, expected) ;
384- }
385-
386- #[ test]
387- fn test_external_symbol_id_matches_gobby_contract ( ) {
388- let id = make_external_symbol_id ( "proj1" , "foo" , Some ( "pkg.mod" ) ) ;
389- let expected =
390- Uuid :: new_v5 ( & CODE_INDEX_UUID_NAMESPACE , b"external:proj1:pkg.mod:foo" ) . to_string ( ) ;
391- assert_eq ! ( id, expected) ;
392- }
393-
394358 #[ test]
395359 fn test_call_relation_promotes_symbol_targets ( ) {
396360 let call = CallRelation :: new (
0 commit comments