findepi commented on issue #13814:
URL: https://github.com/apache/datafusion/issues/13814#issuecomment-3096736712

   Sometimes different feature flags are result of different crates depending 
on different features. In such case, having workspace-level definition of 
features is a solution, as @alamb pointed out.
   
   Sometimes, however, different flags are result of dependencies needing 
different features -- of datafusion, or more likely, of one of datafusion 
dependencies. Workspace-wide `Cargo.toml` is not sufficient to help with this, 
because the recompilation may be triggered by a 3rd party crate not depended-on 
explicitly.
   
   I found two things to be helpful
   
   - Hakari "workspace hack" https://crates.io/crates/hakari, which unifies 
features across transitive dependencies
   - Adding this to root `Cargo.toml`
     ```
     [profile.dev.build-override]
     # Some libraries (e.g. syn, proc-macro2 and all their dependencies) are 
compiled
     # *for* the build, and also depended-on by tests (because we have 
proc-macro crates).
     # Tests compile with debug symbols enabled, otherwise debug symbols are 
disabled by default.
     # Force debug symbols to be always enabled to increase cache reuse between 
`cargo test`
     # and `cargo build/run --bin` invocations.
     debug = true
     ```
   
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to