-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[WIP] make LUB of higher-ranked things actually do EQ #44211
[WIP] make LUB of higher-ranked things actually do EQ #44211
Conversation
@bors try |
[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 =)
☀️ Test successful - status-travis |
cc @rust-lang/infra Cargobomb run requested. |
Marking as waiting on author since Travis failed. If these are intentional failures, please let us (infra team) know!
|
@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. |
Cargobomb run started. Sorry for the delay, we didn't have spare boxes and then I was away for a few days. |
Run is complete: http://cargobomb-reports.s3.amazonaws.com/pr-44211/index.html. 15 regressions straight off, but haven't triaged. |
@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. |
@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. |
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. |
@nikomatsakis just pinging you for triage purposes to see how your contemplation of this PR mentioned in your last comment is going :) |
@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? |
@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
083c433
Compare
Triage ping! How's it going? |
Some progress, got blocked by other things. |
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 =)