-
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
finswimmer
force-pushed
the
config-migration
branch
from
November 5, 2024 19:52
7cddf77
to
52ea929
Compare
Deploy preview for website ready! ✅ Preview Built with commit 99ea24b. |
finswimmer
force-pushed
the
config-migration
branch
2 times, most recently
from
November 7, 2024 07:25
643add9
to
7e6db62
Compare
@finswimmer can/should we add a confirmation step? Alternatively, preserve the old file with a new suffix ( |
finswimmer
force-pushed
the
config-migration
branch
from
November 16, 2024 18:07
3a05279
to
9836cda
Compare
@abn I've added a confirmation step. |
finswimmer
force-pushed
the
config-migration
branch
from
November 16, 2024 18:09
9836cda
to
5928db8
Compare
Secrus
approved these changes
Nov 17, 2024
For now only applied to FileConfigSource on remove_property
Rename or delete keys from ConfigSource. Migrate existing values including unset them.
abn
force-pushed
the
config-migration
branch
from
November 18, 2024 00:02
5928db8
to
99ea24b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.)