-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This change centralizes the pkg code generation to a single call to `go run pkg/gen` instead of having an individual invocation of `go run gen.go` inside each package. The `go:generate` line is moved into `pkg/gen.go`. This significantly speeds up code generation (from ~15s to ~3s when I last tested it). We also avoid the cyclic dependency of the code generator on the code that's been generated by avoiding the use of `cue/load` which depends in turn on the standard library which is generated by `pkg/gen`. This is an intermediate step towards refactoring the pkg code generation to allow easy specification of arbitrary function signatures. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I118d678809e33da3349b598967967bda91613cfd Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/538503 Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package pkg | ||
|
||
//go:generate go run ./gen |