Closed jdortiz closed 4 years ago
I made a few tests. The poblem seems to be http-types. Version 1.2.x fails to compile with rustc 1.43.1. But http-types 1.3.x (1.3.1) compiles without any problem.
Using Cargo-tree, http types is required by:
Hope this helps a little. I wouldn't mind helping to solve the issue. I just don't know where to start.
Best regards,
Jorge
These are the changes in http-types: v.1.2.0 request.rs:
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
self.receiver.recv().await
}
response.rs:
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
self.receiver.recv().await
}
v.1.3.x request.rs:
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
self.receiver.recv().await.ok()
}
response.rs:
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
self.receiver.recv().await.ok()
}
I understand the complain of the compiler and why 1.3.x version is the right one. However, I don't know how to solve the problem with tide other than changing the dependencies of for each of the crates mentioned in my previous comment.
Best regards,
Jorge
I have downloaded the source for each of the crates that depend on http-types:
Then I have cheched out the version that was in the dependencies (git checkout tags/cargo update
and http-types have moved to 1.3.1. My point is, if 1.2.0 is incompatible, why isn't it uploaded automatically? Shouldn't they all require http-types = "1.3"
?
This is my cargo file, btw:
[package]
name = "tide-api"
version = "0.1.0"
authors = ["Me"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
async-std = { version = "1.5.0", features = ["attributes"] }
tide = "0.9"
Best regards,
Jorge
I believe you need to switch to async-std 1.6.0 and run cargo update
Thank you @jbr! As I mentioned in my last message, It worked with async-std 1.5 in Cargo.toml. It was actually downloading 1.6. My final comment, and what I belive should be solved, is that some configurations that don't compile are allowed by the version of http-types in the 5 crates mentioned above. My question is then, should we update the dependencies in those to reflect the fact that at least 1.3 is required for http-types to successfully compile?
Best regards,
Jorge
I'm not sure what the next step is for this issue. Is the concern that people need to run cargo update? Or that it is possible to specify conflicting versions that are caught by the compiler instead of by cargo's semver?
Please update the title of this issue if I mischaracterized the concern
Closing because this seems to be more of a cargo issue than a tide issue, if I understand the concern
Hi all,
First let me thank you for your work on tide. I am trying to implement a simple REST API with it.
Today I found out that you have updated Tide during the weekend to 0.9.0. I have decided to give it a try and learn what has been added and changed to the crate. However, I haven´t been able to compile it and make it work.
std::option::Option
, found enumstd::result::Result
std::option::Option
, found enumstd::result::Result
error: aborting due to 2 previous errors
For more information about this error, try
rustc --explain E0308
. error: could not compilehttp-types
.To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed`
I have then tried to go back to 0.8.1. And after cargo clean and cargo run I get the same errors. This seems to be related to my rustup update. `rustup show Default host: x86_64-apple-darwin rustup home: /Users/jorge/.rustup
stable-x86_64-apple-darwin (default) rustc 1.43.1 (8d69840ab 2020-05-04) `
Is there something I need to do? Thanks again.
Best regards,
Jorge