-
Notifications
You must be signed in to change notification settings - Fork 13
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
Please consider a new release with updated dependencies #33
Comments
I can use the following set of dependencies without changing any piece of code: [dependencies]
arraydeque = "0.5"
encoding_rs = { version = "^0.8", optional = true }
hashlink = "0.9"
[dev-dependencies]
libtest-mimic = "0.4"
quickcheck = "1.0" I took the opportunity to remove the patch version requirement, which may help with binary size.
Since I have not changed any code in the crate, I wonder if it's okay to just release a patch version? hashlink = "0.8"
yaml-rust2 = "0.8.newversion" let map = hashlink /*v0.8*/ ::new(something);
let yaml = yaml_rust2::Yaml::Hash(map /*expects 0.9*/); I'm open to advice and suggestions (cc @davvid) |
You can't prevents dependencies to mess up with semver unless you pin each version you're depending on with |
I am not worried about I have no idea how common practice it is to use a dependence and one of its dependence (in this instance someone using I wouldn't want to be "that guy" that messes up other's projects with a patch bump that should have been a minor bump. |
There is cargo-semver-check which allows you to check semver breakages. |
@kinnison Are you planning to use There's an issue with Unfortunately, |
Well that's worrying. Yes the dependency comes via marked-yaml though the size-sensitively project is within my employer. I've not noticed marks being particularly off except sometimes at the outsides of containers, but for the most part we care about the start location of scalars only. I have some basic tests in marked yaml for marks but perhaps I should add some more. |
If you're able to contribute those to this crate directly, that would be great! If you use the |
Also,
|
FYI when I updated |
The tests inside marked-yaml probably will need faffing with quite hard to make them suitable for either this crate or for |
I'm not opposed to bumping minors since we're still in 0.x and there's not really any practical downside to bumping up. IIRC semver technically allows breaking changes in patch releases for 0.x versions, but that would be naughty. |
Since for now you're the only one needing the |
I think that sounds fair. I'm unlikely to be able to get to it very very soon, but I'll note it at work as being part of what we need to do to minimise duplicated dependencies. Thank you for being open to this. |
No worries! I want this project to be useful. Wouldn't be if I turned down opportunities to improve ;) I'm nearing the end of a heavy |
Actually, I could specify the dependency as |
That sounds very good. I wasn't even aware that was possible. |
That's because it isn't! I should have tested this. The
@kinnison Can you check it works for you on the |
You can actually. An example: GuillaumeGomez/sysinfo#1295 |
Your solution seems similar to |
Indeed! |
Sadly that doesn't seem to have fixed things:
|
Have you by any chance tried to |
I tried
|
I am beyond my meagre understanding of Cargo'd dep management :( |
Same. I tried reading the book but it says the resolver should choose the most recent update matching the requirements, or one that is already imported if available. I changed the requirement to |
Yep |
I pushed that change to |
Fantastic, thank you. I've unfortunately not been able to get into writing some tests for you yet though :( Sorry. |
Please do not put |
I'm interested in knowing more about that. What I thought the requirement expressed was "you can use any 0.8 or 0.9 you want". If I don't understand the "only one of them" part. The crate has to be linked to a specific version of To me, What solution would you think would be best? Force |
And A will not compile, because yaml-rust2 does not work with hashlink 0.8. It works with a random one of 0.8 or 0.9 that A does not control. Hashlink 0.8's LinkedHashMap and hashlink 0.9's LinkedHashMap are not the same type. Crate A cannot pass hashlink 0.8's LinkedHashMap to Yaml::Hash if that data structure only accepts hashlink 0.9's LinkedHashMap. It has nothing to do with whether hashlink uses semver. |
This I knew because I have recently been faced by that issue.
I do not understand why A wouldn't compile here. A does not use yaml-rust2. I would think there would be 2 versions of hashlink in the binary. One 0.8 that would operate with A, and a 0.9 that would operate with B and yaml-rust2. Of course, if C takes a structure from A and passes it to yaml-rust2, I expect it to fail. But I expect the compile error to originate from C and not A I don't see any situation here where setting a specific version requirement on yaml-rust2 would solve the issue. It may maybe make the issue more visible? That's all I can think of. If we set to:
All those scenarii have an iterop issue. In that regard I would say all those specifications are equal. However, if someone uses just hashlink and yaml-rust2, using the 3rd option removes a duplicate in the binary. I am more than willing to change the requirement back to 0.8 or to 0.9. But I would like to understand where my reasoning falls short. What's the missing piece in my above reasoning? What would you consider to be the best version requirement? |
Better example of a problematic dependency graph:
I don't think there is any way this can compile. Compiling A and B individually (with no other dependency on hashlink in the program) would resolve the way that you imagine. But during a build of C, randomly either A will not compile or B will not compile. Instead, if:
there is no such issue. |
I apologize for the 3 months delay. I have run Thank you very much @dtolnay for your input! <3 I'm going to close this issue. Do feel free to comment or re-open as needed! |
I use yaml-rust2 in a project where we're not ready to commit to something as potentially breaking as saphyr. We'd like to eventually since we primarily just use the content which would be in saphyr-parser but for now we're kinda sticking to more stable crates.
Unfortunately we're very size-sensitive and complexity-of-dependency-tree sensitive and as a result we could do with a version of yaml-rust2 which has its hashlink dependency updated to 0.9.
I am prepared to organise a branch and testing to ensure the update is good; though given hashlink's API is part of yours, it probably implies that we would need to do a 0.9.0 release of yaml-rust2 rather than 0.8.2.
Is this something that this project would entertain, given that saphyr-parser does not appear to be presenting as production-ready yet?
The text was updated successfully, but these errors were encountered: