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

Add new --core-conf command line argument to allow passing core. confs via CLI #15441

Merged
merged 7 commits into from
Jan 19, 2024

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jan 10, 2024

Changelog: Feature: Add new --core-conf command line argument to allow passing core. confs via CLI.
Docs: conan-io/docs#3515

Close #13410

@memsharded memsharded requested a review from AbrilRBS January 10, 2024 22:43
Copy link
Member

@AbrilRBS AbrilRBS 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! A suggestion I have, but yes let's talk about it!

conan/cli/command.py Show resolved Hide resolved
@AbrilRBS
Copy link
Member

I still have some concerns, most of the confs are really not for command line, but some it makes sense.

Yeah, I think we should warn for things like core.cache:storage_path which are not set early enough, right?

@memsharded
Copy link
Member Author

Yeah, I think we should warn for things like core.cache:storage_path which are not set early enough, right?

Actually, it is possible, I have extended the test to prove it

@AbrilRBS
Copy link
Member

Ohhhhh, it actually is! This is great!

@memsharded
Copy link
Member Author

I have changed this PR, no need to modify every parse_args call to inject the api, with this change, every single Conan command gets a -gc/--global-conf argument that injects all the conf the very first thing in the conan_api.config.global_conf that everybody else reads

@memsharded memsharded added this to the 2.1 milestone Jan 17, 2024
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

😍

Copy link
Contributor

@franramirez688 franramirez688 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 great 👏

@memsharded memsharded marked this pull request as ready for review January 18, 2024 09:17
@AbrilRBS AbrilRBS merged commit 7bde83e into conan-io:develop2 Jan 19, 2024
2 checks passed
@AbrilRBS AbrilRBS deleted the feature/global_conf_cli branch January 19, 2024 09:05
@czoido czoido changed the title poc for --global-conf in cli Add new --core-conf command line argument to allow passing core. confs via CLI Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to define global confs from CLI
4 participants