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

Refactor GenerationConfig to be able to use Default #128

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

hasezoey
Copy link
Collaborator

This PR refactors GenerationConfig to support Default where possible by separating out required and optional fields and supporting a top-level builder. (as suggested as point 3 and hybrid-approach of point 3)

in addition this PR also:

  • moves the "global structures" (which are used almost everywhere) to their own file
  • adds the #[inline] attribute for opaque / trivial functions

fixes #92

@hasezoey hasezoey added the enhancement New feature or request label Jan 15, 2024
@hasezoey hasezoey requested a review from Wulf January 15, 2024 13:58
@hasezoey hasezoey force-pushed the refactorGenerationConfig branch from f65509b to c1f5e3b Compare January 15, 2024 14:02
Copy link
Owner

@Wulf Wulf left a comment

Choose a reason for hiding this comment

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

🚀

@hasezoey hasezoey force-pushed the refactorGenerationConfig branch from c1f5e3b to 766a794 Compare January 16, 2024 13:06
@hasezoey
Copy link
Collaborator Author

hasezoey commented Jan 16, 2024

refactored for #126, i had to use the double-new approach, because one of the required options is behind a flag and it would be weird to have to specify a option that has no effect (if feature is off)

EDIT: also added a changelog entry

by separating out option fields from required fields and using supporting top-level builder pattern

fixes Wulf#92
@hasezoey hasezoey force-pushed the refactorGenerationConfig branch from 766a794 to 1a88081 Compare January 16, 2024 13:11
@hasezoey hasezoey merged commit 1a88081 into Wulf:main Jan 16, 2024
6 checks passed
@hasezoey hasezoey deleted the refactorGenerationConfig branch January 16, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: allow optional GenerationConfig fields
2 participants