Skip to content

feat(rig-cli): shorten the warning for a 0.46 home's plugins.toml and defaults.json - #3245

Merged
gold-silver-copper merged 2 commits into
mainfrom
fix/shorter-legacy-warning
Nov 10, 2026
Merged

gold-silver-copper merged 2 commits into
mainfrom
fix/shorter-legacy-warning

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #3239. The warning for a rig 0.46 home's leftover plugins.toml / defaults.json took three or four wrapped lines per file in the terminal view. It is now one short line each, pointing at MIGRATING.md for the details instead of listing keys.

The rule is unchanged: a file is warned of when it exists in RIG_HOME and settings.toml has no [plugins] (for plugins.toml) or [model] (for defaults.json) table; an empty table still silences it. Where it shows is unchanged too (terminal view notice, rig -p stderr, --json notice record), once per rig start.

Before:

/home/u/.rig/plugins.toml is from rig 0.46 or earlier and rig no longer reads it: its plugin list goes in [plugins] of /home/u/.rig/settings.toml now (`enable` and `disable` for rig's plugins, [[plugins.extra]] for other crates; `rig plugin list` shows what is on). rig leaves the file as it is.
/home/u/.rig/defaults.json is from rig 0.46 or earlier and rig no longer reads it: its model and effort go in [model] of /home/u/.rig/settings.toml now (`default` and `effort`). rig leaves the file as it is.

After:

rig no longer reads /home/u/.rig/plugins.toml. Move its plugin list to [plugins] in /home/u/.rig/settings.toml (see MIGRATING.md). The file was not changed.
rig no longer reads /home/u/.rig/defaults.json. Move its model and effort to [model] in /home/u/.rig/settings.toml (see MIGRATING.md). The file was not changed.

Decided alone: the paths are shown in full as now, not shortened to ~, so the line names exactly the file rig found (also when RIG_HOME is set elsewhere).

Changelog

  • (rig-cli) the warning for a rig 0.46 plugins.toml or defaults.json is one short line per file, pointing at MIGRATING.md.

Migration

None.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

Test changed on purpose: run::tests::a_0_46_home_is_warned_of_once_per_run_and_left_as_it_is now also checks each line starts with rig no longer reads and names MIGRATING.md, besides the file and its table. Everything else it checks (two lines on the first start, none on reload, files untouched, no warning for covered or fresh homes) is as before. It also gains a case: a settings.toml with an empty [plugins] and an empty [model] gets no warning (the rule was not tested before).

"See MIGRATING.md": MIGRATING.md has no section on this yet because it is generated at release; #3005's ## Migration note, which describes moving plugins.toml and defaults.json into settings.toml, becomes the next release's section there.

  • cargo nextest run --locked --profile local -p rig-cli 0_46 (2 passed)
  • cargo clippy --locked -p rig-cli --all-targets -- -D warnings

Production lines: +6 / -17. Test lines: +17 / -5.

Try it:

cd ~/code/rig && git fetch origin && git switch --detach origin/fix/shorter-legacy-warning && cargo build -p rig-cli && export RIG_HOME=$PWD/target/try-home && mkdir -p $RIG_HOME && touch $RIG_HOME/plugins.toml $RIG_HOME/defaults.json && ./target/debug/rig -p "hi"

… defaults.json

Each warning is now one sentence pair: rig no longer reads the file, move
its settings to [plugins] or [model] in settings.toml (see MIGRATING.md),
the file was not changed. The key lists are gone.
@gold-silver-copper
gold-silver-copper added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit a5dcc11 Nov 10, 2026
17 checks passed
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