Skip to content

Associate comments with their markup source - #1787

Draft
st0012 wants to merge 1 commit into
ruby:masterfrom
st0012:codex/comment-markup-source
Draft

Associate comments with their markup source#1787
st0012 wants to merge 1 commit into
ruby:masterfrom
st0012:codex/comment-markup-source

Conversation

@st0012

@st0012 st0012 commented Aug 23, 2026

Copy link
Copy Markdown
Member

RDoc::Comment.new now requires an explicit markup_source:, normally the shared RDoc::TopLevel of the parser. Comments parsed from text remain lazy and cached, and their documents derive file provenance from that source. The public location= and document= writers are removed.

Parser call sites reuse their existing TopLevel. RDoc::Comment.from_document provides the controlled path for restored or imported documents. RBS remains the only parser that uses this path to build synthetic merged comments.

@st0012
st0012 requested a deployment to fork-preview-protection August 23, 2026 12:11 — with GitHub Actions Waiting
@st0012
st0012 force-pushed the codex/comment-markup-source branch from 77625e6 to 4f10f12 Compare August 23, 2026 12:37
@st0012
st0012 requested a deployment to fork-preview-protection August 23, 2026 12:37 — with GitHub Actions Waiting
@st0012
st0012 force-pushed the codex/comment-markup-source branch from 4f10f12 to 03b3145 Compare August 23, 2026 12:46
@st0012
st0012 requested a deployment to fork-preview-protection August 23, 2026 12:46 — with GitHub Actions Waiting
# Before marshalling:
# - +location+ is an RDoc::TopLevel
# - +comments+ are Strings
# - +comments+ are Strings or RDoc::Comment objects

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This reflects existing behaviour. It's not introduced in this PR

Require each Comment to receive a markup source and derive parsed document provenance from that source. Add from_document for restored or imported documents, while keeping RBS synthetic merging contained.
@st0012
st0012 force-pushed the codex/comment-markup-source branch from 03b3145 to a9f4b00 Compare August 23, 2026 14:35
@st0012
st0012 requested a deployment to fork-preview-protection August 23, 2026 14:35 — with GitHub Actions Waiting
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.

1 participant