Skip to content
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

Custom layout - ArgumentError: No such template for default/fulldoc/html #1490

Closed
floehopper opened this issue Apr 9, 2023 · 3 comments
Closed

Comments

@floehopper
Copy link

floehopper commented Apr 9, 2023

The release of v0.9.29 seems to have broken some code in Mocha which I use to add Google Analytics to the Yard template. I see the following exception when generating docs:

ArgumentError: No such template for default/fulldoc/html

This problem does not occur with v0.9.28. I've had a quick look through the changes between v0.9.28 and v0.9.29, but I can't see anything obvious that might've introduced the problem.

Steps to reproduce

I'm afraid I haven't yet had time to reduce this to the simplest case, but the following steps shouldn't be too hard to use to reproduce the problem.

The yardoc Rake task uses .yardopts. In particular the template-path option is set to point to the yard-templates directory which contains a couple of files: default/layout/html/setup.rb & default/layout/html/google_analytics.erb.

Actual Output

> MOCHA_GENERATE_DOCS=1 GOOGLE_ANALYTICS_WEB_PROPERTY_ID=dummy rake yardoc --trace                    (main|✚53⚑7)
** Invoke yardoc (first_time)
** Invoke docs_environment (first_time)
** Execute docs_environment
** Execute yardoc
[debug]: Parsing ["lib/mocha/api.rb", "lib/mocha/hooks.rb", "lib/mocha/mock.rb", "lib/mocha/expectation.rb", "lib/mocha/object_methods.rb", "lib/mocha/class_methods.rb", "lib/mocha/parameter_matchers.rb", "lib/mocha/parameter_matchers", "lib/mocha/state_machine.rb", "lib/mocha/sequence.rb", "lib/mocha/configuration.rb", "lib/mocha/expectation_error_factory.rb", "lib/mocha/expectation_error.rb", "lib/mocha/stubbing_error.rb", "lib/mocha/unexpected_invocation.rb", "lib/mocha/integration/test_unit/adapter.rb", "lib/mocha/integration/mini_test/adapter.rb"] with `ruby` parser
[debug]: Parsing lib/mocha/api.rb
[debug]: Parsing lib/mocha/hooks.rb
[debug]: Parsing lib/mocha/mock.rb
[debug]: Parsing lib/mocha/expectation.rb
[debug]: Parsing lib/mocha/object_methods.rb
[debug]: Parsing lib/mocha/class_methods.rb
[debug]: Parsing lib/mocha/parameter_matchers.rb
[debug]: Parsing lib/mocha/parameter_matchers/not.rb
[debug]: Parsing lib/mocha/parameter_matchers/base.rb
[debug]: Parsing lib/mocha/parameter_matchers/is_a.rb
[debug]: Parsing lib/mocha/parameter_matchers/all_of.rb
[debug]: Parsing lib/mocha/parameter_matchers/any_of.rb
[debug]: Parsing lib/mocha/parameter_matchers/equals.rb
[debug]: Parsing lib/mocha/parameter_matchers/has_key.rb
[debug]: Parsing lib/mocha/parameter_matchers/kind_of.rb
[debug]: Parsing lib/mocha/parameter_matchers/anything.rb
[debug]: Parsing lib/mocha/parameter_matchers/has_keys.rb
[debug]: Parsing lib/mocha/parameter_matchers/includes.rb
[debug]: Parsing lib/mocha/parameter_matchers/has_entry.rb
[debug]: Parsing lib/mocha/parameter_matchers/has_value.rb
[debug]: Parsing lib/mocha/parameter_matchers/optionally.rb
[debug]: Parsing lib/mocha/parameter_matchers/has_entries.rb
[debug]: Parsing lib/mocha/parameter_matchers/instance_of.rb
[debug]: Parsing lib/mocha/parameter_matchers/responds_with.rb
[debug]: Parsing lib/mocha/parameter_matchers/any_parameters.rb
[debug]: Parsing lib/mocha/parameter_matchers/equivalent_uri.rb
[debug]: Parsing lib/mocha/parameter_matchers/regexp_matches.rb
[debug]: Parsing lib/mocha/parameter_matchers/yaml_equivalent.rb
[debug]: Parsing lib/mocha/parameter_matchers/instance_methods.rb
[debug]: Parsing lib/mocha/parameter_matchers/positional_or_keyword_hash.rb
[debug]: Parsing lib/mocha/state_machine.rb
[debug]: Parsing lib/mocha/sequence.rb
[debug]: Parsing lib/mocha/configuration.rb
[debug]: Parsing lib/mocha/expectation_error_factory.rb
[debug]: Parsing lib/mocha/expectation_error.rb
[debug]: Parsing lib/mocha/stubbing_error.rb
[debug]: Parsing lib/mocha/integration/test_unit/adapter.rb
[debug]: Parsing lib/mocha/integration/mini_test/adapter.rb
[debug]: Serializing to .yardoc/objects/root.dat
[debug]: Re-generating object ...
[debug]: Re-generating object Mocha...
[debug]: Re-generating object Mocha::API...
[debug]: Re-generating object Mocha::Hooks...
[debug]: Re-generating object Mocha::ObjectMethods...
[debug]: Re-generating object Mocha::ClassMethods...
[debug]: Re-generating object Mocha::ParameterMatchers...
[debug]: Re-generating object Mocha::Integration...
[debug]: Re-generating object Mocha::Integration::TestUnit...
[debug]: Re-generating object Mocha::Integration::TestUnit::Adapter...
[debug]: Re-generating object Mocha::Integration::MiniTest...
[debug]: Re-generating object Mocha::Integration::MiniTest::Adapter...
[debug]: Re-generating object Mocha::Mock...
[debug]: Re-generating object Mocha::Expectation...
[debug]: Re-generating object Mocha::ParameterMatchers::Not...
[debug]: Re-generating object Mocha::ParameterMatchers::Base...
[debug]: Re-generating object Mocha::ParameterMatchers::IsA...
[debug]: Re-generating object Mocha::ParameterMatchers::AllOf...
[debug]: Re-generating object Mocha::ParameterMatchers::AnyOf...
[debug]: Re-generating object Mocha::ParameterMatchers::Equals...
[debug]: Re-generating object Mocha::ParameterMatchers::HasKey...
[debug]: Re-generating object Mocha::ParameterMatchers::KindOf...
[debug]: Re-generating object Mocha::ParameterMatchers::Anything...
[debug]: Re-generating object Mocha::ParameterMatchers::HasKeys...
[debug]: Re-generating object Mocha::ParameterMatchers::Includes...
[debug]: Re-generating object Mocha::ParameterMatchers::HasEntry...
[debug]: Re-generating object Mocha::ParameterMatchers::HasValue...
[debug]: Re-generating object Mocha::ParameterMatchers::Optionally...
[debug]: Re-generating object Mocha::ParameterMatchers::HasEntries...
[debug]: Re-generating object Mocha::ParameterMatchers::InstanceOf...
[debug]: Re-generating object Mocha::ParameterMatchers::RespondsWith...
[debug]: Re-generating object Mocha::ParameterMatchers::AnyParameters...
[debug]: Re-generating object Mocha::ParameterMatchers::EquivalentUri...
[debug]: Re-generating object Mocha::ParameterMatchers::RegexpMatches...
[debug]: Re-generating object Mocha::ParameterMatchers::YamlEquivalent...
[debug]: Re-generating object Mocha::StateMachine...
[debug]: Re-generating object Mocha::StateMachine::StatePredicate...
[debug]: Re-generating object Mocha::StateMachine::State...
[debug]: Re-generating object Mocha::Sequence...
[debug]: Re-generating object Mocha::Configuration...
[debug]: Re-generating object Mocha::ExpectationErrorFactory...
[debug]: Re-generating object Mocha::ExpectationError...
[debug]: Re-generating object Mocha::StubbingError...
rake aborted!
ArgumentError: No such template for default/fulldoc/html
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/yard-0.9.29/lib/yard/templates/engine.rb:42:in `template'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/yard-0.9.29/lib/yard/templates/engine.rb:105:in `generate'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/yard-0.9.29/lib/yard/cli/yardoc.rb:357:in `run_generate'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/yard-0.9.29/lib/yard/cli/yardoc.rb:267:in `run'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/yard-0.9.29/lib/yard/rake/yardoc_task.rb:74:in `block in define'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
.../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
.../ruby/3.2.0/bin/rake:25:in `load'
.../ruby/3.2.0/bin/rake:25:in `<main>'
Tasks: TOP => yardoc

Expected Output

I expect the docs to be generated successfully without any exceptions.

Environment details:

  • OS: MacOS v13.3 and Linux Ubuntu v20.04.5
  • Ruby version (ruby -v): v2.7.6 (ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]) & v3.2.0 (ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22])
  • YARD version (yard -v): yard 0.9.29
  • Relevant software dependency/versions:
    • N/A

I have read the Contributing Guide.

@lsegal
Copy link
Owner

lsegal commented Apr 9, 2023

Thanks for notifying. This has been corrected and a new version (0.9.30) is being pushed right now.

@floehopper
Copy link
Author

Thank you!

@lsegal
Copy link
Owner

lsegal commented Apr 9, 2023

floehopper added a commit to freerange/mocha that referenced this issue Apr 9, 2023
This reverts commit 12f1eef.

The problem I reported in lsegal/yard#1490 was fixed in this commit [1]
and released in v0.9.30. That means we no longer need to pin the version
of yard.

Fixes #609.

[1]: lsegal/yard@7d05c7f
floehopper added a commit to freerange/mocha that referenced this issue Apr 9, 2023
This reverts commit 12f1eef.

The problem I reported in lsegal/yard#1490 was fixed in this commit [1]
and released in v0.9.31. That means we no longer need to pin the version
of yard.

Fixes #609.

[1]: lsegal/yard@7d05c7f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants