Skip to content

docs(classfile): add work surface type metadata#2701

Closed
aofei wants to merge 1 commit intogoplus:mainfrom
aofei:classfile-spec
Closed

docs(classfile): add work surface type metadata#2701
aofei wants to merge 1 commit intogoplus:mainfrom
aofei:classfile-spec

Conversation

@aofei
Copy link
Copy Markdown
Member

@aofei aofei commented Apr 2, 2026

Define work surface type as optional classfile metadata for a work file kind and specify its validation and conformance rules.

This also regularizes related terminology in classfile-spec.md, including project file kind, work file kind, and work prototype type, so the new metadata fits the existing classification and assembly rules.

Updates #2700

Copilot AI review requested due to automatic review settings April 2, 2026 08:03
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (be09c49) to head (1d30d88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2701   +/-   ##
=======================================
  Coverage   94.12%   94.12%           
=======================================
  Files          32       32           
  Lines       10054    10054           
=======================================
  Hits         9463     9463           
  Misses        421      421           
  Partials      170      170           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

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

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 updates the classfile specification to introduce 'Work surface types' via a new -surface= flag and refines terminology throughout the document, such as standardizing on 'work file kind' and 'project classfile'. It also clarifies the resolution of symbols like base classes and prototype types within project groups. Review feedback suggests restoring the clarification regarding stripping leading asterisks from base-class names to avoid ambiguity and improving the phrasing of symbol resolution rules to better reflect the project group context.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds optional -surface=<ExportedName> metadata to class directives in the classfile specification, defining and constraining a “work surface type” for downstream semantic consumers, while also regularizing related terminology around project/work file kinds.

Changes:

  • Extends class directive grammar to allow an optional -surface= flag and documents its validation rules.
  • Defines “work surface type” semantics, including the *T implements Surface conformance requirement.
  • Updates terminology throughout the spec to consistently distinguish project/work classfiles and file kinds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xgopilot
Copy link
Copy Markdown

xgopilot bot commented Apr 2, 2026

Well-structured specification PR. The new "Work surface types" section is thorough — especially the explicit negative-space enumeration of what the surface type does not affect. The glossary reorganization and terminology regularization ("work file kind," "work prototype type," etc.) are clear improvements.

Main concerns: (1) "project base type" at line 180 should be "project base class" per the glossary, and the removed *-stripping rule should be restored; (2) a few minor terminology inconsistencies remain ("file-kind" hyphenation, abbreviated "prototype type"). See inline comments.

Define `work surface type` as optional classfile metadata for a
work file kind and specify its validation and conformance rules.

This also regularizes related terminology in `classfile-spec.md`,
including `project file kind`, `work file kind`, and `work
prototype type`, so the new metadata fits the existing
classification and assembly rules.

Updates goplus#2700

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@xushiwei xushiwei closed this Apr 2, 2026
@aofei aofei deleted the classfile-spec branch April 3, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants