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

Build error due to missing dependency (mio-serial) #131

Closed
lizapolyudova opened this issue Jul 18, 2021 · 2 comments · Fixed by #134
Closed

Build error due to missing dependency (mio-serial) #131

lizapolyudova opened this issue Jul 18, 2021 · 2 comments · Fixed by #134

Comments

@lizapolyudova
Copy link

lizapolyudova commented Jul 18, 2021

Hey folks,

looks like the project currently fails to build with the following error:

$ cd ~/dnp3
$ cargo build
    Updating git repository `https://github.com/stepfunc/tokio-mock.git`
    Updating git repository `https://github.com/stepfunc/tokio-serial.git`
    Updating git repository `https://github.com/stepfunc/oo_bindgen.git`
    Updating git repository `https://github.com/berkowski/mio-serial`
error: failed to get `mio-serial` as a dependency of package `tokio-serial v4.4.0-beta1 (https://github.com/stepfunc/tokio-serial.git?branch=v4.4.0#f527f73e)`
    ... which is depended on by `dnp3 v0.9.1 (/Users/liza/dnp3/dnp3)`

Caused by:
  failed to load source for dependency `mio-serial`

Caused by:
  Unable to update https://github.com/berkowski/mio-serial?branch=v4.0#f937694d

Caused by:
  object not found - no match for id (f937694d12a8c9eab5e4d24bc42951681219ec73); class=Odb (9); code=NotFound (-3)

(note that you might want to move your ~/.cargo/git to a different location temporarily.

mv ~/.cargo/git{,.backup}

Without that action, the build will succeed, since cargo will simply use the cached version of mio).

My best guess is that a downstream dependency (specifically https://github.com/berkowski/mio-serial) recently added a tag called 4.0.0-beta2 and deleted the tag 4.0.0-beta1 (which is referenced by tokio-serial and I can only assume used to exist and refer to a valid commit).

I understand the issue is likely with mio-serial (filed an issue on the repo), but I was wondering if you can fix the build on your side to use an existing version of the library.

Thank you!

@berkowski
Copy link

tag has been restored. 4.0.0-beta1 and -beta2 are on crates.io now and there should be no need to pull directly from the repository for their use.

@lizapolyudova
Copy link
Author

lizapolyudova commented Jul 19, 2021

Thanks, @berkowski!

transferring some context from the other ticket:

the suggestion is to use the newer version of tokio-serial instead of forking it. That should resolve the dependency issue.

I've found a temporary workaround:

  • fork the repo
  • use berkowski/tokio-serial
  • comment-out pieces that don't build since I am not using that functionality
  • (and not enough familiarity with the code to fix the build)

Keeping this issue open so I know when to switch back to stepfunc repo instead of my fork


my 2c: it seems like using named branches instead of tagged releases of external dependencies might be inherently dangerous (in the case that the branches get merged). In this case maybe it should have been a fork of both tokio-serial and mio-serial in order to avoid this "dependency changing from under you" issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants