Skip to content

Conversation

@gbotrel
Copy link
Collaborator

@gbotrel gbotrel commented Dec 29, 2025

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.

  • Adds .github/copilot-instructions.md outlining coding style and template-based generation/testing
  • Updates README.md to reference field/generator and fixes contact formatting
  • Regenerates generated files for bls12-377, bls12-381, bls24-315, and bls24-317 (copyright year to 2026, asm recompile-hash comments); no functional changes indicated

Written by Cursor Bugbot for commit a7c270a. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings December 29, 2025 02:52
@socket-security
Copy link

socket-security bot commented Dec 29, 2025

Copy link
Contributor

Copilot AI left a 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/common with a unified Generator type
  • Migrated from file-based template paths to embedded embed.FS for all generators
  • Reorganized field generator from field/generator to internal/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants