ITADN

Compiler Error with features sqlx-postgres and proxy

#2990Closedmsrd0 创建于 2026-03-06
M
msrd0commented
<!-- Welcome! Thank you for reporting bugs! First of all, please star our repo. Your support is vital to the continued maintenance of SeaORM. Want to ask a question? You can reach us via: - Discord: https://discord.com/invite/uCPdDXzbdv - GitHub Discussions: https://github.com/SeaQL/sea-orm/discussions/new Please make sure that you are not asking for a missing feature; a bug is incorrect behavior - either in the feature specification or implementation. Feature requests should be first raised in discussions. Please also make sure your description is clear and precise - maintainers don't have access to your code and can't see what you have seen. Please avoid vague descriptions like "they are different" or "the program crashes" - in either case, provide exact information. If you are certain there is a bug, please provide a reproducible example, which helps the investigator to pin-point the bug and the implementor to verify that a solution is satisfactory. Bug reports without reproducible example may be closed or dangle forever. Finally, please search for existing issues and discussions before submission. Feel free to revive old threads if you have new information to add, but please don't ask for ETA or "+1". --> ## Description ``` $ git checkout 1.1.19 $ cargo build --no-default-features --features proxy,sqlx-postgres Compiling sea-orm v1.1.19 (/home/msrd0/git/sea-orm) warning: unexpected `cfg` condition value: `with-mac_address` --> src/driver/sqlx_postgres.rs:653:31 | 653 | #[cfg(feature = "with-mac_address")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `bigdecimal`, `chrono`, `debug-print`, `default`, `ipnetwork`, `json-array`, `macros`, `mariadb-use-returning`, `mock`, `pgvector`, `postgres-array`, `postgres-vector`, `proxy`, `runtime-actix`, `runtime-actix-native-tls`, `runtime-actix-rustls`, `runtime-async-std`, `runtime-async-std-native-tls`, `runtime-async-std-rustls`, `runtime-tokio`, `runtime-tokio-native-tls`, `runtime-tokio-rustls`, `rust_decimal`, `sea-orm-internal`, `sea-query-binder`, `seaography`, `serde_json`, `sqlite-use-returning-for-3_35`, `sqlx`, `sqlx-all`, `sqlx-dep`, `sqlx-mysql`, `sqlx-postgres`, `sqlx-sqlite`, and `tests-cfg` and 9 more = help: consider adding `with-mac_address` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `with-mac_address` --> src/driver/sqlx_postgres.rs:659:35 | 659 | #[cfg(all(feature = "with-mac_address", feature = "postgres-array"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `bigdecimal`, `chrono`, `debug-print`, `default`, `ipnetwork`, `json-array`, `macros`, `mariadb-use-returning`, `mock`, `pgvector`, `postgres-array`, `postgres-vector`, `proxy`, `runtime-actix`, `runtime-actix-native-tls`, `runtime-actix-rustls`, `runtime-async-std`, `runtime-async-std-native-tls`, `runtime-async-std-rustls`, `runtime-tokio`, `runtime-tokio-native-tls`, `runtime-tokio-rustls`, `rust_decimal`, `sea-orm-internal`, `sea-query-binder`, `seaography`, `serde_json`, `sqlite-use-returning-for-3_35`, `sqlx`, `sqlx-all`, `sqlx-dep`, `sqlx-mysql`, `sqlx-postgres`, `sqlx-sqlite`, and `tests-cfg` and 9 more = help: consider adding `with-mac_address` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration error[E0599]: no variant or associated item named `Json` found for enum `sea_query::Value` in the current scope --> src/driver/sqlx_postgres.rs:614:52 | 614 | "JSON" | "JSONB" => Value::Json( | ^^^^ variant or associated item not found in `sea_query::Value` error[E0599]: no variant or associated item named `Json` found for enum `ArrayType` in the current scope --> src/driver/sqlx_postgres.rs:621:51 | 621 | ... sea_query::ArrayType::Json, | ^^^^ variant or associated item not found in `ArrayType` error[E0599]: no variant or associated item named `Json` found for enum `sea_query::Value` in the current scope --> src/driver/sqlx_postgres.rs:627:63 | 627 | ... .map(|val| Value::Json(Some(Box::new(val)))) | ^^^^ variant or associated item not found in `sea_query::Value` warning: value assigned to `self` is never read --> src/database/transaction.rs:152:9 | 152 | self.open = false; | ^^^^^^^^^^^^^^^^^ | = help: maybe it is overwritten before being read? = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default warning: value assigned to `self` is never read --> src/database/transaction.rs:192:9 | 192 | self.open = false; | ^^^^^^^^^^^^^^^^^ | = help: maybe it is overwritten before being read? For more information about this error, try `rustc --explain E0599`. warning: `sea-orm` (lib) generated 4 warnings error: could not compile `sea-orm` (lib) due to 3 previous errors; 4 warnings emitted ``` ## Steps to Reproduce see above ### Expected Behavior no error ### Actual Behavior error ### Reproduces How Often as often as attempted ### Workarounds enable with-json feature eventhough it is not needed ## Versions <!-- You can get this information from the output of `cargo tree | grep sea-` from the console. Also, please include the database and OS that you are running. --> git tag 1.1.19 of this very repository
关闭于 2026-03-08 0 条评论