Repository navigation
compiler: conformance cases for given-up guarantees (core#224) - #5
Merged
Merged
Conversation
Schema graphs as data with the outcome a compiler must reproduce: the guarantees each protocol gives up and who acknowledged them, and the diagnostics a build reports. Written compactly in compiler/src, generated into compiler/cases/*.json, held to specs/compiler.cue and specs/compiler.jq by specs/check.sh.
… doesn't end a cycle yet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starts the compiler conformance cases of ComlineProject/core#224: schema graphs as data, with the outcome any compiler must reproduce. This is the specification side; core's runner follows in a later PR, and its first run is the real check of the expectations here (outcomes are those of core at
d1b678a).Layout
compiler/cases/<group>.json: the cases, six groups, 42 cases. What a runner reads and a consumer vendors.compiler/src/*.cue: where they are written. A package's files are multi-line strings, an expected outcome a struct;specs/check.shgenerates the JSON, and CI fails when it is stale. (The vectors are JSON because a generator writes them; these are written by hand, and multi-line schema text in JSON is unreadable.)specs/compiler.cue:#CompilerCases, closed: guarantee ids and acknowledgement scopes come from the catalog, diagnostic codes are a closed list with their severities, so a typo can't pass.specs/gen/compiler.schema.jsonis generated from it.specs/compiler.jq: what the schema can't say: each protocol of the built package listed once, acknowledged guarantees are given up, reasons are written in the package, dependencies exist and have no cycle and are declared inconfig, a failing build says why.compiler/readme.md: the format, how a compiler runs a case, the corpus, what is to come (inner scopes, strict, pinning to chains, fail closed), and how core vendors it (compiler/cases/*.jsonat a pinned rev, as for the size vectors).Format notes
id,description,packages(name, wholeconfig.idp, schema files{path, text}, pathdependencies),build,expect.given_upset, optionallyacknowledged(scopeprotocolorpackage, and the reason shown), and the warnings as{code, severity}.error_containsfor a dependency that isn't accepted, which core reports without a code: provisional until those errors get codes.No VERSION bump.