Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid accessing RDoc objects through Store #1308

Merged
merged 3 commits into from
Mar 9, 2025

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Mar 9, 2025

There's an unhealthy coupling between RDoc and Store, where they hold reference of each other and access things both ways.

IMO, RDoc instances holding Store objects makes sense as Store is a component of it. But Store shouldn't need to reference back to its RDoc instance.

This PR is the first step of removing this coupling by dropping Store#rdoc usages.

st0012 added 3 commits March 9, 2025 12:22

Unverified

The email in this signature doesn’t match the committer email.

Unverified

The email in this signature doesn’t match the committer email.

Unverified

The email in this signature doesn’t match the committer email.
Copy link

cloudflare-workers-and-pages bot commented Mar 9, 2025

Deploying rdoc with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0be6655
Status: ✅  Deploy successful!
Preview URL: https://9bdab36e.rdoc-6cd.pages.dev
Branch Preview URL: https://reduce-store-and-rdoc-coupli.rdoc-6cd.pages.dev

View logs

# the documentation tree to access user-set options, for example.

attr_accessor :rdoc
attr_writer :rdoc
Copy link
Member

Choose a reason for hiding this comment

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

I think RDoc::Store only needs attr_accessor :options, but we need to consider the initialization order of rdoc.options and store.rdoc. Maybe we can do it in another followup pull request later.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have a WIP PR for that (which was meant to be part of this PR). I still have a few tests to fix but can open a draft for it after this is merged.

@st0012 st0012 merged commit c809ba8 into master Mar 9, 2025
60 checks passed
@st0012 st0012 deleted the reduce-store-and-rdoc-coupling branch March 9, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants