format: identify info, resources and program objects with their schema and specification version - #305
Open
gnidan wants to merge 7 commits into
Open
format: identify info, resources and program objects with their schema and specification version#305gnidan wants to merge 7 commits into
gnidan wants to merge 7 commits into
Conversation
Contributor
|
gnidan
marked this pull request as ready for review
September 22, 2026 00:14
gnidan
force-pushed
the
architect-identification
branch
from
September 22, 2026 00:14
e5682b3 to
8ed9fdb
Compare
gnidan
force-pushed
the
architect-identification
branch
from
September 22, 2026 00:37
8ed9fdb to
d011ac4
Compare
gnidan
force-pushed
the
architect-identification
branch
2 times, most recently
from
September 29, 2026 19:44
5f43f0c to
7163b01
Compare
gnidan
force-pushed
the
architect-identification
branch
7 times, most recently
from
October 2, 2026 00:23
c61187c to
4d6971c
Compare
gnidan
force-pushed
the
architect-identification
branch
from
October 2, 2026 00:42
4d6971c to
72b97aa
Compare
gnidan
force-pushed
the
architect-identification
branch
from
October 2, 2026 00:54
72b97aa to
3375908
Compare
This branch has not been deployed
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.
Info, resources and program objects can now say which schema they conform to and which version of the specification defines it:
{ "ethdebug": { "schema": "ethdebug/format/program", "version": "0.1.0-draft.0" }, "contract": { "...": "..." } }Info documents and resources objects must carry the field: both schemas list
ethdebuginrequired.schemais the schema's name; its$idisschema:followed by that name.versionis the version of the specification. ethdebug/format/data/identification defines the object, and each root pinsschemato its own name. Because ethdebug/format/info references ethdebug/format/info/resources, the two do this with a 2020-12 dynamic reference: resources declares a$dynamicAnchorwhose default is its own name, and info fills that anchor with"ethdebug/format/info". A standalone resources object therefore cannot claim to be info, and an info document cannot claim to be resources. This is the format's first use of dynamic references; the docs site's schema viewer resolves them to the constant each page's schema pins.The
schema:ids in the schema files stay as they are. They are identifiers in the JSON Schema sense, not web addresses, and they are deliberately not placed in a$schemakey: JSON editors treat$schemaas a URL and report an error for anything they cannot fetch, and no format we looked at (OpenAPI, SARIF, CycloneDX, SPDX) puts a custom-scheme URI there. A namespacedethdebugobject holds both parts without any parsing.Where the field appears, per the new spec page:
version.programandinfoare closed objects (unevaluatedProperties: false), so the previous release's schemas reject an object that carries the field. The changelog entry marks thisrequired:for producers and consumers.Reference implementation, per the rule that a schema change is not done until the implementation supports it:
@ethdebug/formatexportsData.IdentificationandData.isIdentification,identify()for producers, andversion;Programgains the optional member.bin/version.tskeeps the schema examples current: when the specification version moves, the bump rewrites the version literal in the examples in the samePublishcommit. It refuses to run when no example carries the version, or when one carries a version other than the current one.The schema-example handling is a release-tooling module,
bin/release/schema-versions.ts, in an identification PR. It belongs here because this field is what put a version literal into the schema examples. The module finds the literals with one structural rule: under a schema'sexamples, any mapping whoseschemanames one of the format's schemas and that has aversionbeside it. It finds the sites by parsing the YAML and writes by splicing the original text, so the spec sources are never re-printed. Its test checks every literal against the current version and runs in the root suite.Upstream: solc does not emit the field yet (see the conformance note above), and soldb ignores unknown keys. A heads-up issue follows this PR, noting that a solc program will read
evm.bytecode.ethdebug.ethdebugbecause solc already usesethdebugas its namespace key, and that resources objects must now carry the field.