Skip to content

fix(schema): support structured objects in task depends#8463

Merged
jdx merged 3 commits intojdx:mainfrom
risu729:depends-task-schema
Mar 5, 2026
Merged

fix(schema): support structured objects in task depends#8463
jdx merged 3 commits intojdx:mainfrom
risu729:depends-task-schema

Conversation

@risu729
Copy link
Copy Markdown
Contributor

@risu729 risu729 commented Mar 4, 2026

Updates the JSON schema definitions in schema/mise.json and schema/mise-task.json to officially support the structured { task: string, args?: string[], env?: { [key]: string } } syntax for depends, depends_post, and wait_for. The Rust codebase already properly supported this resolution via wildcards and matching.

The env configuration continues to be checked strictly as a string-to-string IndexMap to align with the Rust TaskDep deserialization constraints.

@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 enhances the flexibility of task management by updating the JSON schemas for mise.json and mise-task.json. It introduces formal support for defining task dependencies, post-dependencies, and wait conditions using structured objects, which can specify a task name, arguments, and environment variables. This change brings the schema definitions in line with the existing capabilities of the Rust implementation, ensuring that configurations can accurately reflect the advanced dependency structures already supported.

Highlights

  • Schema Updates for Structured Task Dependencies: The JSON schemas for mise.json and mise-task.json have been updated to formally support structured objects within depends, depends_post, and wait_for fields, allowing for explicit task, args, and env definitions.
  • Alignment with Existing Functionality: This change formalizes schema definitions to match the existing Rust codebase's support for structured task dependency resolution, which already handled wildcards and matching.
  • Strict env Configuration: The env configuration within these structured task objects continues to be strictly checked as a string-to-string IndexMap to align with Rust TaskDep deserialization constraints.
Changelog
  • schema/mise-task.json
    • Added support for structured task objects (with task, args, env properties) to the depends array.
    • Added support for structured task objects to the depends_post array.
    • Extended the wait_for array to accept structured task objects, alongside strings and string arrays.
  • schema/mise.json
    • Added support for structured task objects (with task, args, env properties) to the depends array.
    • Added support for structured task objects to the depends_post array.
    • Extended the wait_for array to accept structured task objects, alongside strings and string arrays.
Activity
  • No specific human activity (comments, reviews, or progress updates) has been recorded for this pull request since its creation.
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.

@risu729 risu729 changed the title feat(schema): support structured objects in task depends fix(schema): support structured objects in task depends Mar 4, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 4, 2026

Greptile Summary

This PR updates schema/mise-task.json and schema/mise.json to formally document the structured object syntax ({ task, args, env }) for items within depends, depends_post, and wait_for arrays. It also adds the previously-missing array-of-strings form to wait_for items. Both changes bring the JSON Schema into alignment with the existing Rust TaskDep deserializer in src/task/task_dep.rs, which has supported all three forms (string, array, object) for some time.

  • depends / depends_post: Object form { task: string (required), args?: string[], env?: Record<string,string> } added as a third oneOf variant to each item; prior schema only covered string and array.
  • wait_for: Both the array-of-strings form and the new object form are added to item oneOf; prior schema only permitted plain strings as items.
  • env in object form: Correctly typed as additionalProperties: { type: "string" }, matching the Rust IndexMap<String, String> field and the PR author's stated intent.
  • additionalProperties: false on the object variant correctly mirrors the Rust deserializer's unknown_field error for any key outside task, args, env.
  • Changes are applied consistently across all three task definition contexts in mise.json (inline tasks and the two file-task sections).

Confidence Score: 5/5

  • Safe to merge — schema-only change that accurately reflects the existing Rust implementation with no functional risk.
  • All three TaskDep deserialization paths (string, array, object) are correctly represented in the updated schema. The env type constraint (string values only) matches the Rust IndexMap<String, String>. additionalProperties: false correctly mirrors the Rust unknown-field rejection. The update is applied consistently across all relevant locations in both schema files. There is no application logic change — only JSON Schema documentation is updated.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Task dependency field\n(depends / depends_post / wait_for)"] --> B{Outer form}
    B -->|string| C["Single task name\ne.g. 'build'"]
    B -->|array| D["Array of items"]
    D --> E{Item form — oneOf}
    E -->|string| F["Task name\ne.g. 'lint'"]
    E -->|array| G["Task + args\ne.g. ['test', '--fast']"]
    E -->|object NEW| H["Structured object\n{ task, args?, env? }"]
    H --> I["task: string (required)"]
    H --> J["args: string[] (optional)"]
    H --> K["env: Record<string,string> (optional)"]
Loading

Last reviewed commit: 9934bb2

Copy link
Copy Markdown
Contributor

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

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 introduces structured object support for task dependencies in the schema/mise.json and schema/mise-task.json files. The changes add a new schema definition for objects with task, args, and env properties, allowing more complex task dependency configurations. The env configuration remains a string-to-string IndexMap to align with Rust TaskDep deserialization constraints.

Note: Security Review has been skipped due to the limited scope of the PR.

@risu729
Copy link
Copy Markdown
Contributor Author

risu729 commented Mar 5, 2026

/gemini review

Copy link
Copy Markdown
Contributor

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

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 updates the JSON schemas in schema/mise.json and schema/mise-task.json to support structured objects for task dependencies. A new definition, task_dependency_item, is introduced and applied to depends, depends_post, and wait_for. This new definition allows a dependency to be a string, an array of strings, or an object containing task, args, and env fields, which aligns the schema with the documented and implemented behavior. The changes also include numerous formatting adjustments across both schema files.

Note: Security Review has been skipped due to the limited scope of the PR.

@jdx jdx merged commit 8ddd7a5 into jdx:main Mar 5, 2026
33 checks passed
@risu729 risu729 deleted the depends-task-schema branch March 5, 2026 19:37
mise-en-dev added a commit that referenced this pull request Mar 7, 2026
### 🚀 Features

- **(github)** keep exe extensions on Windows by @iki in
[#8424](#8424)
- **(task)** add `interactive` field for exclusive terminal access by
@jdx in [#8491](#8491)
- add header comment to generated lockfiles by @ivy in
[#8481](#8481)
- runtime musl/glibc detection for correct libc variant selection by
@jdx in [#8490](#8490)

### 🐛 Bug Fixes

- **(github)** use registry platform options during install by @jdx in
[#8492](#8492)
- **(http)** store tool opts as native TOML to fix platform switching by
@jdx in [#8448](#8448)
- **(installer)** error if MISE_INSTALL_PATH is a directory by @jdx in
[#8468](#8468)
- **(prepare)** resolve sources/outputs relative to `dir` when set by
@jdx in [#8472](#8472)
- **(ruby)** fetch precompiled binary by release tag instead of listing
all releases by @jdx in [#8488](#8488)
- **(schema)** support structured objects in task depends by @risu729 in
[#8463](#8463)
- **(task)** replace println!/eprintln! with calm_io in task output
macros by @vmaleze in [#8485](#8485)
- handle scoped npm package names without backend prefix by @jdx in
[#8477](#8477)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:copr docker digest to c485c4c by
@renovate[bot] in [#8484](#8484)
- update ghcr.io/jdx/mise:alpine docker digest to 8118bc7 by
@renovate[bot] in [#8483](#8483)

### 📦 Registry

- disable sd version test by @jdx in
[#8489](#8489)

### New Contributors

- @ivy made their first contribution in
[#8481](#8481)
- @iki made their first contribution in
[#8424](#8424)

## 📦 Aqua Registry Updates

#### New Packages (5)

- [`datadog-labs/pup`](https://github.com/datadog-labs/pup)
- [`k1LoW/mo`](https://github.com/k1LoW/mo)
- [`rtk-ai/rtk`](https://github.com/rtk-ai/rtk)
-
[`suzuki-shunsuke/docfresh`](https://github.com/suzuki-shunsuke/docfresh)
- [`yashikota/exiftool-go`](https://github.com/yashikota/exiftool-go)

#### Updated Packages (6)

- [`cloudflare/cloudflared`](https://github.com/cloudflare/cloudflared)
- [`mozilla/sccache`](https://github.com/mozilla/sccache)
- [`owenlamont/ryl`](https://github.com/owenlamont/ryl)
- [`spinel-coop/rv`](https://github.com/spinel-coop/rv)
-
[`technicalpickles/envsense`](https://github.com/technicalpickles/envsense)
- [`weaviate/weaviate`](https://github.com/weaviate/weaviate)
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.

2 participants