Last active
June 27, 2022 13:33
-
-
Save sdboyer/a5efbe28da2f1a552065411d6e6ce492 to your computer and use it in GitHub Desktop.
Fails correctly - 0.1 is incompatible with 0.0
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 required field we've added, breaking backwards compatibility | |
newfield: int32 | |
}, | |
] | |
}, | |
] |
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