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

fix(cli): Respect the --cfg flag #506

Merged
merged 3 commits into from
Nov 17, 2022
Merged

fix(cli): Respect the --cfg flag #506

merged 3 commits into from
Nov 17, 2022

Conversation

flub
Copy link
Contributor

@flub flub commented Nov 17, 2022

Use the --cfg flag to load the configuration file for iroh.

This does not affect the config files for any of the managed
processes like iroh-p2p etc.

This flag was not used before.

Also optimises the make_config call a little by taking a slice
rather than a Vec. And assert and document the priority order.

Use the --cfg flag to load the configuration file for `iroh`.

This does not affect the config files for any of the managed
processes like iroh-p2p etc.
iroh/src/run.rs Outdated Show resolved Hide resolved
@flub
Copy link
Contributor Author

flub commented Nov 17, 2022

Added some test to figure out priority and documented it. Fixed the source order appropriately.

Also optimised a vec into a slice, because it seemed a bit odd to have it as a vec.

I'd say this is ready for review now.

@flub flub requested a review from b5 November 17, 2022 12:33
@@ -23,5 +23,8 @@ thiserror = "1.0"
toml = "0.5.9"
tracing = "0.1.34"

[dev-dependencies]
testdir = "0.6.0"
Copy link
Member

Choose a reason for hiding this comment

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

🔥

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah, i forgot i did sneak that in. but it was genuinely nice while writing the test...

Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

looks great!

@b5
Copy link
Member

b5 commented Nov 17, 2022

macOS failure is unrelated. merging!

@b5 b5 merged commit e7bcac6 into main Nov 17, 2022
@flub flub deleted the flub/respect-cfg-flag branch November 22, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants