Last active
June 27, 2022 13:31
-
-
Save sdboyer/a0e3d9e7a1d1ef3774abeb31bf8f2f86 to your computer and use it in GitHub Desktop.
Fails incorrectly - Thema needs a custom checker to make defaults sufficient for backwards compatibility
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
package foo | |
import "github.com/grafana/thema" | |
thema.#Lineage | |
name: "foo" | |
seqs: [ | |
{ | |
schemas: [ | |
{// 0.0 | |
// Init is a string. This comment goes with the field thru codegen | |
init: string | |
}, | |
{// 0.1 | |
// Init is a string. This comment goes with the field thru codegen | |
init: string | |
// newfield is a field with a default | |
newfield: int32 | *4 | |
}, | |
] | |
}, | |
] |
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
make gen-cue | |
generate code from .cue files | |
go generate ./pkg/framework/coremodel | |
could not process coremodel dir /Users/sdboyer/ws/grafana/pkg/coremodel: required field is optional in subsumed value: newfield (and 1 more errors) | |
exit status 1 | |
pkg/framework/coremodel/interface.go:5: running "go": exit status 1 | |
make: *** [gen-cue] Error 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment