@@ -73,10 +73,12 @@ pub(crate) fn write_shared(
73
73
// Write shared runs within a flock; disable thread dispatching of IO temporarily.
74
74
let _lock = try_err ! ( flock:: Lock :: new( & lock_file, true , true , true ) , & lock_file) ;
75
75
76
+ let SerializedSearchIndex { index, desc } = build_index ( & krate, & mut Rc :: get_mut ( & mut cx. shared ) . unwrap ( ) . cache , tcx) ;
77
+ write_search_desc ( cx, & krate, & desc) ?; // does not need to be merged; written unconditionally
78
+
76
79
let crate_name = krate. name ( cx. tcx ( ) ) ;
77
80
let crate_name = crate_name. as_str ( ) ; // rand
78
81
let crate_name_json = SortedJson :: serialize ( crate_name) ; // "rand"
79
- let SerializedSearchIndex { index, desc } = build_index ( & krate, & mut Rc :: get_mut ( & mut cx. shared ) . unwrap ( ) . cache , tcx) ;
80
82
let external_crates = hack_get_external_crate_names ( cx) ?;
81
83
let info = CrateInfo {
82
84
src_files_js : PartsAndLocations :: < SourcesPart > :: get ( cx, & crate_name_json) ?,
@@ -89,15 +91,14 @@ pub(crate) fn write_shared(
89
91
90
92
if let Some ( parts_out_dir) = & opt. parts_out_dir {
91
93
let path = parts_out_dir. 0 . clone ( ) ;
92
- write_create_parents ( cx, dbg ! ( path) , serde_json:: to_string ( & info) . unwrap ( ) ) ?;
94
+ write_create_parents ( cx, path, serde_json:: to_string ( & info) . unwrap ( ) ) ?;
93
95
}
94
96
95
97
let mut crates_info = CrateInfo :: read ( & opt. parts_paths ) ?;
96
98
crates_info. push ( info) ;
97
99
98
100
if opt. write_rendered_cci {
99
101
write_static_files ( cx, & opt) ?;
100
- write_search_desc ( cx, & krate, & desc) ?;
101
102
if opt. emit . is_empty ( ) || opt. emit . contains ( & EmitType :: InvocationSpecific ) {
102
103
if cx. include_sources {
103
104
write_rendered_cci :: < SourcesPart > ( cx, opt. read_rendered_cci , & crates_info) ?;
0 commit comments