I responded in the issue with more
# spicedb
j
I responded in the issue with more details
l
Thanks a lot for the info! Responded
j
responded
I'd love to be able to have strict arrowsd
but sadly, it would break real uses
l
responded more
I think some configurable linter could provide some specific rules like listed in PR #8, the compiler shouldn't be broken perhaps
enough for today and this week/month but I might come back to the linter some time, we went for this custom validation at the moment to enforce our custom subset of the schema
Another reason for this strict linting is that we're using the schema language as a source for a code generator that generates go code that uses different types based on the prefixes for definitions, relations or permissions. When the schema passes the validator, it is guaranteed to generate valid go code. The go code contains an
init()
function that compiles the schema using
compiler
package
it seemed like the compiler package was less strict than devcontext whatever named packages
like compiler cared only for syntax but the developer compiler had extra errors that seemed to evaluate at least the local relations for the current object but not parent relations, that's where I found the issue
j
the compiler cares about parsing + forming the AST
the type system validates types
l
I saw that graph.Walk... function earlier but couldn't bother to look too deep
okay, I was not hoping for
internal
packages but it seems like solid go code all around with error logging clearly figured out
j
its not intended that people implement their own type checking
l
there is
TypeSystem
, couldn't bothered to dive in right now but get the basic idea
there is some backend that its internal typed representation of the data
as far as I know it's just an sql wrapper, haven't really looked further
4 Views