From d14254499e8fc8fe76a049ab085b83c9141ef3da Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Dec 2024 14:49:49 +0100 Subject: [PATCH] add conditional compilation --- .../crates/turbo-tasks-backend/src/backend/operation/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs b/turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs index 1de09e95e737d..7b0c72b3e03e0 100644 --- a/turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs +++ b/turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs @@ -406,12 +406,14 @@ impl TaskGuardImpl<'_, B> { // This category is used for non-persisted data } TaskDataCategory::Data => { + #[cfg(debug_assertions)] debug_assert!( self.category == TaskDataCategory::Data || self.category == TaskDataCategory::All ); } TaskDataCategory::Meta => { + #[cfg(debug_assertions)] debug_assert!( self.category == TaskDataCategory::Meta || self.category == TaskDataCategory::All