Skip to content
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

Config clean command sketch #17514

Open
wants to merge 11 commits into
base: develop2
Choose a base branch
from

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Dec 19, 2024

Changelog: (Feature | Fix | Bugfix): Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX

To discuss with the team

Addresses the remaining point of #12842

Close #5935
Close #12842

@AbrilRBS AbrilRBS changed the title Clean command sketch Config clean command sketch Dec 19, 2024
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good idea, and necessary, thanks very much for doing it!

Maybe reset is a better name if the intent is to reset to "factory defaults"? I am fine with either name, just nitpicking.

@AbrilRBS AbrilRBS added this to the 2.12.0 milestone Dec 24, 2024
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

conan/cli/commands/config.py Outdated Show resolved Hide resolved

def reinit(self):
self.config.reinit()
self.config.migrate()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this migrate?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, forcing a new migration should probably be explicit too.

validate_conan_version(required_range_new)
_check_conan_version(self)

def reinit(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to better names!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specially opposed to reinit, other possible alternatives

  • reset
  • restart
  • invalidate_cache

@AbrilRBS AbrilRBS marked this pull request as ready for review January 10, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants