anp / cue

Simple parallel pipeline for long tasks in Rust.
MIT License
17 stars 2 forks source link

Install from crates.io no longer works reliably #3

Open HenningTimm opened 6 years ago

HenningTimm commented 6 years ago

A few weeks ago, the cue crate on crates.io was updated to version 1.0.0 and does no longer reference this cue, but a wrapper around libcue (a parser for CD/DVD metadata). Version 0.1.0 is the last version that works as expected.

How to notice and fix this

This is the resulting error

error[E0425]: cannot find function `pipeline` in module `cue`
   --> src/my_file.rs:393:14
    |
393 |         cue::pipeline(
    |              ^^^^^^^^ not found in `cue`

error: aborting due to previous error

which can be fixed by forcing cue to be version 0.1.0 in the Cargo.toml or by directly referencing the github repo instead of the crate name:

[dependencies]    
# either
cue = "0.1.0"
# or
cue = { git = "https://github.com/anp/cue" }

What comes next?

I am not sure why and how this happened, but to me it is really confusing that the difference between parallel execution and music notation is only the version number of a crate. Would it be helpful to republish on crates.io using a different name?

anp commented 6 years ago

Hi! So sorry this affected you! To be perfectly honest, I had no idea that anyone was still using the cue crate aside from a previous employer of mine (with whom I confirmed they were using a "^0.1" semver bound before transferring the crate). The story here is that I was approached by someone working on bindings to libcue asking if they could use the name. Since the crate had very low download numbers and no dependent crates, and since I have not been actively maintaining the library, I assumed that a major semver version bump would make a name transfer safe for any users of the library.

In general I would recommend specifying stricter semver bounds in your Cargo.toml, but I still definitely want to resolve this. If you're fine leaving your version bound as cue = "0.1.0" then I think we can consider this resolved, but I'd also be happy to publish under a new name. Let me know what works best for your use case?

Again, so sorry to have caused trouble for you! At a minimum I should have said something in the README :(.

HenningTimm commented 6 years ago

Sorry for my late reply and thank you for your fast one. I can perfectly understand your and their reasoning. Also, don't worry, I actually learned a lot from this ;) . To be honest this is not the first time my lenient Cargo.toml caused me trouble.

I found your crate to be the best option to quickly parallelize my code and I know that some of my colleagues use it as well. I changed the version bounds to 0.1.0 and it works fine, so my problem is resolved. However, I would also be interested to use it in the future and a new name would greatly increase the maintainability of my code. But since I do not know how much work this generates for you, please treat this as a low priority issue. If I come around to it I can prepare a PR to help with this.

anp commented 6 years ago

OK, sounds great!