Skip to content
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

incr.comp.: Implement compiler diagnostic persistence. #45472

Merged
merged 4 commits into from Nov 1, 2017

Conversation

Projects
None yet
6 participants
@michaelwoerister
Copy link
Contributor

michaelwoerister commented Oct 23, 2017

This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache.

It is still work in progress:

  • There's still some documentation to be added.
  • The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.

Diagnostic message duplication is addressed separately in #45519.

r? @nikomatsakis

@michaelwoerister michaelwoerister force-pushed the michaelwoerister:incr-comp-caching-base branch from f63f753 to 2630b93 Oct 24, 2017

@michaelwoerister michaelwoerister force-pushed the michaelwoerister:incr-comp-caching-base branch from 416bff1 to 8769184 Oct 25, 2017

@michaelwoerister michaelwoerister changed the title [WIP] incr.comp.: Implement compiler diagnostic persistence. incr.comp.: Implement compiler diagnostic persistence. Oct 25, 2017

/// This provides access to the incr. comp. on-disk cache for query results.
/// Do not access this directly. It is only meant to be used by
/// `DepGraph::try_mark_green()` and the query infrastructure in `ty::maps`.
pub(crate) on_disk_query_result_cache: maps::OnDiskCache<'tcx>,

This comment has been minimized.

@nikomatsakis

nikomatsakis Oct 30, 2017

Contributor

as an aside, it feels to me like "pub(crate) visibility with scary comment" is a sign that this code is not "well aligned" in terms of module structure. We should review at some point.


// revisions: cfail1 cfail2 cfail3
// compile-flags: -Coverflow-checks=on
// must-compile-successfully

This comment has been minimized.

@nikomatsakis

nikomatsakis Oct 30, 2017

Contributor

this test seems good, but I wish we had some way to guarantee that the warning was coming from the red-green code. e.g., some way to assert that the relevant query that emits the warning normally was not running. But... good enough I guess.

This comment has been minimized.

@michaelwoerister

michaelwoerister Oct 30, 2017

Author Contributor

It will only start to be really exercised once we cache pre-trans data.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Oct 30, 2017

@bors r+

@michaelwoerister

This comment has been minimized.

Copy link
Contributor Author

michaelwoerister commented Oct 30, 2017

@bors r=nikomatsakis

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Oct 30, 2017

@bors r=nikomatsakis

Err this PR is not in bors's queue 😕

@kennytm kennytm closed this Oct 30, 2017

@kennytm kennytm reopened this Oct 30, 2017

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Oct 30, 2017

@bors r=nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 30, 2017

📌 Commit 6faba5b has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 30, 2017

⌛️ Testing commit 6faba5b with merge 3a74b1b...

bors added a commit that referenced this pull request Oct 30, 2017

Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nik…
…omatsakis

incr.comp.: Implement compiler diagnostic persistence.

This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache.

~~It is still work in progress:~~
- ~~There's still some documentation to be added.~~
- ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~

Diagnostic message duplication is addressed separately in #45519.

r? @nikomatsakis
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 30, 2017

💔 Test failed - status-travis

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Oct 31, 2017

MIPS TLS problem same as that of #45187 (comment) and #45529 (comment). Legit.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 31, 2017

The linkage error here I hope will be unblocked with #45655

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 31, 2017

@bors: retry

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 1, 2017

⌛️ Testing commit 6faba5b with merge a3f990d...

bors added a commit that referenced this pull request Nov 1, 2017

Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nik…
…omatsakis

incr.comp.: Implement compiler diagnostic persistence.

This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache.

~~It is still work in progress:~~
- ~~There's still some documentation to be added.~~
- ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~

Diagnostic message duplication is addressed separately in #45519.

r? @nikomatsakis
@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Nov 1, 2017

@bors p=1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 1, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing a3f990d to master...

@bors bors merged commit 6faba5b into rust-lang:master Nov 1, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.