From d5a24a5cee3b69e4a2a72a9ece3eeec3c78c9c49 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Mon, 14 Sep 2026 14:04:45 -0700 Subject: [PATCH 1/4] Fix bicep extension to require transport to be specified otherwise return error --- dsc-bicep-ext/locales/en-us.toml | 1 + dsc-bicep-ext/src/main.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dsc-bicep-ext/locales/en-us.toml b/dsc-bicep-ext/locales/en-us.toml index c0c0957f9..eed2a949b 100644 --- a/dsc-bicep-ext/locales/en-us.toml +++ b/dsc-bicep-ext/locales/en-us.toml @@ -4,4 +4,5 @@ _version = 1 functionCalled = "Bicep gRPC '%{function}' called for '%{resourceType}@%{version}': '%{properties}'" serverStarting = "Starting Bicep gRPC server on %{transport}: %{address}" serverError = "Bicep gRPC server error: %{error}" +transportNotSpecified = "Transport not specified" waitForDebugger = "Press any key to continue after attaching to PID: {pid}" diff --git a/dsc-bicep-ext/src/main.rs b/dsc-bicep-ext/src/main.rs index ffbe56a5f..6e1e82904 100644 --- a/dsc-bicep-ext/src/main.rs +++ b/dsc-bicep-ext/src/main.rs @@ -460,8 +460,9 @@ async fn run_server( return Ok(()); } - // Default to HTTP server on [::1]:50051 if no transport specified - let addr = http.unwrap_or_else(|| "[::1]:50051".to_string()); + let Some(addr) = http else { + return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, t!("bicep.transportNotSpecified")))); + }; tracing::info!( "{}", t!( From 96fca88d690f18a7b727c72a7cb6793675c74d6b Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Mon, 14 Sep 2026 14:06:24 -0700 Subject: [PATCH 2/4] Update version of extension --- Cargo.lock | 2 +- dsc-bicep-ext/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4f4f42a6..04f9ea564 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -779,7 +779,7 @@ dependencies = [ [[package]] name = "dsc-bicep-ext" -version = "0.1.0" +version = "0.1.1" dependencies = [ "async-stream", "clap", diff --git a/dsc-bicep-ext/Cargo.toml b/dsc-bicep-ext/Cargo.toml index d930002af..69d8def58 100644 --- a/dsc-bicep-ext/Cargo.toml +++ b/dsc-bicep-ext/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dsc-bicep-ext" -version = "0.1.0" +version = "0.1.1" edition = "2024" [[bin]] From 283caf8c966fb876f23e028d00ff7eb29a131966 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Mon, 14 Sep 2026 14:23:18 -0700 Subject: [PATCH 3/4] address feedback --- dsc-bicep-ext/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsc-bicep-ext/src/main.rs b/dsc-bicep-ext/src/main.rs index 6e1e82904..6e1715e78 100644 --- a/dsc-bicep-ext/src/main.rs +++ b/dsc-bicep-ext/src/main.rs @@ -461,7 +461,7 @@ async fn run_server( } let Some(addr) = http else { - return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, t!("bicep.transportNotSpecified")))); + return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, t!("bicep.transportNotSpecified").to_string()))); }; tracing::info!( "{}", From c6baa28d799111e28cc99e31e1ceb1b3b9859488 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Mon, 14 Sep 2026 14:34:12 -0700 Subject: [PATCH 4/4] fix clippy --- dsc-bicep-ext/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsc-bicep-ext/src/main.rs b/dsc-bicep-ext/src/main.rs index 6e1715e78..746ded95e 100644 --- a/dsc-bicep-ext/src/main.rs +++ b/dsc-bicep-ext/src/main.rs @@ -461,7 +461,7 @@ async fn run_server( } let Some(addr) = http else { - return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, t!("bicep.transportNotSpecified").to_string()))); + return Err(Box::new(std::io::Error::other(t!("bicep.transportNotSpecified").to_string()))); }; tracing::info!( "{}",