-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg: drop cue/build and pkg/internal from gen.go
The code just needs to parse CUE files to extract the declarations. There is no need to build instances and values to extract the syntax; we can parse the syntax directly. This gives us better results in any case, as the resulting syntax directly follows the source. For example, the original source uses octal integer literals and uses some inline structs for readability, and we keep those now. As a bonus, as we no longer use the CUE evaluator, `go generate` drops from ~0.35s to ~0.25s on my laptop. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Id6c03c49421c4b2ead467b523bcd4f25b41c002b Dispatch-Trailer: {"type":"trybot","CL":1201388,"patchset":1,"ref":"refs/changes/88/1201388/1","targetBranch":"master"}
- Loading branch information
Showing
6 changed files
with
52 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.