-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
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
Decouple validation file schema compilation from yaml parsing #2268
base: main
Are you sure you want to change the base?
Decouple validation file schema compilation from yaml parsing #2268
Conversation
32c1035
to
fb0590d
Compare
5bb9cc2
to
6426b2f
Compare
6426b2f
to
340335e
Compare
@@ -37,10 +37,10 @@ linters: | |||
- 'rowserrcheck' | |||
- 'staticcheck' | |||
- 'stylecheck' | |||
- 'tenv' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was marked as deprecated in favor of usetesting
when I ran golangci-lint run
locally.
@@ -46,8 +46,7 @@ func TestCertRotation(t *testing.T) { | |||
waitFactor = 2 | |||
) | |||
|
|||
certDir, err := os.MkdirTemp("", "test-certs-") | |||
require.NoError(t, err) | |||
certDir := t.TempDir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of the lint recommendations.
// Schema is the schema found. | ||
Schema string | ||
|
||
// SourcePosition is the position of the schema in the file. | ||
SourcePosition spiceerrors.SourcePosition | ||
|
||
// CompiledSchema is the compiled schema. | ||
CompiledSchema *compiler.CompiledSchema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got pushed out into CompileSchema
.
Description
Part of making it possible to run
zed validate
on files that use composable schema syntax. In order to have different compilation behaviors in different cases, we need to not run the compilation as a part of yaml parsing. This implements that.Changes
Will annotate.
Testing
Review. See that things are green.