From 69cd0a6b1a78c9c793b549256d76c879b48cb3db Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Fri, 20 Jan 2023 14:52:49 -0800 Subject: [PATCH] Add deprecation notice to `cranelift_use_egraphs` option. (#5610) After #5587, this is on by default. We are retaining the traditional (no-egraphs) path for now, selected by setting this option to `false`, but we eventually plan to delete it assuming that we don't find serious regressions or issues. This PR adds a deprecation notice to the option. --- crates/fuzzing/src/generators/config.rs | 1 + crates/wasmtime/src/config.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rs index aaf435c013..c3016fa6c1 100644 --- a/crates/fuzzing/src/generators/config.rs +++ b/crates/fuzzing/src/generators/config.rs @@ -141,6 +141,7 @@ impl Config { } /// Converts this to a `wasmtime::Config` object + #[allow(deprecated)] // Allow use of `cranelift_use_egraphs` below. pub fn to_wasmtime(&self) -> wasmtime::Config { crate::init_fuzzing(); log::debug!("creating wasmtime config with {:#?}", self.wasmtime); diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 7e42afbc40..88622bc312 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -841,6 +841,10 @@ impl Config { /// The default value for this is `true`. #[cfg(compiler)] #[cfg_attr(nightlydoc, doc(cfg(feature = "cranelift")))] // see build.rs + #[deprecated( + since = "5.0.0", + note = "egraphs will be the default and this method will be removed in a future version." + )] pub fn cranelift_use_egraphs(&mut self, enable: bool) -> &mut Self { let val = if enable { "true" } else { "false" }; self.compiler_config