Conversation
Darkfish has been deprecated since Aliki became the default theme. This makes Aliki a standalone generator by inlining all inherited methods from Darkfish, then removes Darkfish and JsonIndex entirely. - Make RDoc::Generator::Aliki a standalone class (no longer inherits from Darkfish), with all template rendering infrastructure inlined - Remove RDoc::Generator::Darkfish and RDoc::Generator::JsonIndex - Remove darkfish and json_index template directories - Remove darkfish and json_index test files - Update RDoc::Servlet to use Aliki instead of Darkfish - Rewrite servlet search endpoints to use Aliki's search index format - Remove autoload entries and require for darkfish - Update tests to reflect Aliki as the sole HTML generator
|
🚀 Preview deployment available at: https://c67d39c7.rdoc-6cd.pages.dev (commit: fd18e20) |
These methods were only used by the now-removed JsonIndex generator. Each had a TODO comment noting they should be removed after dropping Darkfish/JsonIndex. The Aliki search index uses search_snippet instead. - Remove ClassModule#search_record - Remove TopLevel#search_record - Remove MethodAttr#search_record - Remove corresponding tests
- README: Remove Darkfish theme instructions, simplify theme section - CONTRIBUTING: Remove Darkfish from themes and project structure - AGENTS: Remove Darkfish from structure tree and generators list - LEGAL: Remove Darkfish, JsonIndex/SDoc, and Fonts sections - .stylelintrc.json: Remove darkfish CSS from ignoreFiles
- Return 404 for table_of_contents.html in servlet since Aliki does not have a table_of_contents template - Remove tautological font assertions from aliki_test that only existed to contrast with the now-removed Darkfish theme
317a14b to
cc374e8
Compare
|
I don't think there's any problem with removing it, but how about extracting it as Someone might want to use it in future versions of rdoc. |
|
@hsbt But extracting it means that we'll still need to test it and do some kind of maintenance for it (update Ruby, update dependencies...etc). |
|
Considering that users can have Darkfish customizations that don't apply to Aliki (breaking change), do we need to add a deprecation notice prompting users to migrate first? Or do we already have that? I'm all for removing and simplifying the codebase, just trying to be careful about breaking changes that might be impactful for projects. |
The standalone Aliki generator was hardcoding @template_dir to its own template directory, ignoring @options.template_dir. This broke the --template flag, preventing third-party themes like rorvswild-theme-rdoc from rendering with their own templates. - Use @options.template_dir instead of hardcoded path - Generalize write_style_sheet to copy css/, js/, fonts/, and images/ subdirectories so custom templates with fonts and extra assets work correctly
|
@vinistock We don't have runtime deprecation and it's a bit late to add it now because the Prism-based parser change has been merged and the next release have to be a major release. We did add this in the readme when changing the default them to Aliki:
And let me provide a bit more context about customizing themes in RDoc. There are 2 ways to do it:
So this PR will definitely break anything that does 1 using As for themes using approach 2, because Aliki generator's implementation is still largely the same as Darkfish's, they should be unaffected by this change. I tested it with rorvswild-theme-rdoc, the only theme I know using this approach. And it's still working. I also want to point out approach 2 is EXTREMELY fragile. Because the way templates are rendered using the generator object's |
|
I agree that it's extremely fragile and it's a pattern that I would love to change. My main concern is for big projects with customizations, for example Rails' sdoc, which patches many internals of RDoc and includes a bunch of templates of their own. It might be worth giving them a heads up. |
|
SDoc uses its own generator, which doesn't inherit/reference @p8 can you help me confirm if it's true that SDoc would not be affected by this change? |
|
FWIW, I ran SDoc's tests against this branch and it doesn't create additional failures (some tests are failing because RDoc's anchor/Prism parser changes). |
With Aliki, we don't need these 2 generators anymore. Removing them will allow us to do more cleanups/improvements in the future.
After this is merged, I'll see how we can re-architect Aliki's generator logic.