File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -245,12 +245,7 @@ fn render_suggestions(
245245 let mut sources: HashMap < _ , _ > = source_ids
246246 . into_iter ( )
247247 . filter_map ( |sid| {
248- let unlocked = sid. clone ( ) . with_precise ( None ) ;
249- let mut source = map. load ( unlocked, & HashSet :: new ( ) ) . ok ( ) ?;
250- // Ignore errors updating.
251- if let Err ( e) = source. update ( ) {
252- log:: debug!( "failed to update source: {:?}" , e) ;
253- }
248+ let source = map. load ( sid, & HashSet :: new ( ) ) . ok ( ) ?;
254249 Some ( ( sid, source) )
255250 } )
256251 . collect ( ) ;
Original file line number Diff line number Diff line change @@ -325,6 +325,15 @@ fn suggestions_for_updates() {
325325 . file ( "src/lib.rs" , "" )
326326 . publish ( ) ;
327327
328+ // This is a hack to force cargo to update the index. Cargo can't do this
329+ // automatically because doing a network update on every build would be a
330+ // bad idea. Under normal circumstances, we'll hope the user has done
331+ // something else along the way to trigger an update (building some other
332+ // project or something). This could use some more consideration of how to
333+ // handle this better (maybe only trigger an update if it hasn't updated
334+ // in a long while?).
335+ p. cargo ( "update -p without_updates" ) . run ( ) ;
336+
328337 p. cargo ( "check -Zfuture-incompat-report" )
329338 . masquerade_as_nightly_cargo ( )
330339 . with_stderr_contains ( "[..]cargo report future-incompatibilities --id 1[..]" )
You can’t perform that action at this time.
0 commit comments