chore: bring in spicedb and update compilation#635
Conversation
610e2cc to
1fb916b
Compare
|
Current TODOs and notes:
|
d353034 to
6dc6f3f
Compare
6dc6f3f to
47ee676
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
+ Coverage 41.65% 42.13% +0.48%
==========================================
Files 38 38
Lines 6127 6045 -82
==========================================
- Hits 2552 2547 -5
+ Misses 3319 3243 -76
+ Partials 256 255 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
47ee676 to
32e38db
Compare
| From pastebin: | ||
| zed validate https://pastebin.com/8qU45rVK | ||
|
|
||
| From a devtools instance: |
There was a problem hiding this comment.
FYI devtools was deprecated
| ``` | ||
| --fail-on-warn treat warnings as errors during validation | ||
| --force-color force color code output even in non-tty environments | ||
| --schema-type string force validation according to specific schema syntax ("", "composable", "standard") |
There was a problem hiding this comment.
FYI big change: removing the flag
| command: []string{"zed", "validate"}, | ||
| expectFlagErrorCalled: true, | ||
| flagErrorContains: "requires at least 1 arg(s), only received 0", | ||
| expectUsageContains: "zed validate <validation_file_or_schema_file> [flags]", |
There was a problem hiding this comment.
I don't know who would want to validate more than one schema file at once, but 🤷♀️
| Schema: parsed.Schema.Schema, | ||
| Relationships: tuples, | ||
| }) | ||
| }, development.WithSourceFS(filesystem), development.WithRootFileName(filepath.Base(filename))) |
There was a problem hiding this comment.
FYI this is what allows us to validate composable schemas
|
|
||
| func outputDeveloperErrorsWithLineOffset(sb *strings.Builder, validateContents []byte, devErrors []*devinterface.DeveloperError, lineOffset int, sourceFS fs.FS) { | ||
| for _, devErr := range devErrors { | ||
| // If the error has a Path, read the contents from that file instead. |
There was a problem hiding this comment.
FYI this is what lets zed know which file contained error so it can print the contents of the context of the error
Description
This PR is part of unifying the composable schema package into the tooling for a better developer experience. The key changes are:
- Import errors in composable schemas
- Nonexistent imports
- Nested composable schemas
- External schemas with escaping/errors
Testing
Unit tests