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

Turn the RFC1592 warnings into hard errors #34982

Merged
merged 1 commit into from
Sep 1, 2016

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Jul 22, 2016

The warnings have already reached stable, and I want to improve the trait error reporting code.

Turning warnings into errors, this is obviously a [breaking-change].

r? @nikomatsakis

cc @rust-lang/compiler

@nikomatsakis
Copy link
Contributor

Started a crater run comparing HEAD vs HEAD^.

@nikomatsakis
Copy link
Contributor

Crater run yielded 43 regressions, but it seems probably many are false positives (haven't investigated yet): https://gist.github.com/nikomatsakis/9006df8ddc4cee518d38732cacfe8e7c

@eddyb
Copy link
Member

eddyb commented Jul 26, 2016

Most of them are timeouts / SSL errors.
8 of them are trait methods that return Self: aurum-numeric, comonoid, jobsteal, lense, ndarray, regex_dfa, rendarray, vectormath.
The other one, shapir, uses the type Box<std::error::Error + Sized>, which must be an accident.

@nikomatsakis
Copy link
Contributor

I will try to do another crater run since the timeout / SSL problems should be less bad now.

In the meantime: cc @daggerbot @srijs @rphmeier @james-darkfox @bluss @jneem @davll @workanator, crates of yours might be affected by this upcoming bugfix! The changes needed though are pretty small for the most part.

@rphmeier
Copy link
Contributor

rphmeier commented Jul 30, 2016

@nikomatsakis thanks for the heads up

(fixed in jobsteal 0.5.1)

@bluss
Copy link
Member

bluss commented Aug 1, 2016

Thanks for the heads up, ndarray was fixed in version 0.5.1 (which was released in april 2016).

@nikomatsakis
Copy link
Contributor

(My next attempt at a crater run failed again, btw, and I'm not entirely sure why.)

@brson
Copy link
Contributor

brson commented Aug 10, 2016

I'll give crater a shot.

@nikomatsakis
Copy link
Contributor

I re-ran crater and got this report: https://gist.github.com/nikomatsakis/41f3a69b6b37a65a2575eba69c716aed

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Aug 10, 2016

That report shows 12 root regressions and 18 total. However, those root regressions are not actually root regressions -- many of them seem to be from dependent crates, and I think that most of those are outdated versions where a fix is available. Here is a categorization:

One non-data-point:

  • parse-macros-0.1.0 -- time out

@nikomatsakis
Copy link
Contributor

I would like feedback from @rust-lang/core / @rust-lang/compiler members. Basically these are two warnings that were made for oversights in the type system. Most crates seem to work but there are some regressions. More homework is needed, I think, to verify which of these are outdated crates, and to make sure all owners are contacted. Other than that, I think we should go ahead and convert these warnings into errors, particularly since the infrastructure for them is painful to maintain.

We could however take intermediate steps instead -- convert to deny-by-default?

I'm trying to get a feeling for when it is appropriate to "throw the switch".

@nikomatsakis
Copy link
Contributor

More homework is needed, I think, to verify which of these are outdated crates, and to make sure all owners are contacted.

Along these lines, it's really tedious to comb through crater results right now. There has to be a way to make this more automated.

@workanator
Copy link

@nikomatsakis thank you for letting know. Will fix my crate.

@workanator
Copy link

@nikomatsakis I get rid of Sized in my crate (shapir) and published the new version. I hope that will help.

@nikomatsakis
Copy link
Contributor

@workanator great! :)

@nikomatsakis
Copy link
Contributor

OK, so I decided that we should land this, but only once the crates we identified are all either fixed or have pending PRs. To that end, I opened up for vectormath https://github.com/davll/vectormath-rs/pull/6, but I didn't get to the others yet.

One weird thing I found is that the num crate doesn't seem to get any warnings locally -- is this a bug in the warning system? Are they being squashed somehow? Or was it already fixed locally? Haven't had time to figure it out yet.

@alexcrichton
Copy link
Member

@nikomatsakis just to recap, these warnings have hit stable, right? If so, how many releases?

We have a new release coming out a week from today, so it may be worth waiting a week to miss the beta train as well perhaps? (would give an extra cycle with these as stable warnings).

Given the low impact, ease of fixing, burden on the compiler, and analysis, I'd personally be fine turning into hard errors.

@bors
Copy link
Contributor

bors commented Aug 12, 2016

☔ The latest upstream changes (presumably #35592) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

@alexcrichton

just to recap, these warnings have hit stable, right? If so, how many releases?

I believe so, but I'm not sure how many releases. Would be good to verify.

Given the low impact, ease of fixing, burden on the compiler, and analysis, I'd personally be fine turning into hard errors.

Makes sense; I'd still prefer if we have PRs up. It's not that many repos. Though it takes a surprisingly long time to "context switch" around. I'm still a bit confused why I don't get any warnings for the num crate.

@nikomatsakis
Copy link
Contributor

I tried to make a PR for lense but the current master has a bunch of (unrelated) compilation errors, from what I can see.

cc @trustless-fox -- warning that we will be converting some future-compat warnings that may or may not affect your current code into hard errors. =)

@nikomatsakis
Copy link
Contributor

I could not find the repository for aurum-numeric anymore. cc @daggerbot -- the existing version of this crate on crates.io may be affected by this bugfix here, which will be converted soon from a warning into an error. See #33242 for details! :)

@nikomatsakis
Copy link
Contributor

OK, I checked off all the broken crates, but @arielb1 it looks like we need a rebase here. If you rebase, r=me! :)

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 31, 2016

📌 Commit 86f41e8 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 1, 2016

⌛ Testing commit 86f41e8 with merge 1072f84...

@bors
Copy link
Contributor

bors commented Sep 1, 2016

💔 Test failed - auto-mac-64-opt

The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes rust-lang#33242
Fixes rust-lang#33243
@arielb1
Copy link
Contributor Author

arielb1 commented Sep 1, 2016

I managed to revert an LLVM upgrade. Un-revert it.

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 7b92d05 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 1, 2016

⌛ Testing commit 7b92d05 with merge 147371f...

bors added a commit that referenced this pull request Sep 1, 2016
Turn the RFC1592 warnings into hard errors

The warnings have already reached stable, and I want to improve the trait error reporting code.

Turning warnings into errors, this is obviously a [breaking-change].

r? @nikomatsakis

cc @rust-lang/compiler
@bors bors merged commit 7b92d05 into rust-lang:master Sep 1, 2016
@WildCryptoFox
Copy link
Contributor

@nikomatsakis Please remove lense from your tests. It was a PoC prototype that has since been succeeded; the [unpublished] successor is crystal. Thanks in advance.

@nikomatsakis
Copy link
Contributor

@james-darkfox very good. I can't easily remove from the tests, but I'll try to remember not to bother you. ;)

@WildCryptoFox
Copy link
Contributor

WildCryptoFox commented Sep 21, 2016

@nikomatsakis Does it iterate over crates.io ? I could send a dummy crate. If it checks git, then that repo will be removed soon anyway. Thanks; and keep sure to bother me if anything else breaks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants