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 support for TOML config files (--config-file) #3442

Merged
merged 1 commit into from
Mar 5, 2022
Merged

Conversation

zah
Copy link
Member

@zah zah commented Feb 28, 2022

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 28, 2022

Unit Test Results

     12 files  ±0     821 suites  ±0   35m 24s ⏱️ - 1m 1s
1 672 tests ±0  1 625 ✔️ ±0    47 💤 ±0  0 ±0 
9 759 runs  ±0  9 655 ✔️ ±0  104 💤 ±0  0 ±0 

Results for commit d1db573. ± Comparison against base commit e4b7dbf.

♻️ This comment has been updated with latest results.

beacon_chain/conf.nim Outdated Show resolved Hide resolved
@@ -14,7 +14,7 @@ import
std/[os, tables, strutils, terminal, typetraits],

# Nimble packages
chronos, confutils,
chronos, confutils, toml_serialization,
Copy link
Member

Choose a reason for hiding this comment

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

why is toml_serialization here? shouldn't it be in conf.nim?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's used here as well. We refer to the Toml format type when we decide which config path to load. I guess I could have re-exported it from conf.nim, but conf.nim is a popular file, so it would have resulted in more pollution.

Copy link
Member

Choose a reason for hiding this comment

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

I find it's better to reexport regardless - we've had enough trouble with imports, the reexport makes for shorter import lists overall which helps find circular imports - it also makes for fewer compiler errors and weird import-order problems which lead to formatting issues in log files etc

Copy link
Member

@arnetheduck arnetheduck left a comment

Choose a reason for hiding this comment

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

I'll assume command-line params take priority over config files? docs should be updated too

@zah zah merged commit cdeae90 into unstable Mar 5, 2022
@zah zah deleted the config-file branch March 5, 2022 02:33
@mratsim mratsim mentioned this pull request Mar 9, 2022
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.

None yet

3 participants