-
Notifications
You must be signed in to change notification settings - Fork 47
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
Version incompatibility when upgrading to 1.0.3 #77
Comments
1.0.3 accepts a range of indexmap versions. You should not need to upgrade to 2.0.0. Happy to help you work through whatever issues you've encountered when upgrading. |
I just seen this on another issue. The problem is that paperclip uses version 1 so it creates type incompatibility: = note: `IndexMap<_, _>` and `IndexMap<String, Value>` have similar names, but are actually distinct types
note: `IndexMap<_, _>` is defined in crate `indexmap`
--> /Users/tiagocastro/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.3/src/map.rs:71:1
|
71 | pub struct IndexMap<K, V, S = RandomState> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `IndexMap<String, Value>` is defined in crate `indexmap`
--> /Users/tiagocastro/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-2.0.0/src/map.rs:81:1 From what I can tell by having this ">=1.6.1, <3.0.0" actually it picks 2.0 because the latest dep serde_yaml has ^2.0 so this can never work with paperclip. I made it work by doing this hack:
So how to fix this? We can upgrade paperclip to use index map 2 though I feel this may still be brittle if openapiv3 changes again to allow for a future index map v3 for example.. |
I just ran into this problem again. It seems to be a problem whenever there is a dependency wanting ^1.0 and one wanting ^2.0, making cargo pick "whatever of the two it feels like" for openapiv3. It is probably best to always pick one of the two version for public dependencies. |
note https://crates.io/crates/openapiv3/1.0.3 has been yanked |
Hey there,
if someone is facing an issue because of indexmap was upgraded as part of a patch version you can just pin this crate like this:
openapiv3 = "=1.0.2" # pinned because paperclip does not support indexmap v2.0.0 which cames with 1.0.3
Thanks for not doing proper semver by expecting everyone just pins all depencies by default. 👎
The text was updated successfully, but these errors were encountered: