From 19c5f1834e15ad5ee9ee4d6e0ae35a4e6c05e46d Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Mon, 2 Mar 2026 01:02:57 +0000 Subject: [PATCH 1/2] fix(task): remove deprecated `# mise` task header syntax The old `# mise ...` syntax was deprecated in favor of `#MISE ...` and scheduled for removal in 2026.3.0. Remove the old syntax handling and the debug_assert reminder that was causing panics in debug builds. Co-Authored-By: Claude Opus 4.6 --- src/task/mod.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/task/mod.rs b/src/task/mod.rs index 85337c8585..cc45b00f4c 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -1,4 +1,3 @@ -use crate::cli::version::VERSION; use crate::config::config_file::mise_toml::EnvList; use crate::config::config_file::toml::{TrackingTomlParser, deserialize_arr}; use crate::config::env_directive::{EnvDirective, EnvResolveOptions, EnvResults, ToolsFilter}; @@ -306,25 +305,7 @@ impl Task { let info = file::read_to_string(path)? .lines() .filter_map(|line| { - debug_assert!( - !VERSION.starts_with("2026.3"), - "remove old syntax `# mise`" - ); - if let Some(captures) = - regex!(r"^(?:#|//|::)(?:MISE| ?\[MISE\]) ([a-z0-9_.-]+=[^\n]+)$").captures(line) - { - Some(captures) - } else if let Some(captures) = regex!(r"^(?:#|//) mise ([a-z0-9_.-]+=[^\n]+)$") - .captures(line) - { - deprecated!( - "file_task_headers_old_syntax", - "The `# mise ...` syntax for task headers is deprecated and will be removed in mise 2026.3.0. Use the new `#MISE ...` syntax instead." - ); - Some(captures) - } else { - None - } + regex!(r"^(?:#|//|::)(?:MISE| ?\[MISE\]) ([a-z0-9_.-]+=[^\n]+)$").captures(line) }) .map(|captures| captures.extract().1) .map(|[toml]| { From 781a543f8fd83a051729081c266f3b2d20c79796 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Mon, 2 Mar 2026 01:11:44 +0000 Subject: [PATCH 2/2] fix(task): update test to use new #MISE header syntax The test_from_path_invalid_toml test was still using the old deprecated `# mise` syntax which is no longer parsed after the previous commit. Co-Authored-By: Claude Opus 4.6 --- src/task/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/task/mod.rs b/src/task/mod.rs index cc45b00f4c..d05197edfb 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -1621,8 +1621,8 @@ echo "hello world" fs::write( &task_path, r#"#!/bin/bash -# mise description="test task" -# mise env={invalid=toml=here} +#MISE description="test task" +#MISE env={invalid=toml=here} echo "hello world" "#, )