rust/src/libsyntax
bors f3fc547194 Auto merge of #41709 - michaelwoerister:close-metadata-ich-holes, r=nikomatsakis
incr.comp.: Hash more pieces of crate metadata to detect changes there.

This PR adds incr. comp. hashes for non-`Entry` pieces of data in crate metadata.

The first part of it I like: `EntryBuilder` is refactored into the more generally applicable `IsolatedEncoder` which provides means of encoding something into metadata while also feeding the encoded data into an incr. comp. hash. We already did this for `Entry`, now we are doing it for various other pieces of data too, like the set of exported symbols and so on. The hashes generated there are persisted together with the per-`Entry` hashes and are also used for dep-graph dirtying the same way.

The second part of the PR I'm not entirely happy with: In order to make sure that we don't forget registering a read to the new `DepNodes` introduced here, I added the `Tracked<T>` struct. This struct wraps a value and requires a `DepNode` when accessing the wrapped value. This makes it harder to overlook adding read edges in the right places and works just fine.
However, crate metadata is already used in places where there is no `tcx` yet or even in places where no `cnum` has been assigned -- this makes it harder to apply this feature consistently or implement it ergonomically. The result is not too bad but there's a bit more code churn and a bit more opportunity to get something wrong than I would have liked. On the other hand, wrapping things in `Tracked<T>` already has revealed some bugs, so there's definitely some value in it.

This is still a work in progress:
- [x] I need to write some test cases.
- [x] Accessing the CodeMap should really be dependency tracked too, especially with the new path-remapping feature.

cc @nikomatsakis
2017-05-09 11:55:37 +00:00
..
diagnostics Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
ext Rollup merge of #41520 - estebank:trace-macro, r=nikomatsakis 2017-05-08 22:34:47 -04:00
parse Rollup merge of #41827 - qnighy:allow-bare-cr-in-nondoc-comment, r=estebank 2017-05-08 22:34:49 -04:00
print fix the easy features in libsyntax 2017-05-07 01:20:15 -07:00
util Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
abi.rs Add support for x86-interrupt calling convention 2017-03-02 19:01:15 +01:00
ast.rs support default impl for specialization 2017-04-24 10:08:48 +00:00
attr.rs Remove need for &format!(...) or &&"" dances in span_label calls 2017-05-08 12:56:15 +02:00
Cargo.toml fix the easy features in libsyntax 2017-05-07 01:20:15 -07:00
codemap.rs incr.comp.: Hash more pieces of crate metadata to detect changes there. 2017-05-08 12:31:26 +02:00
config.rs Liberalize attributes. 2017-03-14 04:39:21 +00:00
diagnostic_list.rs Added feature gate, updated error messages and tests. 2017-04-21 07:37:10 +10:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs support default impl for specialization 2017-04-26 14:43:09 +00:00
fold.rs support default impl for specialization 2017-04-24 10:08:48 +00:00
json.rs Auto merge of #40851 - oli-obk:multisugg, r=jonathandturner 2017-05-02 01:04:27 +00:00
lib.rs fix the easy features in libsyntax 2017-05-07 01:20:15 -07:00
ptr.rs Introduce HashStable trait and base ICH implementations on it. 2017-04-06 16:01:51 +02:00
show_span.rs annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor 2016-12-06 11:28:51 +01:00
std_inject.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Add Options type in libtest and remove argument 2017-05-05 10:52:10 +02:00
test_snippet.rs Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
tokenstream.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
visit.rs support default impl for specialization 2017-04-24 10:08:48 +00:00