fix: tone down lockfile format and deprecation warnings on read-only commands#6627
fix: tone down lockfile format and deprecation warnings on read-only commands#6627wolfv wants to merge 1 commit into
Conversation
…commands Everyday commands like `pixi run`, `pixi shell`, and `pixi list` no longer nag about things that don't affect them: - The "lock file uses an older format" message is demoted from warn to info on the read path. An old but up-to-date lock file is perfectly usable; `pixi lock` still performs and reports the actual upgrade. - Manifest deprecation warnings (the `[system-requirements]` table and `[package.target]` tables) are now only emitted by commands that update the lock file or modify the manifest (add, remove, import, lock, update, upgrade, and the `pixi workspace` config subcommands), which are the natural moments to nudge the user to migrate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkisJKP8uDL9tseG1udeST
|
For what it's worth, I prefer the current behaviour |
|
It's really too much I think for established projects. Not everyone is at liberty to update Pixi projects... some are pure consumers. |
But isn't it for those also pretty common to pin pixi versions? I would prefer a |
|
If you manage 60 machines with 50 projects and you want to update Pixi to get some bug fixes but you don't have time to update all machines and Pixi projects ... or you have students that have more random versions of Pixi ... |
|
I do see your point but this really goes too far for me. We can never actually remove deprecations if we show them so seldomly. What we could do instead is to stop showing it with That way you should still get rid of most of the annoyance while showing them at least once for example in CI. |
Description
Everyday commands like
pixi run,pixi shell, andpixi listno longer nag about things that don't affect them. Deprecation warnings (such as the legacy[system-requirements]table and[package.target]tables) are now only shown by commands that update the lock file or modify the manifest, and the old-lockfile-format notice is demoted toinfoon the read path.Key changes:
Added
emit_deprecation_warningsflag toWorkspaceLocator(defaultfalse), following the existingignore_unused_feature_warningspattern, plus aWarning::is_deprecation()helper. Deprecation warnings are filtered out of the manifest-warning report unless the command opts in.Opt-in via
with_deprecation_warnings(true)for the commands where migrating is actually relevant:pixi lock,pixi update,pixi upgradepixi add,pixi remove,pixi importpixi workspace channel | description | environment | feature | name | platform | requires-pixi | versionLock file format notice demoted from
warntoinfoon the read path inupdate_lock_file(). An old but up-to-date lock file is perfectly usable;pixi lockstill performs and reports the actual format upgrade (that path is unchanged).Documentation:
docs/workspace/system_requirements.mdnow states when the deprecation warning appears.Note:
pixi installis deliberately in the quiet group, treated likepixi runas an everyday materialization command. Easy to flip if reviewers prefer it noisy.How Has This Been Tested?
Verified end-to-end with a built binary on a project containing a
[system-requirements]table and a v6 lock file:pixi run helloandpixi task list: no warnings, andrunleaves the v6 lock file untouched.pixi workspace channel listandpixi lock: show the deprecation diagnostic;pixi lockupgrades the lock file to v7.cargo check,cargo clippy, and thepixi_manifest/pixi_coreunit test suites pass (the two failingpixi_coretests are pre-existing env-var races that also fail on a clean tree).Checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01RkisJKP8uDL9tseG1udeST