about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/persist/load.rs
AgeCommit message (Collapse)AuthorLines
2025-03-19Pass in dep kind names to the duplicate dep node checkJohn Kåre Alsaker-4/+7
2025-02-21Use StableHasher + Hash64 for dep_tracking_hashBen Kimock-1/+2
2025-02-15Reject macro calls inside of `#![crate_name]`León Orell Valerian Liehr-2/+3
2024-12-06Remove all threading through of ErrorGuaranteed from the driverbjorn3-9/+7
It was inconsistently done (sometimes even within a single function) and most of the rest of the compiler uses fatal errors instead, which need to be caught using catch_with_exit_code anyway. Using fatal errors instead of ErrorGuaranteed everywhere in the driver simplifies things a bit.
2024-12-06Remove 'tcx lifetime from OnDiskCachebjorn3-3/+3
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+5
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-24Run rustfmt on files that need it.Nicholas Nethercote-2/+1
Somehow these files aren't properly formatted. By default `x fmt` and `x tidy` only check files that have changed against master, so if an ill-formatted file somehow slips in it can stay that way as long as it doesn't get modified(?) I found these when I ran `x fmt` explicitly on every `.rs` file in the repo, while working on https://github.com/rust-lang/compiler-team/issues/750.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_incremental`.Nicholas Nethercote-0/+1
2024-05-21PR feedbackBen Kimock-3/+3
2024-05-21Add a footer in FileEncoder and check for it in MemDecoderBen Kimock-4/+17
2024-03-23Encode dep graph edges directly from the previous graph when promotingJohn Kåre Alsaker-1/+2
2024-03-13Make incremental sessions identity no longer depend on the crate names ↵John Kåre Alsaker-8/+4
provided by source code
2024-01-10Rename `{create,emit}_warning` as `{create,emit}_warn`.Nicholas Nethercote-1/+1
For consistency with `warn`/`struct_warn`, and also `{create,emit}_err`, all of which use an abbreviated form.
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-4/+5
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-04Remove unused LoadResult::DecodeIncrCache variantbjorn3-10/+1
2023-10-26Tiny comment fixes.Nicholas Nethercote-1/+1
2023-09-24Don't use a thread to load the dep graphJohn Kåre Alsaker-70/+62
2023-09-21Move `DepKind` to `rustc_query_system` and define it as `u16`John Kåre Alsaker-2/+2
2023-08-13Pass WorkProductMap to build_dep_graph instead of FxIndexMapbjorn3-3/+1
Constructing an FxIndexMap is useless work as the iteration order never matters.
2023-06-05Fixed to_sorted => to_sorted_stable_ordAndrew Xie-1/+1
2023-06-04Fixed failing test + minor cleanupAndrew Xie-1/+1
2023-06-04Switched some uses to UnordMapAndrew Xie-2/+2
2023-06-04Removed use of iteration through a HashMap/HashSet in rustc_incremental and ↵Andrew Xie-3/+3
replaced with IndexMap/IndexSet
2023-05-17Only depend on CFG_VERSION in rustc_interfacejyn-12/+20
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
2023-04-26Remove QueryEngine traitJohn Kåre Alsaker-4/+6
2023-01-30incremental: migrate diagnosticsDavid Wood-30/+24
Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-3/+3
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-06incr: cache dwarf objects in work productsDavid Wood-12/+6
Cache DWARF objects alongside object files in work products when those exist so that DWARF object files are available for thorin in packed mode in incremental scenarios. Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-14Rename rustc_serialize::opaque::Encoder as MemEncoder.Nicholas Nethercote-3/+3
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in #94732 and then was reverted in #97905 because of a perf regression caused by commit 4 in #94732.)
2022-06-10Revert b983e42936feab29f6333e9835913afc6b4a394e.Nicholas Nethercote-3/+3
2022-06-08Rename `rustc_serialize::opaque::Encoder` as `MemEncoder`.Nicholas Nethercote-3/+3
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports).
2022-06-06Make saved_file field of WorkProduct non-optionalbjorn3-11/+9
A WorkProduct without a saved file is useless
2022-03-03all: fix some typoscuishuang-1/+1
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-01-22Make `Decodable` and `Decoder` infallible.Nicholas Nethercote-12/+3
`Decoder` has two impls: - opaque: this impl is already partly infallible, i.e. in some places it currently panics on failure (e.g. if the input is too short, or on a bad `Result` discriminant), and in some places it returns an error (e.g. on a bad `Option` discriminant). The number of places where either happens is surprisingly small, just because the binary representation has very little redundancy and a lot of input reading can occur even on malformed data. - json: this impl is fully fallible, but it's only used (a) for the `.rlink` file production, and there's a `FIXME` comment suggesting it should change to a binary format, and (b) in a few tests in non-fundamental ways. Indeed #85993 is open to remove it entirely. And the top-level places in the compiler that call into decoding just abort on error anyway. So the fallibility is providing little value, and getting rid of it leads to some non-trivial performance improvements. Much of this commit is pretty boring and mechanical. Some notes about a few interesting parts: - The commit removes `Decoder::{Error,error}`. - `InternIteratorElement::intern_with`: the impl for `T` now has the same optimization for small counts that the impl for `Result<T, E>` has, because it's now much hotter. - Decodable impls for SmallVec, LinkedList, VecDeque now all use `collect`, which is nice; the one for `Vec` uses unsafe code, because that gave better perf on some benchmarks.
2021-12-10Rollup merge of #91625 - est31:remove_indexes, r=oli-obkMatthias Krüger-1/+1
Remove redundant [..]s
2021-12-09Remove redundant [..]sest31-1/+1
2021-12-07Document all public items in `rustc_incremental`pierwill-2/+15
Also: - Review and edit current docs - Enforce documentation for crate Co-authored-by: r00ster <r00ster91@protonmail.com> Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
2021-11-12Add `-Zassert-incr-state` to assert state of incremental cachepierwill-1/+23
2021-11-09Remove `rustc_incremental::persist::fs::dep_graph_path_from`pierwill-1/+1
2021-08-28Mmap the incremental data instead of reading it.Camille GILLOT-1/+2
2021-07-18Move OnDiskCache to rustc_query_impl.Camille GILLOT-6/+4
2021-06-30Simplify DepGraph creation.Camille GILLOT-6/+9
2021-06-08Do not require the DefPathTable to construct the on-disk cache.Camille GILLOT-6/+2
2021-05-22Get rid of PreviousDepGraph.Camille GILLOT-5/+5
2021-05-12Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillotbors-3/+3
rustc_driver cleanup Best reviewed one commit at a time.
2021-05-02Let load_query_result_cache take a &DefPathTablebjorn3-3/+3
This allows removing a confusing mem::replace in create_global_ctxt
2021-04-27Add [TRACKED_NO_CRATE_HASH] and [SUBSTRUCT] directivesJoshua Nelson-1/+1
This is necessary for options that should invalidate the incremental hash but *not* affect the crate hash (e.g. --remap-path-prefix). This doesn't add `for_crate_hash` to the trait directly because it's not relevant for *types*, only for *options*, which are fields on a larger struct. Instead, it adds a new `SUBSTRUCT` directive for options, which does take a `for_crate_hash` parameter. - Use TRACKED_NO_CRATE_HASH for --remap-path-prefix - Add test that `remap_path_prefix` is tracked - Reduce duplication in the test suite to avoid future churn
2021-03-30Stream the dep-graph to a file.Camille GILLOT-2/+2