-
Notifications
You must be signed in to change notification settings - Fork 438
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
RDoc doesn't have complete files when being installed from git/github source #1107
Comments
Not a maintainer, but wanted to provide my 2c
This is the easiest and fastest way to resolve this issue. I don't see any downside of doing this? Long term, the Markdown parser should be reviewed to see if the extra steps can be simplified/reduced into something not requiring compilation. |
ETA: I don't think this is a valid issue as it stands. I think this is a problem with bundler and the way people expect git bundles to work. Generated files should not be checked in w/o good reason, and I don't see a good reason here. |
While I agree it's not a "RDoc issue", I'm not sure if bundler should ever run a gem's build scripts locally. In RDoc's case, it means that bundler would also need to install at least (Of course I don't have much context around bundler, it's just my 2 cents)
I think making it possible for the community to experiment with their RDoc patch or doing ad-hoc fixes when needed is a pretty good reason? For example, my team is working on a new theme generator for RDoc called snapper (branch), which we're dogfooding in projects like Ruby LSP's docs. Without a workaround on this issue, it's impossible to do so. Currently we baked the And if the community can't even properly dogfood the fixes/features they want to propose, it simply hinders the project's development. Given that the markdown parser of RDoc is not frequently touched, I think committing the generated files is a good tradeoff for enabling better a development flow for the project. FWIW, though not for the exact same reason, debug also generates its readme dynamically and commit both the template and the generated result, with a simple task run on CI to make sure they're synced. It's been developed like this for over 2 years and works well IMO. |
Just as another data point. I can't release the Rails docs with a fix from rdoc because that fix wasn't released yet, and I can't just point to the git repository. Either I have to fork rdoc to add a few generated files that always provide the same result, not matter which SO I generate them, or I need to wait a release of rdoc. I can see the argument to not add the generated files to the repository, but I don't think this issue should be fixed in bundler because If putting the generated file in the repository isn't a solution, maybe you should consider using |
For what it's worth, we ran into this same issue with prism. I didn't want to check in the generated files either, so I ended up doing the second approach here https://github.com/ruby/prism/blob/428d64bed407d34350c80ed83b41a2d59b8a1163/ext/prism/extconf.rb#L37. It's relatively simple all things considered. |
@st0012 and all, Thanks for your consideration this. I understood this issue, but I'm not sure what's best solution about this. If we put generated files to this repository, maintainers always check that don't update only generated files each pull-request.
I just released rdoc-6.7.0 at https://github.com/ruby/rdoc/releases/tag/v6.7.0. You can use that instead of pointing |
Context
kpeg
for its markdown parser, which readslib/markdown.kpeg
to outputlib/markdown.rb
..rb
files, but relies on itsgenerate
rake task to generate them.generate
is a prerequisite of thebuild
task, which is part of therelease
task. So files likelib/markdown.rb
will be generated and packaged as part of the gem.However, if users install RDoc from a git/github source, those generated files will be missing, and thus cause errors.
Reproduction Steps
gem "rdoc", github: "ruby/rdoc"
to the Gemfilebundle install
Possible solutions
extconf.rb
to runrake build
, which will be executed every time the gem is installed (PoC).The text was updated successfully, but these errors were encountered: