Skip to content

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Aug 14, 2025

Closes #1107 and will likely prevent issues like https://bugs.ruby-lang.org/issues/21541 in the future

With ignoring generated files in the source control, we always need one extra step to make the gem usable, which limits how the gem can be distributed (#1107) and make post-distribution issues easier to happen (which are in general harder to fix too).

If gems like prism and rbs and debug can avoid this issue by committing generated files and verifying them on CI, I think we should do that too.

st0012 added 2 commits August 14, 2025 13:44
- Add `verify_generated` task to Rakefile
- Always run rubocop on generated files
@matzbot
Copy link
Collaborator

matzbot commented Aug 14, 2025

🚀 Preview deployment available at: https://6c6484b3.rdoc-6cd.pages.dev (commit: df6379b)

@st0012 st0012 marked this pull request as draft August 14, 2025 13:37
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@tompng
Copy link
Member

tompng commented Aug 15, 2025

I agree for adding generated files 👍

CI seems to pass even if generated files are out of date.
Diff to markdown.kpeg: https://github.com/tompng/rdoc/actions/runs/16994310600 All tests passes
Diff to block_parser.ry: https://github.com/tompng/rdoc/actions/runs/16995015009 macos-latest always fails, windows-latest always passes.

Reproduce locally:

  1. Add a diff to markdown.kpeg and commit. verify_generated correctly fails.
  2. Switch to another branch and go back again. verify_generated wrongly passes.
  3. touch markdown.kpeg and try rake verify_generated again. It correctly fails.

@st0012 st0012 requested review from kou and tompng August 25, 2025 14:35
@kou kou merged commit 11b093a into master Aug 25, 2025
62 checks passed
@kou kou deleted the commit-generated-files branch August 25, 2025 23:55
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.

RDoc doesn't have complete files when being installed from git/github source
5 participants