generated from vkatsuba/rebar3_plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow doclet
and layout
modules chaining
#22
Merged
Merged
Conversation
This file contains 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
To implement this plugin, we override the `doclet` and `layout` modules with our own. However, a user may want to set his own modules too. With this patch, the plugin remembers the user-configured modules, if any, and calls them or the default modules, before it patches the output. This is useful when a user wants to enable doc chunks (EEP-48) to be able to get the API documentation from the Erlang shell or an IDE. For that, he has to set `edoc_doclet_chunks` and `edoc_layout_chunks` in the EDoc options. Thanks to this patch, the doc chunks are generated as well as the improved HTML documentation.
We use dynamic calls to chain user-configured `doclet` and `layout` modules.
OTP 24: ===> Fetching rebar3_format v1.2.0
===> Fetching katana_code v2.0.0
===> Analyzing applications...
===> Compiling katana_code
===> Compiling rebar3_format
===> Fetching rebar3_lint v1.1.0
===> Fetching elvis_core v1.4.0
===> Fetching zipper v1.0.1
===> Analyzing applications...
===> Compiling zipper
===> Compiling elvis_core
===> Compiling rebar3_lint
===> Fetching rebar3_edoc_extensions v1.2.0
===> Analyzing applications...
===> Compiling rebar3_edoc_extensions
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling rebar3_edoc_extensions
===> Downloading GitHub Markdown CSS for rebar3_edoc_extensions
===> Downloading PrismJS (v1.26.0) for rebar3_edoc_extensions
===> Running edoc for rebar3_edoc_extensions
edoc: error in doclet 'rebar3_edoc_extensions_wrapper': {'EXIT',
{undef,
[{undefined,run,
[{doclet_gen,
[{rebar3_edoc_extensions,
"rebar3_edoc_extensions.erl",
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/src"},
{rebar3_edoc_extensions_wrapper,
"rebar3_edoc_extensions_wrapper.erl",
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/src"},
{rebar3_edoc_extensions_prv,
"rebar3_edoc_extensions_prv.erl",
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/src"},
{rebar3_edoc_extensions_export,
"rebar3_edoc_extensions_export.erl",
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/src"}],
rebar3_edoc_extensions,
[rebar3_edoc_extensions,
rebar3_edoc_extensions_export,
rebar3_edoc_extensions_prv,
rebar3_edoc_extensions_wrapper]},
{doclet_context,
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/doc",
{env,[],[],".html",
#Fun<edoc_lib.1.43957458>,
#Fun<edoc_lib.1.43957458>,...},
[{application,
rebar3_edoc_extensions},
{app_default,
"/home/runner/work/rebar3_edoc_extensions"},
{application,
rebar3_edoc_extensions},
{doclet,...},
{...}|...]}],
[]},
{rebar3_edoc_extensions_wrapper,
run,2,
[{file,
"/home/runner/work/rebar3_edoc_extensions/rebar3_edoc_extensions/src/rebar3_edoc_extensions_wrapper.erl"},
{line,42}]},
{edoc_lib,run_plugin,5,
[{file,"edoc_lib.erl"},
{line,886}]},
{rebar_prv_edoc,
'-do/1-fun-0-',6,
[{file,
"/home/runner/work/rebar3/rebar3/src/rebar_prv_edoc.erl"},
{line,52}]},
{lists,foldl,3,
[{file,"lists.erl"},
{line,1267}]},
{rebar_prv_edoc,do,1,
[{file,
"/home/runner/work/rebar3/rebar3/src/rebar_prv_edoc.erl"},
{line,43}]},
{rebar_core,do,2,
[{file,
"/home/runner/work/rebar3/rebar3/src/rebar_core.erl"},
{line,155}]},
{rebar3,run_aux,2,
[{file,[...]},
{line,...}]}]}}.
===> Failed to generate documentation for app 'rebar3_edoc_extensions' |
I can't reproduce this issue. How do you run the tests? |
OTP 24. Run |
That's because of the circular dependency apparently: |
Hm... then... need to play a little bit... will create a few minor versions |
And released |
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.
To implement this plugin, we override the
doclet
andlayout
modules with our own. However, a user may want to set his own modules too.With this patch, the plugin remembers the user-configured modules, if any, and calls them or the default modules, before it patches the output.
This is useful when a user wants to enable doc chunks (EEP-48) to be able to get the API documentation from the Erlang shell or an IDE. For that, he has to set
edoc_doclet_chunks
andedoc_layout_chunks
in the EDoc options. Thanks to this patch, the doc chunks are generated as well as the improved HTML documentation.