Hi everyone, I was wondering if someone could expl...
# spicedb
m
Hi everyone, I was wondering if someone could explain the prefix use case to me? I tried searching around and I saw a comment where it says prefixes are an organizational tool which was my understanding, however zed does not seem too happy when I try to write schemas with more than one prefix. Not sure if this is intended behavior. I feel this logic might not be intended https://github.com/authzed/zed/blob/29be8aca9160180965f52b2830b9190f21b643e1/cmd/zed/schema.go#L315-L367 My reasoning is zed has no issue on the first schema write, but then on any subsequent write it is broken regardless of what schema is passed in because it is using the existing schema and trying to derive the prefix from it.
Reproduction steps: Fresh spicedb instance
Copy code
% zed schema write <(cat << EOF
definition core/user {}
definition new/thing {}
EOF
)
Then try to write the exact same thing
Copy code
zed schema write <(cat << EOF
definition core/user {}
definition new/thing {}
EOF
)
Error: found multiple schema definition prefixes: [core new]