Open
Description
TLDR: using the experimental expiration feature with experimental composable schema leads to validation failures
zed version
client: zed v0.30.2
Repro Issue 1 - Partials
Make a test.zed
:
use expiration
definition user {}
partial test {
relation foo: user with expiration
}
Validate fails:
zed validate --schema-type composable test.zed
ERR terminated with errors error="parse error in ``, line 6, column 17: expiration flag is not enabled; add `use expiration` to top of file"
Compile also fails:
zed preview schema compile test.zed
ERR terminated with errors error="parse error in `test.zed`, line 6, column 17: expiration flag is not enabled; add `use expiration` to top of file"

Repro Issue 2 - Imports
Create a main.zed
:
use expiration
definition user {}
definition ex {
relation foo: ex with expiration
}
import "import.zed"
Create a import.zed
:
definition foo {
relation bar: user with expiration
}
Validate fails:
zed validate --schema-type composable main.zed
ERR terminated with errors error="parse error in `import.zed`, line 3, column 19: expiration flag is not enabled; add `use expiration` to top of file"
but if we add use expiration
as the first line to import.zed
like below:
use expiration
definition foo {
relation bar: user with expiration
}
and then run validate again, we get:
ERR terminated with errors error="parse error in ``, line 1, column 1: found duplicate use flag: expiration"
So either way, the validator is unhappy with this combination of expiration feature and imports 😢
I know these are experimental features so things may not be 100%, but wanted to make a bug report just so this is tracked.
Thanks for the hard work everyone! 🎉
Metadata
Metadata
Assignees
Labels
No labels