-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Rustdoc versioning checks #8640
Commits on Aug 22, 2020
-
This intends to be a helper structure similar to `RustTargetData` which includes helper functions which are useful for interacting with the rustdoc fingerprint files among other things.
Configuration menu - View commit details
-
Copy full SHA for 5035321 - Browse repository at this point
Copy the full SHA 5035321View commit details -
Impl remove_doc_directory function
Sometimes we need to remove the `doc/` directory (if exists) in order to not mix different versions of the js/html/css files that Rustc autogenerates and lack versioning.
Configuration menu - View commit details
-
Copy full SHA for c70c2cc - Browse repository at this point
Copy the full SHA c70c2ccView commit details -
Implement Rustdoc versioning checks
Before compiling, 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. This is important because as stated in rust-lang#8461 the .js/.html&.css files that are generated by Rustc don't have any versioning. Therefore, we can fall in weird bugs and behaviours if we mix different compiler versions of these js/.html&.css files.
Configuration menu - View commit details
-
Copy full SHA for 51d3050 - Browse repository at this point
Copy the full SHA 51d3050View commit details
Commits on Sep 20, 2020
-
Fail when dealing with io fails
Is the user does not have permissions or a folder/file can't be created or deleted, Cargo will fail and return an Error indicating the problem.
Configuration menu - View commit details
-
Copy full SHA for e38c3ac - Browse repository at this point
Copy the full SHA e38c3acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a5f784 - Browse repository at this point
Copy the full SHA 7a5f784View commit details
Commits on Dec 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 87c1f6c - Browse repository at this point
Copy the full SHA 87c1f6cView commit details -
After refactoring what was done on the latest approach this time we included the rustdoc versioning logic inside the `compiler::rustdoc` fn. - Created `RustDocFingerprint` struct so that is easier to manage all of the logic & functions related to rustdoc versioning as well as scaling it in the future if needed.
Configuration menu - View commit details
-
Copy full SHA for 65f17e1 - Browse repository at this point
Copy the full SHA 65f17e1View commit details -
Add tests for rustdoc fingerprint impl
- Check wether the fingerprint is created with the correct data after a `rustdoc` execution. - Check wether the previous docs are removed if the version used to compile them reported in the fingerprint is different from the actual one being used by the compiler.
Configuration menu - View commit details
-
Copy full SHA for 2fea14e - Browse repository at this point
Copy the full SHA 2fea14eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 31ef7af - Browse repository at this point
Copy the full SHA 31ef7afView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebd0d58 - Browse repository at this point
Copy the full SHA ebd0d58View commit details
Commits on Dec 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 994ccec - Browse repository at this point
Copy the full SHA 994ccecView commit details
Commits on Jan 25, 2021
-
Move rustdoc fingerprint checks earlier
As @ehuss suggested, we should only execute once the rustdoc fingerprint check per build, not once per dep. Therefore the checks have been moved to an earlier stage.
Configuration menu - View commit details
-
Copy full SHA for 33a5248 - Browse repository at this point
Copy the full SHA 33a5248View commit details -
Create dirs if needed before f_p write call
Once `RustDocFingerprint::check_rustdoc_fingerprint()` is executed it might happen that the `doc/` dir is removed. This means that when we call `fingerprint.write()` we need to create the `doc` directory again.
Configuration menu - View commit details
-
Copy full SHA for 94519f2 - Browse repository at this point
Copy the full SHA 94519f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27987b6 - Browse repository at this point
Copy the full SHA 27987b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47e19f0 - Browse repository at this point
Copy the full SHA 47e19f0View commit details
Commits on Jan 26, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8ddc56f - Browse repository at this point
Copy the full SHA 8ddc56fView commit details
Commits on Jan 27, 2021
-
Address latest reivew suggestions
- Instead of `fs` we use the `utils::paths` functions to interact with the filesystem. - The doc fingerprint is now stored under `target/` instead of `target/doc/`. - The code in `compile` has been reduced to a single function call.
Configuration menu - View commit details
-
Copy full SHA for d2572a2 - Browse repository at this point
Copy the full SHA d2572a2View commit details
Commits on Jan 31, 2021
-
Check target-dependant doc folders
When checking the fingerprint for rustdoc and applying the corresponding logic, we don't only need to consider the `target/doc` folder (Host target) but also triple targets. So now the actual compilation targets are checked during the rustdoc_fingerprint processing and they're treated as the Host/doc folder.
Configuration menu - View commit details
-
Copy full SHA for 7c45021 - Browse repository at this point
Copy the full SHA 7c45021View commit details
Commits on Feb 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for cb21e64 - Browse repository at this point
Copy the full SHA cb21e64View commit details
Commits on Feb 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3c93f6c - Browse repository at this point
Copy the full SHA 3c93f6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1af0027 - Browse repository at this point
Copy the full SHA 1af0027View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bfb3d0 - Browse repository at this point
Copy the full SHA 7bfb3d0View commit details -
We should try to avoid dealing with paths ourseleves. Now the access/parsing and construction is handled via `Layout`.
Configuration menu - View commit details
-
Copy full SHA for e78f91c - Browse repository at this point
Copy the full SHA e78f91cView commit details
Commits on Feb 4, 2021
-
Improve RustDocFingerprint::remove_doc_dirs
We were not filtering the cases where the doc folder paths did not exist. Also, we were overrwriting the error when it doesn't make sense. We now return the first one by folding the results of the doc_dirs removal resolutions.
Configuration menu - View commit details
-
Copy full SHA for 4afa585 - Browse repository at this point
Copy the full SHA 4afa585View commit details
Commits on Feb 13, 2021
-
Update src/cargo/core/compiler/build_context/target_info.rs
Co-authored-by: Eric Huss <eric@huss.org>
Configuration menu - View commit details
-
Copy full SHA for 61c2332 - Browse repository at this point
Copy the full SHA 61c2332View commit details