-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: begin to avoid autogenerated getters (#235)
To prepare for the transition to con4m v2, reduce our usage of the autogenerated getters from c4autoconf.nim. The all-encompassing object that c4autoconf.nim defines is ChalkConfig, which currently looks like: type ChalkConfig* = ref object `@@attrscope@@`*: AttrScope [...] attestationConfig*: AttestationConfig [...] extractConfig*: ExtractConfig dockerConfig*: DockerConfig execConfig*: ExecConfig loadConfig*: LoadConfig envConfig*: EnvConfig srcConfig*: SrcConfig cloudProviderConfig*: CloudProviderConfig [...] As a starting point, refactor away all accesses of ChalkConfig fields that end in Config (which are those shown above). That is, with this commit, the following command no longer returns matches: git grep 'chalkConfig\.\w*Config\.' In con4m v2, we'll be using the lookup proc: proc lookup*[T](ctx: RuntimeState, key: string): Option[T] which is easier to move to from this commit's pattern of: get[T](chalkConfig, "foo.bar") Refs: #214
- Loading branch information
Showing
11 changed files
with
64 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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