about summary refs log tree commit diff
path: root/src/bootstrap/cache.rs
AgeCommit message (Collapse)AuthorLines
2023-04-12remove some unneeded importsKaDiWa-2/+1
2022-12-12🚨 fix unsoundness in bootstrap cache codeMichael Goulet-4/+4
2022-07-02Allow building single crates for the compiler and standard libraryJoshua Nelson-0/+11
- Add `Interned<Vec<String>>` and use it for tail args - Refactor `cache.rs` not to need a separate impl for each internable type
2022-07-02Use generics for interned types rather than copy-pasting implsJoshua Nelson-69/+43
This makes it much simpler to add new interned types, rather than having to add 4+ impl blocks for each type.
2022-06-18Pass all paths to `Step::run` at once when using `ShouldRun::krate`Joshua Nelson-2/+2
This was surprisingly complicated. The main changes are: 1. Invert the order of iteration in `StepDescription::run`. Previously, it did something like: ```python for path in paths: for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_path(path): step.run(builder, set) ``` That worked ok for individual paths, but didn't allow passing more than one path at a time to `Step::run` (since `pathset_for_paths` only had one path available to it). Change it to instead look at the intersection of `paths` and `should_run.paths`: ```python for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_paths(paths): step.run(builder, set) ``` 2. Change `pathset_for_path` to take multiple pathsets. The goal is to avoid `x test library/alloc` testing *all* library crates, instead of just alloc. The changes here are similarly subtle, to use the intersection between the paths rather than all paths in `should_run.paths`. I added a test for the behavior to try and make it more clear. Note that we use pathsets instead of just paths to allow for sets with multiple aliases (*cough* `all_krates` *cough*). See the documentation added in the next commit for more detail. 3. Change `StepDescription::run` to explicitly handle 0 paths. Before this was implicitly handled by the `for` loop, which just didn't excute when there were no paths. Now it needs a check, to avoid trying to run all steps (this is a problem for steps that use `default_condition`). 4. Change `RunDescription` to have a list of pathsets, rather than a single path. 5. Remove paths as they're matched This allows checking at the end that no invalid paths are left over. Note that if two steps matched the same path, this will no longer run both; but that's a bug anyway. 6. Handle suite paths separately from regular sets. Running multiple suite paths at once instead of in separate `make_run` invocations is both tricky and not particularly useful. The respective test Steps already handle this by introspecting the original paths. Avoid having to deal with it by moving suite handling into a seperate loop than `PathSet::Set` checks.
2022-01-01Remove the lazy_static dependency from rustbuildbjorn3-4/+3
Rustbuild already depends on once_cell which in the future can be replaced with std::lazy::Lazy.
2019-12-22Format the worldMark Rousskov-22/+24
2019-10-21Remove unnecessary `Hash` bounds from various types.Nicholas Nethercote-1/+1
2019-08-02Remove some more `cfg(test)`sVadim Petrochenkov-2/+3
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-0/+2
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-3/+3
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-1/+1
2018-11-04Ensure --exclude is checked against PathSet::Suitekennytm-0/+5
Fix the recent spurious 3 hour timeouts.
2018-10-19Derives often have very strict boundsOliver Scherer-1/+9
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-16/+4
2018-07-10Deny bare trait objects in `src/bootstrap`.ljedrz-1/+1
2018-04-03Add tests to rustbuildMark Simulacrum-0/+12
In order to run tests, previous commits have cfg'd out various parts of rustbuild. Generally speaking, these are filesystem-related operations and process-spawning related parts. Then, rustbuild is run "as normal" and the various steps that where run are retrieved from the cache and checked against the expected results. Note that this means that the current implementation primarily tests "what" we build, but doesn't actually test that what we build *will* build. In other words, it doesn't do any form of dependency verification for any crate. This is possible to implement, but is considered future work. This implementation strives to cfg out as little code as possible; it also does not currently test anywhere near all of rustbuild. The current tests are also not checked for "correctness," rather, they simply represent what we do as of this commit, which may be wrong. Test cases are drawn from the old implementation of rustbuild, though the expected results may vary.
2018-04-03Make test steps sortableMark Simulacrum-0/+14
Ensures that test cases will be somewhat easier to write.
2017-07-20Remove deserializeAidan Hobson Sayers-26/+0
2017-07-20Remove outdated FIXME from cacheMark Simulacrum-3/+0
2017-07-20Utilize interning to allow Copy/Clone stepsMark Simulacrum-58/+262
2017-07-20Remove core_intrinsics feature gateMark Simulacrum-19/+9
2017-07-20Add Builder and Step definitions.Mark Simulacrum-0/+102