Last active
June 27, 2022 13:19
-
-
Save sdboyer/00f7b232c85c262b33f8b5f7ad121fc7 to your computer and use it in GitHub Desktop.
Fails - 1.0 must be backwards 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 | |
}, | |
] | |
}, | |
{ | |
schemas: [ | |
{// 1.0 | |
// Init is a string. This comment goes with the field thru codegen | |
init: string | |
// newfield is an optional field | |
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: schema 1.0 must be backwards incompatible with schema 0.0 | |
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