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

Projects
None yet
10 participants
@arielb1
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 26, 2016

Started a crater run comparing HEAD vs HEAD^.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 26, 2016

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

@eddyb

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 28, 2016

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

This comment has been minimized.

Copy link
Contributor

rphmeier commented Jul 30, 2016

@nikomatsakis thanks for the heads up

(fixed in jobsteal 0.5.1)

@arielb1 arielb1 force-pushed the arielb1:bad-tuples-and-objects branch from 8c94415 to 31a11f0 Jul 31, 2016

@bluss

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 7, 2016

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

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Aug 10, 2016

I'll give crater a shot.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 10, 2016

@nikomatsakis

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 10, 2016

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 10, 2016

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

This comment has been minimized.

Copy link

workanator commented Aug 11, 2016

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

@workanator

This comment has been minimized.

Copy link

workanator commented Aug 11, 2016

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 11, 2016

@workanator great! :)

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 11, 2016

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 davll/vectormath-rs#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

This comment has been minimized.

Copy link
Member

alexcrichton commented Aug 11, 2016

@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 12, 2016

@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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 26, 2016

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 26, 2016

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 26, 2016

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

@arielb1 arielb1 force-pushed the arielb1:bad-tuples-and-objects branch from 31a11f0 to 86f41e8 Aug 31, 2016

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 31, 2016

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 31, 2016

📌 Commit 86f41e8 has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Sep 1, 2016

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

bors added a commit that referenced this pull request Sep 1, 2016

Auto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis
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

This comment has been minimized.

Copy link
Contributor

bors commented Sep 1, 2016

💔 Test failed - auto-mac-64-opt

turn the RFC1592 warnings into hard errors
The warnings have already reached stable

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

Fixes #33242
Fixes #33243

@arielb1 arielb1 force-pushed the arielb1:bad-tuples-and-objects branch from 86f41e8 to 7b92d05 Sep 1, 2016

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Sep 1, 2016

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

@bors r=nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 7b92d05 has been approved by nikomatsakis

@bors

This comment has been minimized.

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

Auto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis
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

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
homu Test successful
Details
@james-darkfox

This comment has been minimized.

Copy link
Contributor

james-darkfox commented Sep 17, 2016

@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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Sep 19, 2016

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

@james-darkfox

This comment has been minimized.

Copy link
Contributor

james-darkfox 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
You can’t perform that action at this time.