Skip to content

Instantly share code, notes, and snippets.

@sdboyer
Last active June 27, 2022 13:19
Show Gist options
  • Save sdboyer/00f7b232c85c262b33f8b5f7ad121fc7 to your computer and use it in GitHub Desktop.
Save sdboyer/00f7b232c85c262b33f8b5f7ad121fc7 to your computer and use it in GitHub Desktop.
Fails - 1.0 must be backwards incompatible with 0.0
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
},
]
}
]
$ 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