-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): add option to migrate outdated configs #9830
Conversation
7cddf77
to
52ea929
Compare
Deploy preview for website ready! ✅ Preview Built with commit 99ea24b. |
643add9
to
7e6db62
Compare
@finswimmer can/should we add a confirmation step? Alternatively, preserve the old file with a new suffix ( |
3a05279
to
9836cda
Compare
@abn I've added a confirmation step. |
9836cda
to
5928db8
Compare
For now only applied to FileConfigSource on remove_property
Rename or delete keys from ConfigSource. Migrate existing values including unset them.
5928db8
to
99ea24b
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR add a new option
--migrate
topoetry config
. This option enables users to migrate explicit set configs that have been renamed or changed in other ways in new Poetry versions.Some question:
Only
FileConfigSource
has been updated in that way, that if a property is removed, it is checked whether the section to which this property belongs is now empty and should be removed from the file. Do we want the same behavior forDictConfigSource
?It's probably possible to detect on runtime if the Config contains outdated options. Should we inform users, that they should run
poetry config --migrate
to fix it? (I thinks if yes, I will do it in a separate PR.)