fix(task): remove deprecated # mise task header syntax#8403
Conversation
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 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the task header parsing logic by removing a previously deprecated syntax and an associated debug assertion. The changes ensure that only the modern, standardized task header formats are recognized, resolving a panic in CI and simplifying the codebase. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly removes the deprecated # mise task header syntax and the associated debug_assert!. The changes are clean and align with the goal of the PR. The included comment regarding a unit test that will likely fail due to this change and needs to be updated is valid.
| .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) | ||
| }) |
There was a problem hiding this comment.
This change correctly removes support for the deprecated # mise syntax. However, this will likely cause the unit test test_from_path_invalid_toml (in this same file) to fail. That test asserts that invalid TOML in a # mise header causes an error. With this change, the line is simply ignored.
Please consider updating the test to assert that parsing a file with the old syntax now succeeds without error. For example:
#[tokio::test]
async fn test_from_path_invalid_toml() {
// ... setup ...
fs::write(
&task_path,
r#"#!/bin/bash
# mise description="test task"
# mise env={invalid=toml=here}
echo "hello world"
"#,
)
.unwrap();
let result = Task::from_path(&config, &task_path, temp_dir.path(), temp_dir.path()).await;
// The old `# mise` syntax is now ignored, so this should not produce an error.
assert!(result.is_ok());
}There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Greptile SummaryThis PR removes the deprecated Key changes:
Issue found:
Confidence Score: 3/5
Important Files Changed
Last reviewed commit: 19c5f18 |
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 <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.24 x -- echo |
28.8 ± 0.8 | 27.4 | 34.5 | 1.20 ± 0.05 |
mise x -- echo |
23.9 ± 0.8 | 22.9 | 33.2 | 1.00 |
✅ Performance improvement for x -- echo is 20% |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.24 env |
28.0 ± 0.6 | 26.9 | 33.9 | 1.19 ± 0.07 |
mise env |
23.5 ± 1.3 | 22.5 | 49.6 | 1.00 |
✅ Performance improvement for env is 19% |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.24 hook-env |
29.1 ± 0.8 | 27.6 | 34.7 | 1.21 ± 0.04 |
mise hook-env |
24.1 ± 0.6 | 23.2 | 27.1 | 1.00 |
✅ Performance improvement for hook-env is 21% |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.24 ls |
23.1 ± 0.6 | 22.1 | 28.9 | 1.06 ± 0.04 |
mise ls |
21.8 ± 0.5 | 21.0 | 25.1 | 1.00 |
xtasks/test/perf
| Command | mise-2026.2.24 | mise | Variance |
|---|---|---|---|
| install (cached) | 162ms | 150ms | +8% |
| ls (cached) | 89ms | 81ms | +9% |
| bin-paths (cached) | 96ms | ✅ 85ms | +12% |
| task-ls (cached) | 839ms | 822ms | +2% |
✅ Performance improvement: bin-paths cached is 12%
### 🚀 Features - **(hooks)** add task references to hooks and watch_files by @jdx in [#8400](#8400) - **(prepare)** add git-submodule built-in provider by @jdx in [#8407](#8407) - **(prepare)** add human-readable stale reasons to prepare output by @jdx in [#8408](#8408) - **(prepare)** add dependency ordering to prepare steps by @jdx in [#8401](#8401) - **(prepare)** add --explain flag for provider diagnostics by @jdx in [#8409](#8409) - **(prepare)** add per-provider timeout support by @jdx in [#8405](#8405) - **(prepare)** add blake3 content-hash freshness checking by @jdx in [#8404](#8404) - **(tasks)** monorepo vars and per-task vars by @halms in [#8248](#8248) ### 🐛 Bug Fixes - **(aqua)** restore bin_paths disk cache with fresh_file invalidation by @jdx in [#8398](#8398) - **(idiomatic)** use generic parser for idiomatic files by @risu729 in [#8171](#8171) - **(install)** apply precompiled options to all platforms in lockfile by @jdx in [#8396](#8396) - **(install)** normalize "v" prefix when matching lockfile versions by @jdx in [#8413](#8413) - **(prepare)** improve git submodule parser and fix check_staleness error handling by @jdx in [#8412](#8412) - **(python)** respect precompiled settings in lock file generation by @jdx in [#8399](#8399) - **(python)** clarify uv_venv_auto docs + prevent uv shim recursion in venv creation by @halms in [#8402](#8402) - **(task)** remove deprecated `# mise` task header syntax by @jdx in [#8403](#8403) - **(vfox)** avoid eager metadata loading during config file detection by @jdx in [#8397](#8397) - clarify GitHub attestations to be artifact ones by @scop in [#8394](#8394) - ignore comments in idiomatic version files by @iloveitaly in [#7682](#7682) ### 🚜 Refactor - unify archive detection by @risu729 in [#8137](#8137) ### 📚 Documentation - remove duplicated docs for npm.package_manager by @risu729 in [#8414](#8414)
Summary
# mise ...file task header syntax that was scheduled for removal in 2026.3.0debug_assert!that was causing panics in debug builds now that it's March 2026#MISE/# [MISE]///MISE/::MISEsyntax is now supportedFixes the panic in the
release-plzCI job: https://github.com/jdx/mise/actions/runs/22556327882/job/65334256964Test plan
mise run lint-fixpasses#MISEsyntax exclusively — no doc changes needed#MISEsyntax exclusively — no test changes needed🤖 Generated with Claude Code
Note
Medium Risk
Removes backward-compatible parsing for the deprecated
# mise ...task header format, which may break users still relying on it. Change is localized to task file header parsing and associated tests.Overview
Task file header parsing now only recognizes the
#MISE/# [MISE](and related///::) header formats; the deprecated# mise ...header syntax, its deprecation warning, and the debug-only assertion guarding its removal are deleted.Tests are updated to use
#MISEheaders when validating invalid-TOML error handling.Written by Cursor Bugbot for commit 781a543. This will update automatically on new commits. Configure here.