We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having constraints in the schemas is breaking the backward-compatibility check when binding lineages.
This following lineage should be valid but is considered invalid and throws the error below:
Lineage:
import ( "strings" "time" "github.com/grafana/thema" ) lin: thema.#Lineage lin: name: "constraints" lin: schemas: [{ version: [0, 0] schema: { aString: string & strings.MinRunes(1) aTime: string & time.Time anInt: uint32 & >0 & <=24 | *12 } }, { version: [0, 1] schema: { aString: string & strings.MinRunes(1) aTime: string & time.Time anInt: uint32 & >0 & <=24 | *12 secondfield?: int32 } }] lin: lenses: [{ from: [0, 1] to: [0, 0] input: _ result: { aString: input.aString aTime: input.aTime anInt: input.anInt } }]
Error:
lineage_test.go:33: error binding lineage: schema 0.1 is not backwards compatible with schema 0.0: (1) forced error mark | "invalid lineage" | github.com/cockroachdb/errors/withstack/*withstack.withStack:: Wraps: (2) schema 0.1 is not backwards compatible with schema 0.0: | field aString not present in {aString:strings.MinRunes(1),aTime:time.Time(),anInt:*12 | >0 & <=24 & int}: | C:\Users\agnes\Documents\as-code\thema\lineage.cue:247:10 | C:\Users\agnes\Documents\as-code\thema\testdata\lineage\in.cue:13:13 | missing field "aString" | invalid value strings.MinRunes(1) (does not satisfy strings.MinRunes(1)): error in call to strings.MinRunes: non-concrete value string: | C:\Users\agnes\Documents\as-code\thema\testdata\lineage\in.cue:22:21 | C:\Users\agnes\Documents\as-code\thema\testdata\lineage\in.cue:14:21 | C:\Users\agnes\Documents\as-code\thema\testdata\lineage\in.cue:22:38 Error types: (1) *markers.withMark (2) *errors.errorString
I opened an issue in the CUE repo to fix the behavior of Subsume: cue-lang/cue#2419
Subsume
Meanwhile, we should ignore these errors.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Having constraints in the schemas is breaking the backward-compatibility check when binding lineages.
This following lineage should be valid but is considered invalid and throws the error below:
Lineage:
Error:
I opened an issue in the CUE repo to fix the behavior of
Subsume
: cue-lang/cue#2419Meanwhile, we should ignore these errors.
The text was updated successfully, but these errors were encountered: