You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/lib/ruby/gems/3.1.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:41:in `read_source': asciidoctor: FAILED: /foo.adoc: Failed to load AsciiDoc document - no implicit conversion of String into Integer (TypeError)
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:145:in `get_source'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:210:in `process'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:662:in `[]'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:662:in `next_block'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:397:in `next_section'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:382:in `next_section'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:382:in `next_section'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:382:in `next_section'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/parser.rb:97:in `parse'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/document.rb:538:in `parse'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/load.rb:84:in `load'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/convert.rb:78:in `convert'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/convert.rb:190:in `block in convert_file'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/convert.rb:190:in `open'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/convert.rb:190:in `convert_file'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/cli/invoker.rb:129:in `block in invoke!'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/cli/invoker.rb:112:in `each'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.18/lib/asciidoctor/cli/invoker.rb:112:in `invoke!'
from /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-pdf-2.3.7/bin/asciidoctor-pdf:46:in `<top (required)>'
from /usr/bin/asciidoctor-pdf:25:in `load'
from /usr/bin/asciidoctor-pdf:25:in `<main>'
The text was updated successfully, but these errors were encountered:
Yes, this is unfortunate. I think I need to do some more validation. I also don't really know how an asciidoctor plugin is supposed to nicely report errors.
For some things I had to dive into he asciidoctor source to figure out what was going on, which can be quite fun when the method you are looking for is being dynamically generated at runtime and there's therefore nothing you can even grep for. Ruby is interesting 😄
For some things I had to dive into he asciidoctor source to figure out what was going on, which can be quite fun when the method you are looking for is being dynamically generated at runtime and there's therefore nothing you can even grep for. Ruby is interesting
Ouch yes. Maximum respect for powering through! I was also looking at some Ruby code recently (Gitlab) and ran into the exact same issue. There are some identifiers that are simply not defined anywhere. They must be dynamically generated but I eventually gave up looking.
Unfortunate that Asciidoctor is written in a dynamically typed language. If you make a typo like this:
You get this helpful error:
The text was updated successfully, but these errors were encountered: