Group code object files into the same directory#1114
Merged
st0012 merged 1 commit intoruby:masterfrom Jul 2, 2024
Merged
Conversation
It's hard to distinguish code object classes by their file names alone. And given that we have 18 such classes, it'd make the codebase a lot easier to understand if we grouped them into a single directory. Given that these classes are all autoloaded in `lib/rdoc.rb` instead of required individually, this change should have minimum impact on projects using RDoc as they generally just require `rdoc`, not individual files. An example is Rails' `sdoc`: https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb
Member
|
I'm +1 for this. But I'm not sure how libraries refer these files directory like Can you investigate that? |
Member
Author
|
Most of the results are from fork or vendored RDoc. A few gems that actually require RDoc explicitly all have been unmaintained for more than 10 years (example1, example2). I think it's mostly because 13 years ago RDoc started autoloading those classes. And given the number of the classes needed, most libs probably just switched to |
colby-swandale
approved these changes
Jul 2, 2024
matzbot
pushed a commit
to ruby/ruby
that referenced
this pull request
Jul 2, 2024
(ruby/rdoc#1114) It's hard to distinguish code object classes by their file names alone. And given that we have 18 such classes, it'd make the codebase a lot easier to understand if we grouped them into a single directory. Given that these classes are all autoloaded in `lib/rdoc.rb` instead of required individually, this change should have minimum impact on projects using RDoc as they generally just require `rdoc`, not individual files. An example is Rails' `sdoc`: https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb ruby/rdoc@4211292ffe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's hard to distinguish code object classes by their file names alone. And given that we have 18 such classes, it'd make the codebase a lot easier to understand if we grouped them into a single directory.
Given that these classes are all autoloaded in
lib/rdoc.rbinstead of required individually, this change should have minimum impact on projects using RDoc as they generally just requirerdoc, not individual files. An example is Rails'sdoc:https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb