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.27% 94.27%
=======================================
Files 32 32
Lines 10576 10576
=======================================
Hits 9970 9970
Misses 431 431
Partials 175 175 ☔ View full report in Codecov by Harness. 🚀 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
212fcba to
f067091
Compare
f067091 to
5f45fb3
Compare
5f45fb3 to
2a2e0c3
Compare
Define framework resource kinds, pack-document discovery, typed scope bindings, and static tool semantics for classfile resources. Specify active project groups and flat project lowering, including shared project types, fragment ordering, field initialization, and callback assembly. Clarify pack-document merging and DQL query fragments relative to implicit discovery roots. Fixes goplus#2704 Updates goplus#2719 Updates goplus#2802 Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2a2e0c3 to
0b6e843
Compare
Define framework resource kinds, pack-document discovery, typed scope bindings, and static tool semantics for classfile resources.
Specify active project groups and flat project lowering, including shared project types, fragment ordering, field initialization, and callback assembly.
Clarify pack-document merging and DQL query fragments relative to implicit discovery roots.
Fixes #2704
Updates #2719
Updates #2802