Forráskód Böngészése

add warning when hot_reload is used in release builds

Evan Almloff 3 éve
szülő
commit
41e905144c
1 módosított fájl, 6 hozzáadás és 0 törlés
  1. 6 0
      packages/rsx_interpreter/src/lib.rs

+ 6 - 0
packages/rsx_interpreter/src/lib.rs

@@ -31,6 +31,12 @@ pub struct CodeLocation {
 }
 }
 
 
 /// Get the resolved rsx given the origional rsx, a captured context of dynamic components, and a factory to build the resulting node
 /// Get the resolved rsx given the origional rsx, a captured context of dynamic components, and a factory to build the resulting node
+#[cfg_attr(
+    not(debug_assertions),
+    deprecated(
+        note = "The hot reload feature is enabled in release mode. This feature should be disabled for production builds."
+    )
+)]
 pub fn resolve_scope<'a>(
 pub fn resolve_scope<'a>(
     location: CodeLocation,
     location: CodeLocation,
     rsx: &'static str,
     rsx: &'static str,