-
Notifications
You must be signed in to change notification settings - Fork 119
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
improvement: add casing version and allow for "preserved" casing words #3777
base: main
Are you sure you want to change the base?
Conversation
smartCasing || | ||
casingVersion === generatorsYml.CasingVersion.V0 || | ||
casingVersion === generatorsYml.CasingVersion.V1 | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would have thought that v0
would not default to smart casing?
Some context on the PR about what is v0
and what is v1
would be helpful
}: { | ||
generationLanguage: generatorsYml.GenerationLanguage | undefined; | ||
keywords: string[] | undefined; | ||
smartCasing: boolean; | ||
casingVersion: generatorsYml.CasingVersion | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think we can delete smartCasing altogether and just rely on casingVersion
now here?
i would have expected the code to read something like:
switch (version) {
case "v0":
// do a vanilla case
case "v1":
// handle initialisms and numbers
default:
assertNever(version)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you want to have a yaml migration to move smartCasing to v0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think internally in the codebase we can have casingVersion
(in ir-generator
for example), but externally we can listen to version first and then fall back to smart-casing -> v1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so no yaml migration needed
No description provided.