Skip to content
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

Can't compile when the header is enabled and the form feature is disabled. #1106

Closed
MarcelCoding opened this issue Jun 18, 2022 · 1 comment · Fixed by #1107
Closed

Can't compile when the header is enabled and the form feature is disabled. #1106

MarcelCoding opened this issue Jun 18, 2022 · 1 comment · Fixed by #1107
Labels
A-axum E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@MarcelCoding
Copy link

Bug Report

Version

├── axum v0.5.8
│   ├── axum-core v0.2.6
├── axum-extra v0.3.4
│   ├── axum v0.5.8 (*)

Platform

Linux pc-marcel 5.18.5-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 16 14:51:11 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Crates

https://github.com/MarcelCoding/jitsi-openid/blob/681f0f68806edae42dd7b06fce1de8547199bbba/Cargo.toml#L7-L20

Description

If you try to compile using the header but not using the form feature the following error happens:

/home/marcel/.cargo/bin/cargo build --color=always --message-format=json-diagnostic-rendered-ansi --package jitsi-openid --bin jitsi-openid
   Compiling axum v0.5.8
error[E0432]: unresolved import `form`
   --> /home/marcel/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-0.5.8/src/lib.rs:441:9
    |
441 | pub use form::Form;
    |         ^^^^ use of undeclared crate or module `form`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `axum` due to 2 previous errors
Process finished with exit code 101

This error does not happen if you activate the form feature.

My uneducated guess is that the is missing a feature check for the form feature:
https://github.com/tokio-rs/axum/blob/main/axum/src/lib.rs#L440

@davidpdrsn
Copy link
Member

Thanks! Looks like I fat fingered that in #1095. Kinda surprised CI didn't catch it 🤔

@davidpdrsn davidpdrsn added A-axum E-help-wanted Call for participation: Help is requested to fix this issue. labels Jun 18, 2022
cballenar referenced this issue in jakobhellermann/wasm-server-runner Jun 18, 2022
Adding form to axum to account for requirement in v0.5.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-axum E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants