Closed NightlySide closed 3 years ago
This is because you are using different versions of the same crate. Okapi (master branch) is currently build for Rocket 0.5.0-rc.1. But you are using Rocket 0.5.0-rc (git branch) and these are different versions. So you force the compiler to use a version of Rocket that okapi is not implemented for. This line changes the rocket version to force use 0.5.0-rc (git branch)
[patch.crates-io]
rocket = { git = 'https://github.com/SergioBenitez/Rocket', branch = "v0.5-rc" }
Also note that Rocket 0.5.0-rc.1 and Rocket 0.5.0-rc (git branch) are not the same internally. Some things are moved, added and changed since 0.5.0-rc.1.
So to solve this, make sure you use the same version. So for rocket-okapi this should be 0.5.0-rc.1 so your code should also use this version.
If you really want to use rocket-okapi with Rocket 0.5.0-rc (git branch) then you have to vendor/fork rocket-okapi and change the Cargo.toml
to use your version of Rocket. Note that this might not work correctly because some things changed in rocket. (same for rocket-okapi-codegen
)
This should be solved once Rocket has its 0.5.0 release out, but who know when that is going to happen...
If the above did not fix the issue, let me know and reopen the issue. But I'm fairly sure the 'version' mismatch is the problem.
I'm trying to setup okapi for rocket 0.5.0-rc.1. My Cargo.toml file is the following:
I'm trying to build and I get the same error again and again, like if okapi wasn't using rocket 0.5 :
Does anyone have an idea about how I can make this work?