docs: add classfile resource specification#2697
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the XGo classfile resource specification, which defines the syntax and semantics for resources in XGo frameworks, including metadata declaration, catalog document formats, and static analysis rules. The review feedback identifies an improvement opportunity in the EBNF notation section, suggesting that the ClassExt production should use a formal comment block for its description to adhere to standard conventions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2697 +/- ##
=======================================
Coverage 94.08% 94.08%
=======================================
Files 32 32
Lines 10061 10061
=======================================
Hits 9466 9466
Misses 425 425
Partials 170 170 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e4a2663 to
85ca110
Compare
85ca110 to
6b04078
Compare
There was a problem hiding this comment.
Pull request overview
Adds a formal resource model spec for XGo classfile frameworks and aligns the base classfile spec terminology to support that model (including introducing the “project document” concept used for discovery).
Changes:
- Add
doc/classfile-resource-spec.mddefining resource kinds, canonical reference types, DQL-based discovery, scope bindings, and tool semantics. - Clarify and tighten terminology in
doc/classfile-spec.md(project/work file kinds, base class, work prototype type) and document the project document shape.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
doc/classfile-spec.md |
Adds/clarifies key terms and specifies the shared JSON “project document” used by resource discovery. |
doc/classfile-resource-spec.md |
Introduces the full resource semantics specification for classfile frameworks (bindings, discovery, scoping, and tooling rules). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Documentation Review Summary
This is a well-structured and carefully written formal specification. The "Conformance" and "Excluded semantics" sections are clear, and the overall organization is logical. The terminology changes in classfile-spec.md are consistent and improve precision.
Below are noteworthy findings, mostly around terminology consistency and completeness within the specification.
Key themes:
- A few undefined or inconsistently-used terms that could cause ambiguity in a formal specification
- One example references an undeclared type
- The
StandardDQLQueryproduction lacks a cross-reference to a normative DQL definition - Minor specification-level design considerations for future implementors around resource name validation
9afe576 to
212fcba
Compare
Add `doc/classfile-resource-spec.md` to define the resource model for XGo classfile frameworks. The specification now defines discovery-based resource introduction over project-scoped pack documents, work classfile-implied top-level resources, and static tool semantics for typed resource references. This also updates `doc/classfile-spec.md` to define `pack` directives, pack roots, and pack documents as the standardized discovery substrate for classfile resource semantics. Fixes goplus#2704 Updates goplus#2719 Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
212fcba to
f067091
Compare
Add
doc/classfile-resource-spec.mdto define the resource model for XGo classfile frameworks.The specification now defines discovery-based resource introduction over project-scoped pack documents, work classfile-implied top-level resources, and static tool semantics for typed resource references.
This also updates
doc/classfile-spec.mdto definepackdirectives, pack roots, and pack documents as the standardized discovery substrate for classfile resource semantics.Fixes #2704
Updates #2719