avantgardnerio commented on code in PR #2397: URL: https://github.com/apache/datafusion-ballista/pull/2397#discussion_r3897652776
########## ballista/api-types/Cargo.toml: ########## @@ -26,5 +26,13 @@ authors = ["Apache DataFusion <[email protected]>"] edition = { workspace = true } rust-version = { workspace = true } +[features] +default = [] +utoipa = ["dep:utoipa"] + [dependencies] serde = { workspace = true, features = ["derive"] } +utoipa = { workspace = true, optional = true } + +[dev-dependencies] +serde_json = { workspace = true } Review Comment: Following up on @andygrove's note that this only runs when feature unification turns `utoipa` on from the scheduler side: `cargo test -p ballista-api-types` still reports `0 tests`. A self dev-dependency enables the feature for the test build only: ```suggestion [dev-dependencies] ballista-api-types = { path = ".", features = ["utoipa"] } serde_json = { workspace = true } ``` The `#[cfg(all(test, feature = "utoipa"))]` gate in `dto.rs` should stay as it is, since the derives are gated the same way. I ran this locally: `cargo test -p ballista-api-types` goes from `0 tests` to running `dto::tests::test_dto_schemas`, and downstream users are unaffected. Dev-dependencies are not part of `cargo build`, and `cargo package` drops the path-only self-dependency from the published manifest. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
