From f17ba8236a87685219c10dc756aa4139c1e4c3a8 Mon Sep 17 00:00:00 2001 From: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> Date: Sun, 1 Dec 2024 14:57:23 +0100 Subject: [PATCH] fix: Disable default features for server SDK's dependencies (#386) --- libs/pavexc/src/compiler/codegen/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/pavexc/src/compiler/codegen/mod.rs b/libs/pavexc/src/compiler/codegen/mod.rs index 930e65113..ec5ebc98b 100644 --- a/libs/pavexc/src/compiler/codegen/mod.rs +++ b/libs/pavexc/src/compiler/codegen/mod.rs @@ -336,6 +336,14 @@ where let version = metadata.version(); let mut dependency_details = DependencyDetail { version: Some(version.to_string()), + // We disable default features to avoid enabling by mistake + // features that were explicitly disabled in the app manifest. + // This is a conservative choice, but it's better to be safe than sorry. + // We can use a more fine-grained approach in the future if needed, e.g. by + // analyzing which features are actually used in the code. + // Until then, we rely on feature unification to ensure everything works as expected + // in the final binary. + default_features: Some(false), ..DependencyDetail::default() }; if needs_rename {