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

Re-add raw_pointer_derive lint as a no-op #30346

Closed
brson opened this Issue Dec 11, 2015 · 16 comments

Comments

Projects
None yet
7 participants
@brson
Copy link
Contributor

brson commented Dec 11, 2015

Removed in #29882, causing breakage to maidsafe_utilities.

I recall at some point we decided never to remove lints because of this very problem and simply convert them to no-ops.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Dec 11, 2015

Policy-wise this is similar but (imo) different to our policy of allowing changes to lints to break code. E.g. cap-lints won't affect removed lints.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Dec 12, 2015

It looks like the breakage is due to unknown_lints which is itself a lint, so this seems like it's covered by our lint changes policy. Along those lines I can't actually think of a technical reason for why we'd want to not remove lints?

I do vaguely recall reaching the conclusion at some point, however, about not removing lints. I don't remember the reason, however, so I'd want to discuss this a bit before reverting.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Dec 23, 2015

Two more crates broke in the latest report.

@bluss

This comment has been minimized.

Copy link
Contributor

bluss commented Dec 24, 2015

Don't we have a cargo feature that ensures that warnings (lints) changes are of very low impact, i.e. don't really break things that depend on the crate, for example.

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Dec 24, 2015

Yep, lints are capped at allowed for dependencies. Changing this one to be a no-op and maybe adding a default-warn noop-lints lint or whatever seems like a good idea though. It seems excessive to stop compilation instead of just warning when this kind of thing happens.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 6, 2016

Another regression popped up in this report. accumulator-0.1.3

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 6, 2016

Also containerof-0.2.1, memory_map-0.0.3.

Edit: oh accumulator and memory_map were already known from a previous report. I think containerof is new.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 6, 2016

After updating the regression sheet I count 7 crates affected by this.

@brson brson self-assigned this Jan 6, 2016

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 6, 2016

@nikomatsakis and I discussed that we'd prefer removed lints indicate they were removed with a warning instead of saying 'unknown lint'. I may try to get a patch together that does this.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Jan 7, 2016

triage: P-high

(it is questionable about whether this should be classified as a "regression" per se, in terms of what the impact actually is of this sort of change if you aren't opting into stronger lint settings. but anyway, we want to handle this case better.)

@rust-highfive rust-highfive added P-high and removed I-nominated labels Jan 7, 2016

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 7, 2016

It seems there is a mechanism for registering that a lint has been removed, why didn't we use that? I think we ought to.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 7, 2016

I will try adding it back as a removed lint and making sure it doesn't cause build failures.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 11, 2016

I've gotten in to yak shaving with the code for registering renamed and removed lints. It doesn't have test coverage and has some issues. Still expect to get a patch in.

bors added a commit that referenced this issue Jan 15, 2016

Auto merge of #30878 - brson:raw-pointer-derive, r=brson
This adds back the raw_pointer_derive lint as a 'removed' lint, so that its removal does not cause errors (#30346) but warnings.

In the process I discovered regressions in the code for renamed and removed lints, which didn't appear to have any tests. The addition of a second lint pass (ast vs. hir) meant that attributes were being inspected twice, renamed and removed warnings printed twice. I restructured the code so these tests are only done once and added tests. Unfortunately it makes the patch more complicated for the needed beta backport.

r? @nikomatsakis

brson added a commit to brson/rust that referenced this issue Jan 16, 2016

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 21, 2016

Is this not fixed?

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 21, 2016

@brson ^^ :)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 23, 2016

Done in #30878

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.