Skip to content

fix(task): remove deprecated # mise task header syntax#8403

Merged
jdx merged 2 commits into
mainfrom
fix/remove-deprecated-mise-task-header-syntax
Mar 2, 2026
Merged

fix(task): remove deprecated # mise task header syntax#8403
jdx merged 2 commits into
mainfrom
fix/remove-deprecated-mise-task-header-syntax

Conversation

@jdx

@jdx jdx commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove the old deprecated # mise ... file task header syntax that was scheduled for removal in 2026.3.0
  • Remove the debug_assert! that was causing panics in debug builds now that it's March 2026
  • Only the #MISE / # [MISE] / //MISE / ::MISE syntax is now supported

Fixes the panic in the release-plz CI job: https://github.com/jdx/mise/actions/runs/22556327882/job/65334256964

Test plan

  • mise run lint-fix passes
  • Docs already use #MISE syntax exclusively — no doc changes needed
  • E2E tests already use #MISE syntax 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 #MISE headers when validating invalid-TOML error handling.

Written by Cursor Bugbot for commit 781a543. This will update automatically on new commits. Configure here.

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>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Deprecated Syntax Removal: Removed the old # mise ... file task header syntax, which was scheduled for removal in mise 2026.3.0.
  • Debug Assertion Removal: Removed a debug_assert! that was causing panics in debug builds, now that the scheduled removal date (March 2026) has passed.
  • Supported Syntax: Ensured only the #MISE, #[MISE], //MISE, and ::MISE syntaxes are now supported for task headers.
Changelog
  • src/task/mod.rs
    • Removed the VERSION import as it's no longer needed for the debug_assert!.
    • Eliminated the debug_assert! that checked for the 2026.3 version, as the deprecation period has ended.
    • Removed the conditional logic that handled the deprecated # mise ... task header syntax, consolidating parsing to only support the current #MISE variants.
Activity
  • Identified and fixed a panic occurring in the release-plz CI job.
  • Confirmed that mise run lint-fix passes.
  • Verified that documentation and E2E tests already exclusively use the new #MISE syntax, requiring no further changes.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/task/mod.rs
Comment on lines 307 to 309
.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)
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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());
}

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/task/mod.rs
@greptile-apps

greptile-apps Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the deprecated # mise task header syntax that was scheduled for removal in 2026.3.0 (now past due). The changes simplify the code by removing the old regex pattern, deprecation warning, and the debug_assert! that was causing panics in debug builds.

Key changes:

  • Removed VERSION import (no longer needed)
  • Removed debug_assert! that panicked in 2026.3+ versions
  • Removed regex matching old # mise syntax
  • Removed deprecation warning for old syntax
  • Only #MISE, # [MISE], //MISE, and ::MISE syntax is now supported

Issue found:

  • Test test_from_path_invalid_toml at lines 1624-1625 still uses the old deprecated syntax and will fail to test invalid TOML parsing as intended

Confidence Score: 3/5

  • This PR has the right approach but contains a test that will no longer function correctly
  • The deprecation removal is correctly timed and well-executed, but the overlooked test using old syntax will break the test's intended validation of invalid TOML parsing
  • src/task/mod.rs - lines 1624-1625 need to be updated to use #MISE syntax

Important Files Changed

Filename Overview
src/task/mod.rs Removes deprecated # mise task header syntax and debug assertion, but test at line 1624 still uses old syntax

Fix All in Claude Code

Last reviewed commit: 19c5f18

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps

greptile-apps Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor
Additional Comments (1)

src/task/mod.rs
test uses the old deprecated # mise syntax which won't be recognized after this change - update to #MISE syntax

#MISE description="test task"
#MISE env={invalid=toml=here}

Fix in Claude Code

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>
@jdx jdx enabled auto-merge (squash) March 2, 2026 01:18
@jdx jdx merged commit 93c8efe into main Mar 2, 2026
35 checks passed
@jdx jdx deleted the fix/remove-deprecated-mise-task-header-syntax branch March 2, 2026 01:25
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

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%

jdx pushed a commit that referenced this pull request Mar 2, 2026
### 🚀 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant