You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pawan's solution required using clap to parse and validate the config file flag, and then using clap_derive's update_from to update/validate the original command with the file config. But this requires the extensive migration here, which may take a while to get merged.
argfile circumvents the need for clap_derive's update_from by parsing the config file directly from the cli args and expanding it prior to doing any clap parsing. But it provides no ability to override file config with cli args and requires using a syntax along the lines of lighthouse bn @argfile which is unlike what is provided by other consensus clients.
This solution mimics argfile's preprocessing but is more suited to lighthouse's specific needs. It also does not depend on or conflict with #3007.
Ooh, this is interesting! Very simple to implement. It is a shame you can't override with the CI, but it does make things simpler to reason about!
But it provides no ability to override file config with cli args and requires using a syntax along the lines of lighthouse bn @argfile which is unlike what is provided by other consensus clients.
Looking at the PR, it seems we'd use lighthouse bn --config-file rather than the @argfile?
But it provides no ability to override file config with cli args and requires using a syntax along the lines of lighthouse bn @argfile which is unlike what is provided by other consensus clients.
^ These are limitations of the argfile crate which is why I didn't use that crate in this PR. In this PR you can override file config with CLI and use lighthouse bn --config-file
This file contains hidden or 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
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.
Issue Addressed
#2748
Proposed Changes
advanced-pre-releaseswas linked whenadvanced-release-candidates.mdshould beAdditional Info
The solution here is a combination of what @pawanjay176 suggested here and what the argfile crate provides.
Pawan's solution required using
clapto parse and validate the config file flag, and then usingclap_derive'supdate_fromto update/validate the original command with the file config. But this requires the extensive migration here, which may take a while to get merged.argfilecircumvents the need forclap_derive'supdate_fromby parsing the config file directly from the cli args and expanding it prior to doing anyclapparsing. But it provides no ability to override file config with cli args and requires using a syntax along the lines oflighthouse bn @argfilewhich is unlike what is provided by other consensus clients.This solution mimics
argfile's preprocessing but is more suited to lighthouse's specific needs. It also does not depend on or conflict with #3007.