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

match new API of serialport-rs 2.0.0 #1

Merged
merged 1 commit into from Jul 30, 2017

Conversation

ndusart
Copy link
Contributor

@ndusart ndusart commented Jul 25, 2017

Prepare the changes to be made to use the next release of serialport-rs:

  • termios crate was replaced by nix, so replacing it here as well
  • libc is taken from nix crate, it avoid to use a different version than what nix is using.
  • available_baud_rates is removed in favor of BaudRate::platform_rates() so removing the pub use
  • defined a new Result and Error type (just reexporting the ones from serialport-rs), it's for having some conversion trait for nix::Error since we're using nix now and termios functions returns this kind of error instead of io::Error

The downside is that Cargo.toml is now referencing git repositories instead of published versions.
Maybe you'll want to wait for the release of serialport-rs before merging.

@berkowski
Copy link
Owner

Good to see serialport-rs is chugging along nicely. I'm traveling around for the next few days and will check out the PR once settled again

@berkowski
Copy link
Owner

Alright, I've had some time finally to look at this. Thanks for the PR!

Switching over to nix raises some new issues on a few build targets, and the current head serialport-rs seems to have some issues on OSX itself. Because of that I'd like to have your changes pushed to a new working branch (which I'll create) if that's OK with you. Once the nix and serialport-rs issues are resolved we can have a clean merge back onto master.

@ndusart
Copy link
Contributor Author

ndusart commented Jul 30, 2017

Of course we can push these changes into a new branch.

The breakages seem to be:

  • for OSX 32 bits: https://github.com/dcuddeback/iokit-sys/blob/master/src/types.rs is missing some use statement for vm_address_t (I do not know where these should come from though, maybe a typo and it's mach_vm_address_t as well ?) and mach_vm_size_t (opened Cannot build for i686-apple-darwin dcuddeback/iokit-sys#4)
  • for OSX 64 bits (and probably 32 bits as well): it is certainly that version of libc taken by nix (from github) does not match with the one taken by IOKit-sys (from crates.io), hence the mismatch in types, we can probably only fix this when we can rely on released version of nix and serialport-rs.
  • for BSD platforms, nix::poll is not available in all platforms, it's pretty close to be fixed as you saw when opening your PR there.

@berkowski
Copy link
Owner

Great. And thanks for your work on all the upstream crates like nix and libc! Please switch your PR target to the new serialport-2 branch and we'll go from there.

@ndusart ndusart changed the base branch from master to serialport-2 July 30, 2017 15:30
@berkowski
Copy link
Owner

freebsd targets are now passing since your nix-rust/nix#672 was accepted, so that's one down. I'm going to go ahead and merge this. Thanks!

@berkowski berkowski merged commit 73fe754 into berkowski:serialport-2 Jul 30, 2017
@berkowski berkowski mentioned this pull request Jul 30, 2017
4 tasks
@ndusart ndusart deleted the serialport-2 branch February 27, 2018 09:30
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.

None yet

2 participants