@@ -102,44 +102,6 @@ fn sync(
102102 }
103103 }
104104
105- // First up attempt to work around rust-lang/cargo#5956. Apparently build
106- // artifacts sprout up in Cargo's global cache for whatever reason, although
107- // it's unsure what tool is causing these issues at this time. For now we
108- // apply a heavy-hammer approach which is to delete Cargo's unpacked version
109- // of each crate to start off with. After we do this we'll re-resolve and
110- // redownload again, which should trigger Cargo to re-extract all the
111- // crates.
112- //
113- // Note that errors are largely ignored here as this is a best-effort
114- // attempt. If anything fails here we basically just move on to the next
115- // crate to work with.
116- for ws in workspaces {
117- let ( packages, resolve) =
118- ops:: resolve_ws ( ws) . with_context ( || "failed to load pkg lockfile" ) ?;
119-
120- packages
121- . get_many ( resolve. iter ( ) )
122- . with_context ( || "failed to download packages" ) ?;
123-
124- for pkg in resolve. iter ( ) {
125- // Don't delete actual source code!
126- if pkg. source_id ( ) . is_path ( ) {
127- if let Ok ( path) = pkg. source_id ( ) . url ( ) . to_file_path ( ) {
128- if let Ok ( path) = try_canonicalize ( path) {
129- to_remove. remove ( & path) ;
130- }
131- }
132- continue ;
133- }
134- if pkg. source_id ( ) . is_git ( ) {
135- continue ;
136- }
137- if let Ok ( pkg) = packages. get_one ( pkg) {
138- drop ( fs:: remove_dir_all ( pkg. manifest_path ( ) . parent ( ) . unwrap ( ) ) ) ;
139- }
140- }
141- }
142-
143105 let mut checksums = HashMap :: new ( ) ;
144106 let mut ids = BTreeMap :: new ( ) ;
145107
0 commit comments