Skip to content

docs: add classfile resource specification - #2697

Open
aofei wants to merge 1 commit into
goplus:mainfrom
aofei:classfile-resource-spec
Open

docs: add classfile resource specification#2697
aofei wants to merge 1 commit into
goplus:mainfrom
aofei:classfile-resource-spec

Conversation

@aofei

@aofei aofei commented Apr 1, 2026

Copy link
Copy Markdown
Member

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread doc/classfile-resource-spec.md Outdated
@codecov

codecov Bot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.27%. Comparing base (0e2b085) to head (0b6e843).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aofei
aofei force-pushed the classfile-resource-spec branch 7 times, most recently from e4a2663 to 85ca110 Compare April 8, 2026 11:21
@aofei
aofei marked this pull request as ready for review April 8, 2026 11:23
Copilot AI review requested due to automatic review settings April 8, 2026 11:23
@aofei
aofei force-pushed the classfile-resource-spec branch from 85ca110 to 6b04078 Compare April 8, 2026 11:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md defining 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.

Comment thread doc/classfile-spec.md Outdated
Comment thread doc/classfile-resource-spec.md Outdated

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 StandardDQLQuery production lacks a cross-reference to a normative DQL definition
  • Minor specification-level design considerations for future implementors around resource name validation

Comment thread doc/classfile-resource-spec.md Outdated
Comment thread doc/classfile-resource-spec.md
Comment thread doc/classfile-resource-spec.md
Comment thread doc/classfile-resource-spec.md Outdated
Comment thread doc/classfile-resource-spec.md
Comment thread doc/classfile-resource-spec.md Outdated
Comment thread doc/classfile-spec.md Outdated
@aofei
aofei force-pushed the classfile-resource-spec branch 10 times, most recently from 212fcba to f067091 Compare April 15, 2026 00:57
@aofei
aofei force-pushed the classfile-resource-spec branch from f067091 to 5f45fb3 Compare July 31, 2026 12:12
@aofei aofei changed the title docs: add classfile resource specification docs: specify classfile resources and flat projects Jul 31, 2026
@aofei
aofei force-pushed the classfile-resource-spec branch from 5f45fb3 to 2a2e0c3 Compare July 31, 2026 12:29
@aofei aofei changed the title docs: specify classfile resources and flat projects docs: add classfile resource specification Jul 31, 2026
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>
@aofei
aofei force-pushed the classfile-resource-spec branch from 2a2e0c3 to 0b6e843 Compare August 5, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: standardize classfile resource semantics

2 participants