Skip to content

Comments

build: generate drivers with std lib only [skip ci]#908

Merged
burningalchemist merged 1 commit intomasterfrom
chore/drivers_gen
Feb 23, 2026
Merged

build: generate drivers with std lib only [skip ci]#908
burningalchemist merged 1 commit intomasterfrom
chore/drivers_gen

Conversation

@burningalchemist
Copy link
Owner

This pull request refactors the drivers_gen.go code generation script to remove its dependency on the github.com/dave/jennifer/jen library, making the tool more self-contained and robust. It also improves usability by providing clearer usage instructions, more flexible argument handling, and deterministic output.

Dependency removal and code generation:

  • Removed the dependency on the github.com/dave/jennifer/jen code generation library; now generates Go source code using the standard library and formats it with go/format. (drivers_gen.go, Makefile) [1] [2]

Usability improvements:

  • Enhanced argument handling to accept both os.Args[2:] and os.Args[1:], improving compatibility and flexibility in how the script is invoked. (drivers_gen.go)
  • Added a usage message that lists available driver keys if no arguments are provided, improving user guidance. (drivers_gen.go)
  • Outputs the list of selected drivers and the output filename, giving users clearer feedback on what the script is doing. (drivers_gen.go)

Output stability:

  • Ensures deterministic and de-duplicated ordering of imported drivers in the generated file, making builds more reproducible. (drivers_gen.go)

@burningalchemist burningalchemist changed the title build: generate drivers with std lib only build: generate drivers with std lib only [skip ci] Feb 23, 2026
@burningalchemist burningalchemist merged commit 73ef8a1 into master Feb 23, 2026
4 checks passed
@burningalchemist burningalchemist deleted the chore/drivers_gen branch February 23, 2026 09:20
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.

1 participant