From 37fc4ce09d53d26ba8300ad37b2682cfc1f83836 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 11 Jul 2024 10:54:15 -0400 Subject: [PATCH] Allow Zed Nightly to use v0.0.7 of the Zed extension API (#14209) This PR updates the Wasm API compatibility check to allow Nightly to load extensions using v0.0.7 of the Zed extension API. Release Notes: - N/A --- crates/extension/src/wasm_host/wit.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/extension/src/wasm_host/wit.rs b/crates/extension/src/wasm_host/wit.rs index 25e928c97249cc3383d91426280a25b68b1a5e24..8aeb3c49936c30e319d694d22e6aaf81512572c8 100644 --- a/crates/extension/src/wasm_host/wit.rs +++ b/crates/extension/src/wasm_host/wit.rs @@ -49,10 +49,9 @@ pub fn is_supported_wasm_api_version( /// Returns the Wasm API version range that is supported by the Wasm host. #[inline(always)] pub fn wasm_api_version_range(release_channel: ReleaseChannel) -> RangeInclusive { - let max_version = if release_channel == ReleaseChannel::Dev { - latest::MAX_VERSION - } else { - since_v0_0_6::MAX_VERSION + let max_version = match release_channel { + ReleaseChannel::Dev | ReleaseChannel::Nightly => latest::MAX_VERSION, + ReleaseChannel::Stable | ReleaseChannel::Preview => since_v0_0_6::MAX_VERSION, }; since_v0_0_1::MIN_VERSION..=max_version