Skip to content

feat(deps): Add dart and flutter providers#9505

Merged
jdx merged 1 commit intojdx:mainfrom
tjarvstrand:deps-dart-and-flutter-providers
May 1, 2026
Merged

feat(deps): Add dart and flutter providers#9505
jdx merged 1 commit intojdx:mainfrom
tjarvstrand:deps-dart-and-flutter-providers

Conversation

@tjarvstrand
Copy link
Copy Markdown
Contributor

No description provided.

@tjarvstrand tjarvstrand closed this May 1, 2026
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 built-in dependency management support for Dart and Flutter by adding DartDepsProvider and FlutterDepsProvider. The changes include documentation updates, JSON schema additions, and new end-to-end tests. Feedback suggests resolving an inconsistency between the documentation and the implementation regarding lockfile requirements for provider activation. Additionally, it is recommended to refactor the two new providers into a shared implementation to reduce code duplication, as they differ only by the binary name used.

Comment thread docs/dev-tools/deps.md
| `dart` | `pubspec.yaml`, `pubspec.lock` | `.dart_tool/` | `dart pub get` |
| `flutter` | `pubspec.yaml`, `pubspec.lock` | `.dart_tool/` | `flutter pub get` |

Built-in providers are only active when explicitly configured in `mise.toml` and their lockfile exists.
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.

medium

The documentation states that built-in providers are only active when their lockfile exists. However, the implementation for dart and flutter in is_applicable only checks for the existence of pubspec.yaml. This inconsistency should be resolved. It is generally better to allow the provider to be active if the manifest exists (so that mise deps can generate the initial lockfile), so consider updating the documentation to reflect this behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This makes sense to me

Comment thread src/deps/providers/flutter.rs Outdated
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 1, 2026

Greptile Summary

This PR adds dart and flutter as built-in deps providers, sharing a single DartDepsProvider implementation parameterised on the program name (dart or flutter). The providers are correctly registered in BUILTIN_PROVIDERS, build_provider, the JSON schema, and the docs.

  • src/deps/mod.rs was not updated: dart and flutter are absent from the checks array in detect_applicable_providers, so mise edit will never suggest these providers for Dart/Flutter projects.

Confidence Score: 4/5

Providers work correctly when configured manually, but mise edit auto-detection is broken for dart/flutter.

One confirmed P1: detect_applicable_providers was not updated with dart/flutter entries, causing silent failure of mise edit auto-detection for these ecosystems. All other integration points are correct.

src/deps/mod.rs — detect_applicable_providers needs dart and flutter entries added to the checks array.

Important Files Changed

Filename Overview
src/deps/providers/dart.rs New provider for dart/flutter pub; is_applicable intentionally checks the manifest (pubspec.yaml) rather than the lockfile (as discussed in PR thread).
src/deps/engine.rs Correctly wires both dart and flutter provider IDs to DartDepsProvider in build_provider.
e2e/cli/test_deps Adds E2E tests for dart and flutter providers; both tests operate on a pubspec.yaml without a pubspec.lock, consistent with the is_applicable manifest-based check.
docs/dev-tools/deps.md Documents dart and flutter providers with correct source file and install command information.
schema/mise.json Adds dart and flutter as valid deps keys in the JSON schema.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[mise deps / mise edit] --> B{discover_providers or\ndetect_applicable_providers?}
    B -->|discover_providers\nbuild_provider| C[build_provider]
    B -->|detect_applicable_providers\nmise edit| D[checks array]
    C --> E{id match}
    E -->|dart| F[DartDepsProvider new dart]
    E -->|flutter| G[DartDepsProvider new flutter]
    E -->|other| H[other providers]
    D --> I{checks loop}
    I --> J[npm, yarn, pnpm, bun, aube, go,\npip, poetry, uv, bundler,\ncomposer, git-submodule]
    I -->|MISSING| K["❌ dart / flutter not added"]
    F --> L[is_applicable: pubspec.yaml exists]
    G --> L
    L --> M[install_command: dart/flutter pub get]
Loading

Comments Outside Diff (1)

  1. src/deps/mod.rs, line 234-295 (link)

    P1 dart and flutter missing from detect_applicable_providers

    Both providers were added to BUILTIN_PROVIDERS and build_provider, but the checks array in detect_applicable_providers was not updated. This function is called by mise edit to suggest which providers to add to mise.toml, so dart and flutter projects will silently receive no auto-suggestions.

    (
        "dart",
        Box::new(DartDepsProvider::new("dart", project_root, default_config.clone())),
    ),
    (
        "flutter",
        Box::new(DartDepsProvider::new("flutter", project_root, default_config.clone())),
    ),

    These two entries need to be added to the checks array before "git-submodule".

Reviews (4): Last reviewed commit: "feat(deps): Add dart and flutter provide..." | Re-trigger Greptile

Comment on lines +61 to +63
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.yaml").exists()
}
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.

P1 is_applicable checks manifest, not lockfile

Every other built-in provider gates on its lockfile (composer.lock, Gemfile.lock, package-lock.json, uv.lock, etc.), and the docs explicitly state: "Built-in providers are only active when explicitly configured in mise.toml and their lockfile exists." Here pubspec.yaml is the manifest; pubspec.lock is the lockfile. Using the manifest means the provider activates on projects that have never run dart pub get, which deviates from the documented contract and the established pattern.

Suggested change
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.yaml").exists()
}
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.lock").exists()
}

The same issue applies to src/deps/providers/flutter.rs at the same lines.

Copy link
Copy Markdown
Contributor Author

@tjarvstrand tjarvstrand May 1, 2026

Choose a reason for hiding this comment

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

This does not seem like a desirable situation to me since it would require manually running dart pub get/flutter pub get manually before mise deps will work.

For applications I suppose it can be all right since you only need to bootstrap the lockfile once. For library packages however, authors are advised not to commit the lockfile, which means pub get would have to be run manually on every fresh checkout.

Comment thread src/deps/providers/flutter.rs Outdated
Comment on lines +61 to +63
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.yaml").exists()
}
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.

P1 is_applicable checks manifest, not lockfile

Same issue as dart.rs: checks for pubspec.yaml (the manifest) instead of pubspec.lock (the lockfile), deviating from the documented contract and every other built-in provider's pattern.

Suggested change
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.yaml").exists()
}
fn is_applicable(&self) -> bool {
self.base.config_root().join("pubspec.lock").exists()
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See above.

Comment thread e2e/cli/test_deps Outdated
@tjarvstrand tjarvstrand reopened this May 1, 2026
@tjarvstrand tjarvstrand force-pushed the deps-dart-and-flutter-providers branch from 25d38b8 to 176c1c9 Compare May 1, 2026 08:14
@tjarvstrand tjarvstrand force-pushed the deps-dart-and-flutter-providers branch from 176c1c9 to 183ebbc Compare May 1, 2026 08:25
@jdx jdx merged commit c99da4c into jdx:main May 1, 2026
35 checks passed
mise-en-dev added a commit that referenced this pull request May 3, 2026
### 🚀 Features

- **(conda)** graduate conda backend out of experimental by @jdx in
[#9544](#9544)
- **(deps)** Add dart and flutter providers by @tjarvstrand in
[#9505](#9505)
- **(registry)** add neo4j by @mnm364 in
[#9525](#9525)
- **(registry)** add rustfs by @mnm364 in
[#9530](#9530)
- **(task)** support exclusion patterns in task sources by
@jlarmstrongiv in [#9496](#9496)
- **(vfox)** add stat function to lua file module by @esteve in
[#9497](#9497)

### 🐛 Bug Fixes

- **(backend)** flag regex prerelease versions by @jdx in
[#9500](#9500)
- **(backend)** mark -nightly/-canary/-experimental as prereleases by
@jdx in [#9523](#9523)
- **(backend)** suppress no-versions warning for unresolved-latest
backends by @jdx in [#9548](#9548)
- **(backend)** include dotnet prereleases from package flags by @jdx in
[#9551](#9551)
- **(backend)** scope PEP 440 prerelease detection to Python backends by
@jdx in [#9558](#9558)
- **(cargo)** Apply install_env during cargo install by @c22 in
[#9502](#9502)
- **(copr)** drop epel-9 chroots since rust >= 1.91 is unavailable by
@jdx in [#9484](#9484)
- **(github)** skip attestations on non-default api_url by @jdx in
[#9486](#9486)
- **(github)** retry ip allow list errors without auth by @risu729 in
[#9506](#9506)
- **(http)** update versions host tracking endpoint by @jdx in
[#9527](#9527)
- **(install)** don't warn for configured tools when version is passed
via CLI by @jdx in [#9522](#9522)
- **(install)** refresh latest before installing missing tools by @jdx
in [#9545](#9545)
- **(install)** don't cache nonexistent install paths by @jdx in
[#9553](#9553)
- **(lockfile)** don't propagate ad-hoc CLI overrides into the project
lockfile by @jdx in [#9562](#9562)
- **(plugin)** detect plugin types after cloning by @risu729 in
[#9540](#9540)
- **(release)** pass --no-git-checks to aube publish by @jdx in
[#9483](#9483)
- **(task)** convert PATH to MSYS Unix form when spawning POSIX shells
on Windows by @JamBalaya56562 in
[#9547](#9547)

### 📚 Documentation

- **(contributing)** require popularity check for registry PRs by @jdx
in
[7bbeebe](7bbeebe)
- **(watch)** update pitchfork domain to en.dev by @risu729 in
[#9536](#9536)
- document ghtkn GitHub token setup by @jdx in
[#9546](#9546)
- clarify registry backend acceptance policy by @jdx in
[#9543](#9543)
- Change exec command to use bash for variable echo by @kuboon in
[#9567](#9567)

### 🧪 Testing

- **(e2e)** run test-tool targets in parallel by @jdx in
[#9564](#9564)
- **(e2e)** run tests in parallel by @jdx in
[#9563](#9563)
- **(e2e)** bind-mount /tmp on disk and surface failed tests in CI
summary by @jdx in [#9570](#9570)
- **(tasks)** migrate test_task_help atask to usage field by @jdx in
[#9549](#9549)

### 📦️ Dependency Updates

- update fedora:45 docker digest to 8b838b3 by @renovate[bot] in
[#9507](#9507)
- update ghcr.io/jdx/mise:deb docker digest to f02194c by @renovate[bot]
in [#9509](#9509)
- update taiki-e/install-action digest to 7769b73 by @renovate[bot] in
[#9512](#9512)
- update ghcr.io/jdx/mise:alpine docker digest to 581f8a8 by
@renovate[bot] in [#9508](#9508)
- update rust crate ctor to v0.10.1 by @renovate[bot] in
[#9515](#9515)
- update ghcr.io/jdx/mise:rpm docker digest to a5c9655 by @renovate[bot]
in [#9510](#9510)
- update rust docker digest to a9cfb75 by @renovate[bot] in
[#9511](#9511)
- update rust crate age to v0.11.3 by @renovate[bot] in
[#9514](#9514)
- update rust crate jiff to v0.2.24 by @renovate[bot] in
[#9516](#9516)
- update dependency vitepress-plugin-tabs to ^0.9.0 by @renovate[bot] in
[#9518](#9518)
- update autofix-ci/action action to v1.3.4 by @renovate[bot] in
[#9513](#9513)
- update rust crate usage-lib to v3.2.1 by @renovate[bot] in
[#9517](#9517)
- update apple-actions/import-codesign-certs action to v7 by
@renovate[bot] in [#9519](#9519)
- update taiki-e/install-action digest to 51cd0b8 by @renovate[bot] in
[#9531](#9531)
- exclude taiki-e/install-action from renovate by @jdx in
[#9532](#9532)
- update rust crate blake3 to v1.8.5 by @renovate[bot] in
[#9533](#9533)

### 📦 Registry

- enable shellcheck on windows by @zeitlinger in
[#9487](#9487)
- add google-java-format by @zeitlinger in
[#9488](#9488)
- add expert
([aqua:expert-lsp/expert](https://github.com/expert-lsp/expert)) by
@AlternateRT in [#9498](#9498)
- update entry for checkmake by @eread in
[#9504](#9504)
- add systemctl-tui
([aqua:rgwood/systemctl-tui](https://github.com/rgwood/systemctl-tui))
by @2xdevv in [#9521](#9521)
- add codon by @3w36zj6 in
[#9538](#9538)
- add tool yr (backend:github:VirusTotal/yara-x) by @adam-moss in
[#9542](#9542)
- add tool betterleaks (backend:aqua/betterleaks/betterleaks) by
@adam-moss in [#9541](#9541)
- add `git-filter-repo` by @garysassano in
[#9550](#9550)
- add umoci
([aqua:opencontainers/umoci](https://github.com/opencontainers/umoci))
by @2xdevv in [#9555](#9555)
- add aqua backend for elixir-ls by @AlternateRT in
[#9557](#9557)
- deny inline backend options by @risu729 in
[#9565](#9565)

### Chore

- **(ci)** fail registry tests without summary by @jdx in
[#9559](#9559)
- **(ci)** use !cancelled() instead of always() for test-ci aggregator
by @jdx in [#9569](#9569)
- **(ci)** use namespace runners for ci jobs by @jdx in
[#9561](#9561)
- **(config)** deprecate shorthands_file setting by @risu729 in
[#9534](#9534)
- **(docs)** remove shrill.en.dev analytics script by @jdx in
[#9539](#9539)
- **(release)** replace bc with awk in release-plz star formatting by
@jdx in
[d7f177f](d7f177f)
- bump hk to 1.44.3 by @jdx in
[#9493](#9493)
- invert CLAUDE.md/AGENTS.md so AGENTS.md is canonical by @jdx in
[#9560](#9560)
- set dev profile debug to 1 by @jdx in
[#9572](#9572)

### New Contributors

- @kuboon made their first contribution in
[#9567](#9567)
- @AlternateRT made their first contribution in
[#9557](#9557)
- @2xdevv made their first contribution in
[#9555](#9555)
- @adam-moss made their first contribution in
[#9541](#9541)
- @jlarmstrongiv made their first contribution in
[#9496](#9496)
- @tjarvstrand made their first contribution in
[#9505](#9505)
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