@@ -38,10 +38,10 @@ pub struct Edge {
3838#[ derive( Clone , Debug ) ]
3939struct RemappedEdge {
4040 pub id : Either < usize , tg:: object:: Id > ,
41- pub _path : Option < PathBuf > ,
41+ pub path : Option < PathBuf > ,
4242 pub reference : tg:: Reference ,
4343 pub subpath : Option < PathBuf > ,
44- pub _tag : Option < tg:: Tag > ,
44+ pub tag : Option < tg:: Tag > ,
4545}
4646
4747impl Server {
@@ -114,12 +114,13 @@ impl Server {
114114 paths,
115115 ) )
116116 . await ;
117+ let tag = unify. nodes . get ( & edge. referent ) . unwrap ( ) . tag . clone ( ) ;
117118 let edge = Edge {
118119 index : dependency_index,
119- path : None ,
120+ path : edge . path . clone ( ) ,
120121 reference : reference. clone ( ) ,
121122 subpath : edge. subpath . clone ( ) ,
122- tag : None ,
123+ tag,
123124 } ;
124125 nodes[ index] . edges . push ( edge) ;
125126 }
@@ -309,10 +310,10 @@ impl Server {
309310 } ;
310311 RemappedEdge {
311312 id,
312- _path : edge. path . clone ( ) ,
313+ path : edge. path . clone ( ) ,
313314 reference : edge. reference . clone ( ) ,
314315 subpath : edge. subpath . clone ( ) ,
315- _tag : edge. tag . clone ( ) ,
316+ tag : edge. tag . clone ( ) ,
316317 }
317318 } )
318319 . collect :: < Vec < _ > > ( ) ;
@@ -398,10 +399,10 @@ impl Server {
398399 } ;
399400 RemappedEdge {
400401 id,
401- _path : edge. path . clone ( ) ,
402+ path : edge. path . clone ( ) ,
402403 reference : edge. reference . clone ( ) ,
403404 subpath : edge. subpath . clone ( ) ,
404- _tag : edge. tag . clone ( ) ,
405+ tag : edge. tag . clone ( ) ,
405406 }
406407 } )
407408 . collect :: < Vec < _ > > ( ) ;
@@ -454,14 +455,21 @@ impl Server {
454455 } => ( contents, executable) ,
455456 } ;
456457 // Compute the dependencies, which will be shared in all cases.
458+ let set_path_and_tag = self
459+ . config ( )
460+ . build
461+ . as_ref ( )
462+ . map_or ( false , |build| build. set_path_and_tag ) ;
457463 let dependencies = edges
458464 . into_iter ( )
459465 . map ( |edge| {
466+ let path = set_path_and_tag. then ( || edge. path . clone ( ) ) . flatten ( ) ;
467+ let tag = set_path_and_tag. then ( || edge. tag . clone ( ) ) . flatten ( ) ;
460468 let dependency = tg:: Referent {
461469 item : edge. id ,
462- path : None ,
470+ path,
463471 subpath : edge. subpath ,
464- tag : None ,
472+ tag,
465473 } ;
466474 ( edge. reference , dependency)
467475 } )
0 commit comments