Skip to content

Instantly share code, notes, and snippets.

@sdboyer
Created June 27, 2022 13:36
Show Gist options
  • Save sdboyer/b8d201b32906e562f7a0da4dc7f89cc3 to your computer and use it in GitHub Desktop.
Save sdboyer/b8d201b32906e562f7a0da4dc7f89cc3 to your computer and use it in GitHub Desktop.
Succeeds incorrectly - no lenses are declared to map between schema versions
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 a required field we've added, breaking backwards compatibility
newfield: int32
},
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment