Uh oh!
There was an error while loading. Please reload this page.
[WIP] make LUB of higher-ranked things actually do EQ - #44211
[WIP] make LUB of higher-ranked things actually do EQ#44211nikomatsakis wants to merge 2 commits into
Conversation
nikomatsakis
commented
Aug 31, 2017
@bors try |
bors
commented
Aug 31, 2017
[DO NOT MERGE] make LUB of higher-ranked things actually do EQ This is an experimental PR that I'm posting for the purposes of observing its effects via cargobomb (a crater run showed [no regressions](https://gist.github.com/nikomatsakis/5aaf3782b4332a3ba408315cc84f69bf)). The existing LUB/GLB code does some rather complex things around higher-ranked types (notably, grubbing about with region constraints) that I would like to move away from. I am not sure how often it is important in practice. This branch converts LUB/GLB of higher-ranked things into EQ. r? @eddyb (this is just an experiment, don't really review =)
bors
commented
Aug 31, 2017
☀️ Test successful - status-travis |
eddyb
commented
Aug 31, 2017
cc @rust-lang/infra Cargobomb run requested. |
Mark-Simulacrum
commented
Sep 1, 2017
Marking as waiting on author since Travis failed. If these are intentional failures, please let us (infra team) know! |
eddyb
commented
Sep 1, 2017
@Mark-Simulacrum This is not supposed to be merged and those test failures probably make sense given the changes - we only need a cargobomb run result from it. |
aidanhs
commented
Sep 5, 2017
Cargobomb run started. Sorry for the delay, we didn't have spare boxes and then I was away for a few days. |
Mark-Simulacrum
commented
Sep 9, 2017
Run is complete: http://cargobomb-reports.s3.amazonaws.com/pr-44211/index.html. 15 regressions straight off, but haven't triaged. |
eddyb
commented
Sep 11, 2017
@nikomatsakis Looks like no actual regressions to me, only some flaky tests and timeouts. |
Given that there were no regressions of crater, I think we can merge this. However, I would like it if on an LUB failure, we could at least have a special error message noting the new compiler update. |
eddyb
commented
Sep 18, 2017
@arielb1 from what @nikomatsakis was telling me, this branch is only an experiment to confirm that a separate reimplementation strategy could work without breaking existing code. |
nikomatsakis
commented
Sep 20, 2017
While @eddyb is correct, now that the experiment was successful, I've been contemplating landing (some variant of) this branch, just to pave the way for the future work. It should be possible to make a variant of this that offers a specialized error message, at least. |
aidanhs
commented
Sep 28, 2017
@nikomatsakis just pinging you for triage purposes to see how your contemplation of this PR mentioned in your last comment is going :) |
aidanhs
commented
Oct 5, 2017
@nikomatsakis ping again to see where this PR is up to! If this was just an experimental PR, maybe worth closing and reopening a fresh one with changes to be reviewed/merged? |
nikomatsakis
commented
Oct 9, 2017
@aidanhs I think we've decided to turn into something a bit more than experimental. I'm still hoping to refresh the approach in the next day or two, so I'm inclined not to close just yet. |
7226cda to
083c433Comparecarols10cents
commented
Oct 16, 2017
Triage ping! How's it going? |
nikomatsakis
commented
Oct 16, 2017
Some progress, got blocked by other things. |
shepmaster
commented
Nov 3, 2017
This has been inactive for 18 days, so I'm going to go ahead and close this to keep things tidy. As always, please reopen once some updates happen! Thanks! |
Simplify higher-ranked LUB/GLB This is a better version of #44211. It still makes higher-ranked LUB/GLB into a hard equality test, however, it does try to identify that something changed and issue a notice to the user. I wroteup #45852 as a tracking issue for this change. Currently, this moves straight to a hard-error, on the basis that the crater run in #44211 saw no impact. It might be good to retest -- or perhaps to try for a warning period. Trying to do the latter in a precise way would be somewhat painful, but an imprecise way might suffice -- that is, we could issue warning *whenever* a LUB/GLB operation succeeds that will later fail, even if it doesn't ultimately impact the type check. I could experiment with this. ~~I am *mildly* wary about landing this independently of other code that moves to a universe-based system. In particular, I was nervous that this change would make coherence accepts new pairs of impls that will later be errors. I have the code for the universe-based approach available, I hope to open an PR and run some tests on its impact very shortly.~~ @arielb1 points out that I was being silly. r? @arielb1
Simplify higher-ranked LUB/GLB This is a better version of #44211. It still makes higher-ranked LUB/GLB into a hard equality test, however, it does try to identify that something changed and issue a notice to the user. I wroteup #45852 as a tracking issue for this change. Currently, this moves straight to a hard-error, on the basis that the crater run in #44211 saw no impact. It might be good to retest -- or perhaps to try for a warning period. Trying to do the latter in a precise way would be somewhat painful, but an imprecise way might suffice -- that is, we could issue warning *whenever* a LUB/GLB operation succeeds that will later fail, even if it doesn't ultimately impact the type check. I could experiment with this. ~~I am *mildly* wary about landing this independently of other code that moves to a universe-based system. In particular, I was nervous that this change would make coherence accepts new pairs of impls that will later be errors. I have the code for the universe-based approach available, I hope to open an PR and run some tests on its impact very shortly.~~ @arielb1 points out that I was being silly. r? @arielb1
Simplify higher-ranked LUB/GLB This is a better version of #44211. It still makes higher-ranked LUB/GLB into a hard equality test, however, it does try to identify that something changed and issue a notice to the user. I wroteup #45852 as a tracking issue for this change. Currently, this moves straight to a hard-error, on the basis that the crater run in #44211 saw no impact. It might be good to retest -- or perhaps to try for a warning period. Trying to do the latter in a precise way would be somewhat painful, but an imprecise way might suffice -- that is, we could issue warning *whenever* a LUB/GLB operation succeeds that will later fail, even if it doesn't ultimately impact the type check. I could experiment with this. ~~I am *mildly* wary about landing this independently of other code that moves to a universe-based system. In particular, I was nervous that this change would make coherence accepts new pairs of impls that will later be errors. I have the code for the universe-based approach available, I hope to open an PR and run some tests on its impact very shortly.~~ @arielb1 points out that I was being silly. r? @arielb1
This is an experimental PR that I'm posting for the purposes of observing its effects via cargobomb (a crater run showed no regressions). The existing LUB/GLB code does some rather complex things around higher-ranked types (notably, grubbing about with region constraints) that I would like to move away from. I am not sure how often it is important in practice. This branch converts LUB/GLB of higher-ranked things into EQ.
r? @eddyb (this is just an experiment, don't really review =)