-
Notifications
You must be signed in to change notification settings - Fork 223
refactor: remove some technical debt and make code generation more consistant #781
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
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Pull request overview
This PR refactors the code generation infrastructure to eliminate technical debt and improve consistency. The main changes consolidate generator code into a common package, switch from file-based templates to embedded filesystems, and standardize the generator interface across all modules.
Key changes:
- Centralized generator logic in
internal/generator/commonwith a unifiedGeneratortype - Migrated from file-based template paths to embedded
embed.FSfor all generators - Reorganized field generator from
field/generatortointernal/generator/field
Reviewed changes
Copilot reviewed 126 out of 193 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/generator/common/generator.go | New centralized generator implementation with embed.FS support |
| internal/generator/common/funcs.go | Common template functions extracted for reuse |
| internal/generator/field/generator.go | Refactored field generator using new common infrastructure |
| internal/generator/main.go | Updated main generator to use new common generator and field configuration |
| internal/generator/*/template/templates.go | Added embed.FS declarations for all generator modules |
| field/generator/generator.go | Converted to public wrapper around internal field generator |
| go.mod | Updated dependencies including bavard version |
| internal/generator/config/fields.go | New field configuration for standalone field generation |
Comments suppressed due to low confidence (1)
internal/generator/main.go:1
- Corrected spelling of 'consistant' to 'consistent' in the PR title.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Tackles long standing tech debt on the code generation front, make the field and curve generation more consistent and cleaner.
Note
Modernizes and aligns code generation and docs.
.github/copilot-instructions.mdoutlining coding style and template-based generation/testingREADME.mdto referencefield/generatorand fixes contact formattingbls12-377,bls12-381,bls24-315, andbls24-317(copyright year to 2026, asm recompile-hash comments); no functional changes indicatedWritten by Cursor Bugbot for commit a7c270a. This will update automatically on new commits. Configure here.