]> git.proxmox.com Git - cargo.git/commitdiff
Merge branch 'master' into doc_versioning
authorCarlos Pérez <37264926+CPerezz@users.noreply.github.com>
Mon, 25 Jan 2021 23:54:30 +0000 (00:54 +0100)
committerGitHub <noreply@github.com>
Mon, 25 Jan 2021 23:54:30 +0000 (00:54 +0100)
1  2 
src/cargo/core/compiler/build_context/mod.rs
src/cargo/core/compiler/build_context/target_info.rs
src/cargo/core/compiler/context/mod.rs
src/cargo/core/compiler/mod.rs
tests/testsuite/clean.rs

index 16166bebf8da920fd24fc00aef466c1caeccb502,c3a3cb78f664e7457587c4e13bed8181eace25ec..df8c7bc0ff020d6b90e028ec27d3307300c68819
@@@ -131,25 -130,8 +131,25 @@@ impl<'a, 'cfg> Context<'a, 'cfg> 
          self.prepare_units()?;
          self.prepare()?;
          custom_build::build_map(&mut self)?;
-         self.check_collistions()?;
+         self.check_collisions()?;
  
 +        // We need to make sure that if there were any previous docs
 +        // already compiled, they were compiled with the same Rustc version that we're currently
 +        // using. Otherways we must remove the `doc/` folder and compile again forcing a rebuild.
 +        //
 +        // This is important because the `.js`/`.html` & `.css` files that are generated by Rustc don't have
 +        // any versioning (See https://github.com/rust-lang/cargo/issues/8461).
 +        // Therefore, we can end up with weird bugs and behaviours if we mix different
 +        // compiler versions of these files.
 +        let doc_dir = self.files().host_root().join("doc");
 +        let (fingerprint, doc_dir_removed) = RustDocFingerprint::check_rustdoc_fingerprint(
 +            &doc_dir,
 +            self.bcx.rustc().verbose_version.as_str(),
 +        )?;
 +        if doc_dir_removed {
 +            fingerprint.write(&doc_dir)?
 +        };
 +
          for unit in &self.bcx.roots {
              // Build up a list of pending jobs, each of which represent
              // compiling a particular package. No actual work is executed as
Simple merge
Simple merge