sfcgeorge / yard-contracts

YARD Plugin for Automatic Param Docs from Contracts.
MIT License
26 stars 3 forks source link

Unable to run yardoc #1

Closed waterlink closed 9 years ago

waterlink commented 9 years ago

Installed plugin through Gemfile:

gem "yard-contracts", github: "sfcgeorge/yard-contracts"

When I run it, I get:

➜  ar_left_over_guardian git:(master) ✗ bundle exec yardoc --plugin contracts                                                                                                                                                  
[warn]: Error loading plugin 'yard-contracts'
Files:           3
Modules:         2 (    2 undocumented)
Classes:         2 (    2 undocumented)
Constants:       2 (    2 undocumented)
Methods:         3 (    1 undocumented)
 22.22% documented
waterlink commented 9 years ago

I think I know why. I forgot that I need to be on last contracts.ruby master

waterlink commented 9 years ago

Yep, just works :)

sfcgeorge commented 9 years ago

YARD gives really unhelpful (no) errors and --backtrack and --debug do nothing here. I spent an hour trying to get it to work, correct versions of gems, ruby, etc. Glad you got it sorted :)

On 26 Mar 2015, at 01:41, Alexey Fedorov notifications@github.com wrote:

Installed plugin through Gemfile:

gem "yard-contracts", github: "sfcgeorge/yard-contracts" When I run it, I get:

➜ ar_left_over_guardian git:(master) ✗ bundle exec yardoc --plugin contracts
[warn]: Error loading plugin 'yard-contracts' Files: 3 Modules: 2 ( 2 undocumented) Classes: 2 ( 2 undocumented) Constants: 2 ( 2 undocumented) Methods: 3 ( 1 undocumented) 22.22% documented — Reply to this email directly or view it on GitHub.

waterlink commented 9 years ago

The easiest way to get the real error, is to use -e path/to/lib/yard/extension.rb. Because it renders the errors that happened.

waterlink commented 9 years ago

In my case it was cannot load such file: contracts/formatters

sfcgeorge commented 9 years ago

Ah thanks you for pointing out that the -e flag shows errors, I'm sure that will be useful.

contracts/formatters isn't really needed currently as I copied it over and modified, but I left the require assuming those will get merged back into Contracts.