Skip to content

fix(config): warn for deprecated env keys#9205

Merged
jdx merged 1 commit intojdx:mainfrom
risu729:fix/deprecated-env-keys-warn
Apr 18, 2026
Merged

fix(config): warn for deprecated env keys#9205
jdx merged 1 commit intojdx:mainfrom
risu729:fix/deprecated-env-keys-warn

Conversation

@risu729
Copy link
Copy Markdown
Contributor

@risu729 risu729 commented Apr 17, 2026

Summary

  • warn on deprecated top-level env_file, dotenv, and env_path config keys using deprecated_at! when legacy env directives are evaluated
  • set removal to mise 2027.4.0
  • update schema descriptions and docs to point users to env._.file and env._.path

Tests

  • cargo fmt --check
  • git diff --check
  • cargo test config::config_file::mise_toml::tests::test_env_file

This PR was generated by an AI coding assistant.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 17, 2026

Greptile Summary

This PR separates the previously aliased dotenv serde field from env_file into its own distinct field, and adds deprecated_at! warnings for env_file, dotenv, and env_path. Schema descriptions and the environments doc are updated accordingly. The functional changes are correct — the two fields are properly chained in env_entries(), Clone and Debug impls are updated, and a test case is added for the combined-key behaviour.

Confidence Score: 5/5

Safe to merge; all remaining findings are P2 style suggestions.

The functional changes are correct: dotenv is properly separated into its own field, both fields are chained in env_entries(), Clone/Debug are updated, and the schema/docs are consistent. The only open items are a P2 suggestion about the warn_at version being one release ahead of current, and a minor coupling observation about the Debug impl triggering the warning. Neither blocks the feature from working correctly.

src/config/config_file/mise_toml.rs — see warn_at version and Debug-path coupling comments.

Important Files Changed

Filename Overview
src/config/config_file/mise_toml.rs Separates dotenv from the env_file alias, adds warn_deprecated_env_keys(), chains both fields in env_entries(), and updates Clone/Debug. Minor concern: warn_at is 2026.4.17 while current version is 2026.4.16; deprecation warning also fires via the Debug impl's env_entries() call.
schema/mise.json Appends removal-timeline text to the descriptions of env_file, dotenv, and env_path; no structural changes.
docs/environments/index.md Adds a VitePress warning callout documenting the deprecation and the 2027.4.0 removal target.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Load mise.toml via from_str] --> B[serde deserialises env_file Vec]
    A --> C[serde deserialises dotenv Vec]
    A --> D[serde deserialises env_path Vec]

    E[env_entries called] --> F[warn_deprecated_env_keys]
    F --> G{env_file non-empty?}
    G -- yes --> H[deprecated_at! config.env_file]
    F --> I{dotenv non-empty?}
    I -- yes --> J[deprecated_at! config.dotenv]
    F --> K{env_path non-empty?}
    K -- yes --> L[deprecated_at! config.env_path]

    E --> M[chain env_file iter + dotenv iter]
    M --> N[EnvDirective::File entries]
    E --> O[env_path -> EnvDirective::Path entries]
    N --> P[Combined Vec returned]
    O --> P

    H & J & L --> Q[DEPRECATED global set deduplicates by ID, warn once per process]
Loading

Reviews (4): Last reviewed commit: "fix(config): warn for deprecated env key..." | Re-trigger Greptile

Comment thread src/config/config_file/mise_toml.rs Outdated
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 deprecates the top-level env_file, dotenv, and env_path configuration keys, replacing them with env..file and env..path. The updates span documentation, the JSON schema, and the MiseToml parser, which now includes logic to detect and warn about these deprecated keys. Review feedback points out an incorrect documentation change within a settings block and suggests optimizing the configuration loading process by caching the parsed TOML document to avoid redundant parsing.

Comment thread docs/configuration.md Outdated
Comment thread src/config/config_file/mise_toml.rs Outdated
Comment thread src/config/config_file/mise_toml.rs Outdated
Comment thread src/config/config_file/mise_toml.rs Outdated
Comment thread src/config/config_file/mise_toml.rs Outdated
@risu729 risu729 force-pushed the fix/deprecated-env-keys-warn branch 2 times, most recently from db14a19 to c4e047c Compare April 17, 2026 19:52
@risu729 risu729 force-pushed the fix/deprecated-env-keys-warn branch from c4e047c to dfd1ac6 Compare April 17, 2026 20:04
@risu729 risu729 marked this pull request as ready for review April 17, 2026 20:33
@jdx jdx merged commit 7c5ae06 into jdx:main Apr 18, 2026
35 of 36 checks passed
@risu729 risu729 deleted the fix/deprecated-env-keys-warn branch April 18, 2026 01:33
jdx pushed a commit that referenced this pull request Apr 18, 2026
### 🐛 Bug Fixes

- **(backend)** respect install_before in latest lookup by @risu729 in
[#9193](#9193)
- **(backend)** route explicit latest through stable lookup by @risu729
in [#9228](#9228)
- **(backends)** deprecate b shorthand by @risu729 in
[#9234](#9234)
- **(config)** warn for deprecated env keys by @risu729 in
[#9205](#9205)
- **(config)** treat enable_tools empty as disable-all by @risu729 in
[#9108](#9108)
- **(github)** avoid auth on release asset downloads by @risu729 in
[#9060](#9060)
- **(gitlab)** warn when glab OAuth2 token is expired by @stanhu in
[#9195](#9195)
- **(npm)** honor install_before without day drift by @risu729 in
[#9157](#9157)
- **(npm)** warn on old bun and pnpm for install_before by @risu729 in
[#9232](#9232)
- **(pipx)** honor install_before for uv and pipx installs by @risu729
in [#9190](#9190)
- **(registry)** allow shfmt on Windows by @zeitlinger in
[#9191](#9191)

### 🚜 Refactor

- **(backend)** remove unused rolling release helper by @risu729 in
[#9175](#9175)
- **(backend)** use file util for removals by @risu729 in
[#9206](#9206)

### 📚 Documentation

- **(config)** clarify always_keep_download behavior by @risu729 in
[#9235](#9235)
- **(configuration)** add rust to idiomatic version files by @jjt in
[#9233](#9233)
- **(contributing)** expand contribution guide introduction by
@marianwolf in [#9208](#9208)
- **(github)** document multiple release assets workaround by @risu729
in [#9236](#9236)

### 📦️ Dependency Updates

- update actions/setup-node action to v6 by @renovate[bot] in
[#9183](#9183)
- update dependency @types/node to v25 by @renovate[bot] in
[#9187](#9187)
- update crazy-max/ghaction-import-gpg action to v7 by @renovate[bot] in
[#9186](#9186)
- update actions/cache action to v5 by @renovate[bot] in
[#9181](#9181)
- update amannn/action-semantic-pull-request action to v6 by
@renovate[bot] in [#9184](#9184)
- update apple-actions/import-codesign-certs action to v6 by
@renovate[bot] in [#9185](#9185)
- update dependency eslint to v10 by @renovate[bot] in
[#9200](#9200)
- update dependency toml to v4 by @renovate[bot] in
[#9201](#9201)
- update rust crate reqwest to 0.13 by @renovate[bot] in
[#9171](#9171)
- update ghcr.io/jdx/mise:deb docker digest to 523d826 by @renovate[bot]
in [#9198](#9198)
- update ghcr.io/jdx/mise:alpine docker digest to 05617e0 by
@renovate[bot] in [#9196](#9196)
- update ghcr.io/jdx/mise:rpm docker digest to c1992f9 by @renovate[bot]
in [#9199](#9199)
- update ghcr.io/jdx/mise:copr docker digest to 90db6cd by
@renovate[bot] in [#9197](#9197)
- update taiki-e/install-action digest to 58e8625 by @renovate[bot] in
[#9209](#9209)
- update fedora docker tag to v45 by @renovate[bot] in
[#9213](#9213)
- update docker/setup-buildx-action action to v4 by @renovate[bot] in
[#9212](#9212)
- update docker/metadata-action action to v6 by @renovate[bot] in
[#9211](#9211)
- update docker/login-action action to v4 by @renovate[bot] in
[#9210](#9210)
- update dependency typescript to v6 by @renovate[bot] in
[#9202](#9202)
- update docker/build-push-action action to v7 by @renovate[bot] in
[#9203](#9203)
- update github artifact actions (major) by @renovate[bot] in
[#9215](#9215)
- update rust crate duct to v1 by @renovate[bot] in
[#9220](#9220)
- update rust crate demand to v2 by @renovate[bot] in
[#9219](#9219)
- update rust crate clx to v2 by @renovate[bot] in
[#9218](#9218)
- update nick-fields/retry action to v4 by @renovate[bot] in
[#9217](#9217)
- update jdx/mise-action action to v4 by @renovate[bot] in
[#9216](#9216)
- update rust crate self_update to 0.44 by @renovate[bot] in
[#9174](#9174)
- migrate eslint config to flat format for v10 compat by @jdx in
[#9222](#9222)
- update actions/checkout action to v6 by @renovate[bot] in
[#9182](#9182)
- update rust crate toml to v1 by @renovate[bot] in
[#9225](#9225)
- update rust crate versions to v7 by @renovate[bot] in
[#9226](#9226)
- update rust crate which to v8 by @renovate[bot] in
[#9227](#9227)
- update rust crate rmcp to v1 by @renovate[bot] in
[#9221](#9221)

### 📦 Registry

- add sheldon by @3w36zj6 in
[#9104](#9104)
- add pocketbase by @ranfdev in
[#9123](#9123)
- add worktrunk ([aqua:max-sixty/worktrunk,
cargo:worktrunk](https://github.com/max-sixty/worktrunk,
cargo:worktrunk))#1 by @edouardr in
[#8796](#8796)
- add dependency-check
([aqua:dependency-check/DependencyCheck](https://github.com/dependency-check/DependencyCheck))
by @kapitoshka438 in [#9204](#9204)
- add janet by @ranfdev in
[#9241](#9241)

### New Contributors

- @ranfdev made their first contribution in
[#9241](#9241)
- @jjt made their first contribution in
[#9233](#9233)
- @marianwolf made their first contribution in
[#9208](#9208)
- @edouardr made their first contribution in
[#8796](#8796)

## 📦 Aqua Registry Updates

#### New Packages (3)

- [`LargeModGames/spotatui`](https://github.com/LargeModGames/spotatui)
-
[`android-sms-gateway/cli`](https://github.com/android-sms-gateway/cli)
- [`velero-io/velero`](https://github.com/velero-io/velero)

#### Updated Packages (1)

- [`skim-rs/skim`](https://github.com/skim-rs/skim)
klaaspieter added a commit to klaaspieter/dotfiles that referenced this pull request May 1, 2026
env_file was deprecated. I need direnv as well so I disabled the mise
variant.

See: jdx/mise#9205
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