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

Remove #[deny(warnings)] #17

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Remove #[deny(warnings)] #17

merged 1 commit into from
Jun 6, 2019

Conversation

dbrgn
Copy link
Contributor

@dbrgn dbrgn commented May 14, 2019

The library currently does not currently build anymore, because upstream libraries have added new deprecation warnings. A deprecation warning should not break compilation though. There was a post on Reddit about this about a year ago, but I can't find it anymore.

I think adding a CI check step would be fine, but #[deny(warnings)] is a bit too much.

These are the warnings:

warning: use of deprecated item 'hal::digital::OutputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:111:6                                                       
    |                                                                         
111 | impl hal::digital::OutputPin for Pin {                                  
    |      ^^^^^^^^^^^^^^^^^^^^^^^                                            
    |                                                                         
    = note: #[warn(deprecated)] on by default                                 
                                                                              
warning: use of deprecated item 'hal::digital::InputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:121:6                                                       
    |                                                                         
121 | impl hal::digital::InputPin for Pin {                                   
    |      ^^^^^^^^^^^^^^^^^^^^^^                                             
                                                                              
warning: use of deprecated item 'hal::digital::InputPin::is_high': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:131:15                                                      
    |                                                                         
131 |         !self.is_high()                                                 
    |               ^^^^^^^                                                                                                                             

The library currently does not currently build anymore, because upstream
libraries have added new deprecation warnings. A deprecation warning
should not break compilation though.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nastevens (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added S-waiting-on-review Status: Review is incomplete T-embedded-linux labels May 14, 2019
@therealprof
Copy link
Contributor

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hannobraun
Copy link
Member

bors r=therealprof

@bors
Copy link
Contributor

bors bot commented May 16, 2019

🔒 Permission denied

Existing reviewers: click here to make hannobraun a reviewer

@hannobraun
Copy link
Member

Permission denied

Ah, looks like the decision to remove the HAL team as a maintainer has already been implemented. Sorry for the noise.

@posborne
Copy link
Member

bors r=therealprof

bors bot added a commit that referenced this pull request May 17, 2019
17: Remove #[deny(warnings)] r=therealprof a=dbrgn

The library currently does not currently build anymore, because upstream libraries have added new deprecation warnings. A deprecation warning should not break compilation though. There was a post on Reddit about this about a year ago, but I can't find it anymore.

I think adding a CI check step would be fine, but `#[deny(warnings)]` is a bit too much.

These are the warnings:

```
warning: use of deprecated item 'hal::digital::OutputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:111:6                                                       
    |                                                                         
111 | impl hal::digital::OutputPin for Pin {                                  
    |      ^^^^^^^^^^^^^^^^^^^^^^^                                            
    |                                                                         
    = note: #[warn(deprecated)] on by default                                 
                                                                              
warning: use of deprecated item 'hal::digital::InputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:121:6                                                       
    |                                                                         
121 | impl hal::digital::InputPin for Pin {                                   
    |      ^^^^^^^^^^^^^^^^^^^^^^                                             
                                                                              
warning: use of deprecated item 'hal::digital::InputPin::is_high': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:131:15                                                      
    |                                                                         
131 |         !self.is_high()                                                 
    |               ^^^^^^^                                                                                                                             
```

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
@bors
Copy link
Contributor

bors bot commented May 17, 2019

Build failed

@nastevens nastevens removed their assignment May 18, 2019
@dbrgn
Copy link
Contributor Author

dbrgn commented May 19, 2019

The bors failure seems unrelated. What can we do to get this merged?

@dbrgn dbrgn mentioned this pull request May 19, 2019
@therealprof
Copy link
Contributor

I think it is me messing up the process because I'm not really a authorised reviewer on this repository. ;) If @posborne would just do bors r+, that might end up fine. ;)

@posborne
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request May 20, 2019
17: Remove #[deny(warnings)] r=posborne a=dbrgn

The library currently does not currently build anymore, because upstream libraries have added new deprecation warnings. A deprecation warning should not break compilation though. There was a post on Reddit about this about a year ago, but I can't find it anymore.

I think adding a CI check step would be fine, but `#[deny(warnings)]` is a bit too much.

These are the warnings:

```
warning: use of deprecated item 'hal::digital::OutputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:111:6                                                       
    |                                                                         
111 | impl hal::digital::OutputPin for Pin {                                  
    |      ^^^^^^^^^^^^^^^^^^^^^^^                                            
    |                                                                         
    = note: #[warn(deprecated)] on by default                                 
                                                                              
warning: use of deprecated item 'hal::digital::InputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:121:6                                                       
    |                                                                         
121 | impl hal::digital::InputPin for Pin {                                   
    |      ^^^^^^^^^^^^^^^^^^^^^^                                             
                                                                              
warning: use of deprecated item 'hal::digital::InputPin::is_high': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:131:15                                                      
    |                                                                         
131 |         !self.is_high()                                                 
    |               ^^^^^^^                                                                                                                             
```

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
@bors
Copy link
Contributor

bors bot commented May 20, 2019

Build failed

@therealprof
Copy link
Contributor

Hm, okay, another problem with nightly... libc messed up:

error[E0425]: cannot find value `PTRACE_GETFPXREGS` in module `libc`
  --> /home/travis/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.11.0/src/sys/ptrace.rs:77:9
   |
77 |         PTRACE_GETFPXREGS,
   |         ^^^^^^^^^^^^^^^^^
help: a constant with a similar name exists
   |
77 |         PTRACE_GETFPREGS,
   |         ^^^^^^^^^^^^^^^^
help: possible candidate is found in another module, you can import it into scope
   |
3  | use sys::ptrace::Request::PTRACE_GETFPXREGS;

@rnestler
Copy link
Contributor

Hm, okay, another problem with nightly... libc messed up:

Why test this with nightly anyways? It compiles fine on stable.

@ryankurte
Copy link
Contributor

@therealprof i ran into this today, tested to be resolved in nix-rust/nix#1055, i've asked them to publish a release nix-rust/nix#1061 which i guess will have to be individually bumped in sysfs_gpio, i2cdev and spidev and then updated here.

@ryankurte
Copy link
Contributor

@rnestler it appears broken to me on both stable and nightly when cross compiling for arm. maybe we should add stable to the build matrix too?

@therealprof
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Jun 6, 2019
17: Remove #[deny(warnings)] r=therealprof a=dbrgn

The library currently does not currently build anymore, because upstream libraries have added new deprecation warnings. A deprecation warning should not break compilation though. There was a post on Reddit about this about a year ago, but I can't find it anymore.

I think adding a CI check step would be fine, but `#[deny(warnings)]` is a bit too much.

These are the warnings:

```
warning: use of deprecated item 'hal::digital::OutputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:111:6                                                       
    |                                                                         
111 | impl hal::digital::OutputPin for Pin {                                  
    |      ^^^^^^^^^^^^^^^^^^^^^^^                                            
    |                                                                         
    = note: #[warn(deprecated)] on by default                                 
                                                                              
warning: use of deprecated item 'hal::digital::InputPin': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:121:6                                                       
    |                                                                         
121 | impl hal::digital::InputPin for Pin {                                   
    |      ^^^^^^^^^^^^^^^^^^^^^^                                             
                                                                              
warning: use of deprecated item 'hal::digital::InputPin::is_high': Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
   --> src/lib.rs:131:15                                                      
    |                                                                         
131 |         !self.is_high()                                                 
    |               ^^^^^^^                                                                                                                             
```

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
@bors
Copy link
Contributor

bors bot commented Jun 6, 2019

Build succeeded

@bors bors bot merged commit 9313b7f into rust-embedded:master Jun 6, 2019
@dbrgn
Copy link
Contributor Author

dbrgn commented Jun 6, 2019

🎉

@dbrgn dbrgn deleted the remove-deny-warnings branch June 6, 2019 08:58
bors bot added a commit to rust-embedded/embedded-hal that referenced this pull request Jun 12, 2019
143: Remove #[deny(warnings)] r=ryankurte a=dbrgn

It's an antipattern, see https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md and rust-embedded/linux-embedded-hal#17

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
bors bot added a commit that referenced this pull request Jul 1, 2019
18: Move to digital v2 traits r=nastevens a=dbrgn

The v1 traits are deprecated because they don't have a way to report errors.

Gets rid of the deprecation warnings (which are hard errors until #17 is merged).

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Review is incomplete T-embedded-linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants