-
Notifications
You must be signed in to change notification settings - Fork 20
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
refactor: begin to avoid autogenerated getters #235
Merged
Merged
Conversation
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
35cfb59
to
c79c8b7
Compare
This was referenced Mar 12, 2024
Fix a bad conversion of execConfig.getCommandNameFromArgs().
@miki725 Please review :) |
miki725
approved these changes
Mar 27, 2024
This was referenced Jun 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#214
Description
To ease the transition to con4m v2, we want to reduce our usage of autogenerated getters in
src/c4autoconf.nim
.The all-encompassing
object
thatc4autoconf.nim
defines isChalkConfig
, which currently contains:As a starting point, try to refactor away all accesses of the fields that end in
Config
(which are shown above).That is, with this PR, the following command no longer returns any matches:
git grep 'chalkConfig\.\w*Config\.'
I'll split this work across a few PRs. Another PR will be for all the fields that are of a simple built-in type.
In con4m v2, we'll be using this proc:
like
so this PR makes it easier for us to refactor to that later.
This PR adds a
get
andgetOpt
inconfig.nim
that calls theget
proc in con4m so we can write:or with the
:T
syntax (edit: this was vetoed):Refs: #214
Testing
Hopefully the existing tests are sufficient.