You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was very confused when I got this error pointing to the default route that comes with the template.
ERROR:
x I don't know how to handle the type returned by `app::routes::system::health_check`.
|
| ,-[app/src/routes/mod.rs:10:1]
| 10 | pub fn handler(bp:&mut Blueprint){
| 11 | bp.route(GET,"/healthz",f!(crate::routes::system::health_check));
| : ^^^^^^^^^^^^^^^^^^^|^^^^^^^^^^^^^^^^^^^
| : `-- The request handler was registered here
| 12 | }
| `----
| ,-[app/src/routes/system.rs:4:1]
| 4 | #[must_use]
| 5 | pub const fnhealth_check() -> StatusCode{
| : ^^^^^|^^^^
| : `-- The output type that I can't handle
| 6 | StatusCode::OK
| `----
Turns out, the error triggers when you try to import a crate which uses a different version of a dependency your app crate also requires. I've created an example repo with two commits. The first one does not compile with the above error, while mirroring the features on the app crate compiles without issues.
The text was updated successfully, but these errors were encountered:
Setting PAVEX_DEBUG=1 before executing cargo px check surfaces the deeper error message:
There are multiple packages named `http` among the dependencies of app 0.0.0 (path+file:///Users/luca/code/scratch/
pavex_statuscode_repro/app). In order to disambiguate among them, I need to know their versions.
Unfortunately, I couldn't extract the expected version for `http` from HTML root URL included in the JSON documentation for
`app 0.0.0 (path+file:///Users/luca/code/scratch/pavex_statuscode_repro/app)`.
This due to a limitation in `rustdoc` itself: follow https://github.com/rust-lang/compiler-team/issues/622 to track
progress on this issue.
To fix this properly, I'd need to see some progress on rust-lang/compiler-team#635, but we can definitely return a better error message.
I was very confused when I got this error pointing to the default route that comes with the template.
Turns out, the error triggers when you try to import a crate which uses a different version of a dependency your
app
crate also requires. I've created an example repo with two commits. The first one does not compile with the above error, while mirroring the features on theapp
crate compiles without issues.The text was updated successfully, but these errors were encountered: