-
Notifications
You must be signed in to change notification settings - Fork 440
Remove unused class_dir
and file_dir
attributes from generators
#1304
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
Conversation
In all generators it only returns nil.
Similar to the class_dir attribute, the file_dir attribute never returns anything but nil.
Since their prefix argument is always nil, we can stop passing it and simplify the methods accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Hello! 👋 This is a major breaking change for SDoc. SDoc overrides It should also be noted that RDoc < 6.13.0 requires these methods when implementing a custom generator. Omitting them will cause RDoc to raise a As a workaround, I monkey patched |
Sorry that I wasn't aware of |
In #1304, I removed the ability to set path prefix through patching Darkfish generator. But it turns out that it's used in `sdoc`. See #1304 (comment) But the original implementation was brittle and confusing. So instead of just restoring it, I think allowing the customization through options is a better approach.
In #1304, I removed the ability to set path prefix through patching Darkfish generator. But it turns out that it's used in `sdoc`. See #1304 (comment) But the original implementation was brittle and confusing. So instead of just restoring it, I think allowing the customization through options is a better approach.
I think customizing prefix in options is a better approach: #1330 |
In #1304, I removed the ability to set path prefix through patching Darkfish generator. But it turns out that it's used in `sdoc`. See #1304 (comment) But the original implementation was brittle and confusing. So instead of just restoring it, I think allowing the customization through options is a better approach.
Oh, it may be better that we have a CI job for SDoc: #1331 |
In #1304, I removed the ability to set path prefix through patching Darkfish generator. But it turns out that it's used in `sdoc`. See #1304 (comment) But the original implementation was brittle and confusing. So instead of just restoring it, I think allowing the customization through options is a better approach.
In #1304, I removed the ability to set path prefix through patching Darkfish generator. But it turns out that it's used in `sdoc`. See #1304 (comment) But the original implementation was brittle and confusing. So instead of just restoring it, I think allowing the customization through options is a better approach.
This change also broke expected file creation in the hanna gem. I'll see if I can get the prefix option described in #1330 to work, but backwards incompatible changes like this should be reserved for major version bumps. RDoc should not assume that Darkfish is the only generator, and just remove features that Darkfish doesn't use. Edit: Fixed: jeremyevans/hanna@79c453c |
These generator methods are either not defined, or return a fixed
nil
value. Therefore, we can remove them and simplify some downstream logics accordingly.