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

Update nix in all dependent crates #19

Closed
RandomInsano opened this issue May 26, 2019 · 19 comments
Closed

Update nix in all dependent crates #19

RandomInsano opened this issue May 26, 2019 · 19 comments

Comments

@RandomInsano
Copy link

RandomInsano commented May 26, 2019

TL;DR: We need to version bump dependencies of dependencies here. I'm willing to do it.

I've been out of the Rust Embedded loop a little while (priorities shifted), but I've come back and have found some issues with building nix on my Raspberry Pi dev harness.

That's a critical blocker for me to release a new version of one of my crates and I believe all of i2cdev, spidev, and sysfs_gpio need a bump and a test.

I can do the first two, but I'd have to make a project to use sysfs_gpio to confirm it's working.

If we're in agreement, I think I can carve out a little time over the next few weeks to go out to each of those libraries and do the version bump to nix to 0.14. One extra improvement will be not needing to build the beast that is nix three times for my examples which will make me pretty happy.

Here's the output of cargo-tree. It shows what is getting re-compiled (packages without "(*)")

└── linux-embedded-hal v0.2.2
    ├── cast v0.2.2
    ├── embedded-hal v0.2.2 (*)
    ├── i2cdev v0.4.1
    │   ├── bitflags v1.0.4 (*)
    │   ├── byteorder v1.3.1 (*)
    │   ├── libc v0.2.55
    │   └── nix v0.11.0
    │       ├── bitflags v1.0.4 (*)
    │       ├── cfg-if v0.1.9
    │       ├── libc v0.2.55 (*)
    │       └── void v1.0.2 (*)
    ├── spidev v0.3.0
    │   ├── bitflags v0.3.3
    │   ├── libc v0.2.55 (*)
    │   └── nix v0.6.0
    │       ├── bitflags v0.4.0
    │       ├── cfg-if v0.1.9 (*)
    │       ├── libc v0.2.55 (*)
    │       └── void v1.0.2 (*)
    │       [build-dependencies]
    │       ├── rustc_version v0.1.7
    │       │   └── semver v0.1.20
    │       └── semver v0.1.20 (*)
    └── sysfs_gpio v0.5.3
        └── nix v0.10.0
            ├── bitflags v1.0.4 (*)
            ├── bytes v0.4.12
            │   ├── byteorder v1.3.1 (*)
            │   └── iovec v0.1.2
            │       └── libc v0.2.55 (*)
            ├── cfg-if v0.1.9 (*)
            ├── libc v0.2.55 (*)
            └── void v1.0.2 (*)
@RandomInsano
Copy link
Author

RandomInsano commented May 26, 2019

Status info on the three dependencies:

@drinkdhmo
Copy link

drinkdhmo commented May 26, 2019

I have successfully compiled gpio-cdev on a Raspberry Pi zeroW after updating its nix dependency to 0.14.

@ryankurte
Copy link
Contributor

ryankurte commented May 26, 2019

hey thanks for opening this! i was gonna today because linux-embedded-hal not compiling seems reasonably high priority. i'm running patched rust-sysfs-gpio (and rust-i2cdev, but, not using i2c) with linux-embedded-hal on an RPi which is far from exhaustive testing, but, seems to be working.

The version of nix used in rust-spidev is actually so old it doesn't have the issue, so fixing the build only requires the rust-embedded/rust-sysfs-gpio#55 and rust-embedded/rust-i2cdev#49 patches atm, and a point release with these included should alleviate the immediate problem.

i noticed there are only two maintainers on @rust-embedded/embedded-linux so i was going to open a PR to add myself / if you're interested in getting onboard its always good to have a few more ^_^

@RandomInsano
Copy link
Author

RandomInsano commented May 27, 2019 via email

@drinkdhmo
Copy link

With this effort, shouldn't linux-embedded-hal be migrated to use gpio-cdev instead of sysfs-gpio in light of its deprecation?

@RandomInsano
Copy link
Author

RandomInsano commented May 27, 2019 via email

@drinkdhmo
Copy link

Makes sense.

@ryankurte
Copy link
Contributor

alright so i have maintainer access 🎉

now just waiting on publish access rust-embedded/wg#352 (comment) and for someone else on the team to review rust-embedded/rust-sysfs-gpio#55 and rust-embedded/rust-i2cdev#49 ^_^

@posborne
Copy link
Member

posborne commented May 29, 2019

Getting to these now. I think the up looks good but this represents an (implicit) MSRV change so the version number change in semver should be major to avoid breakages in depedent crates and projects that may be on rustc < 1.24.1.

EDIT: After doing a little digging on i2cdev/gpio I decided that 1.24.1 is still safe for the MSRV of those. sysfs-gpio is explicit at 1.26.0 and I'm fine going with the same implicit MSRV for i2cdev. We'll want to make those more explicit moving forward.

@posborne
Copy link
Member

New versions published to crates.io:

i2cdev 0.4.2: https://crates.io/crates/i2cdev
sysf_gpio 0.5.4: https://crates.io/crates/sysfs_gpio

@RandomInsano
Copy link
Author

RandomInsano commented May 29, 2019 via email

@ryankurte
Copy link
Contributor

good call with the MSRV, and tested linux-embedded-hal is back to compiling for and running on armv7 ^_^

@RandomInsano
Copy link
Author

RandomInsano commented May 31, 2019 via email

@RandomInsano
Copy link
Author

It builds again! The speed increase was a beautiful thing to see today:

me@pi-02:~/Documents/Code/rust/pscontroller-rs $ cargo update
    Updating crates.io index
    Removing bytes v0.4.12
    Removing gcc v0.3.55
    Updating i2cdev v0.4.1 -> v0.4.2
    Removing iovec v0.1.2
    Updating libc v0.2.55 -> v0.2.58
    Removing nix v0.10.0
    Removing nix v0.11.0
      Adding nix v0.14.0
    Updating sysfs_gpio v0.5.3 -> v0.5.4
    Removing winapi v0.2.8

Thanks for the great work guys. Is there anything special needed to bump spidev to use nix 0.14.0? It'd save me a few seconds so it's still worth it to me if you're okay bumping the version again when I'm done.

https://youtu.be/WotK_qzls98

@posborne
Copy link
Member

posborne commented Jun 7, 2019

spidev 0.4.0 is now published as well. https://crates.io/crates/spidev. This one had some larger changes as the nix it was using was quite out of date.

@RandomInsano
Copy link
Author

RandomInsano commented Jun 7, 2019 via email

@ryankurte
Copy link
Contributor

thanks @posborne!

that one will need an explicit version bump whenever one of us has a moment

@eldruin
Copy link
Member

eldruin commented Dec 5, 2019

I think this is solved now after the 0.3 release, isn't it?

@ryankurte
Copy link
Contributor

closing as we seem to have resolved this, thanks folks!

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

No branches or pull requests

5 participants