Open noraj opened 8 months ago
Weird, I pushed this .yardopts
file https://github.com/IDLFAC/CyberMots-ILC/blob/a16e3a4f4df91c3a1d4d4e883f873cc616a10034/.yardopts that makes yard crash locally with ruby 3.2.2 and yard 0.9.34 but I gave my github repository to rubydoc.info https://www.rubydoc.info/github/IDLFAC/CyberMots-ILC/ and it successfully built it with the same version Generated on Sun Nov 5 19:25:34 2023 by [yard](http://yardoc.org/) 0.9.34 (ruby-3.2.2).
.
Is yard info using a special / patched version of yard? A different configuration? Using last commit from master and not the release? It must take my .yardopts
file into consideration because for the gem when there was no .yardopts the documentation was blank https://www.rubydoc.info/gems/cybermots because the library folder is non standard.
.yardopts
refuses filenames containing non-ASCII charactersSteps to reproduce
Taking the following file:
Name it
testé.rb
and runyard doc testé.rb --no-yardopts
: everything is fine.Now create a file named
.yardopts
with the following contentIt gives the following error (see Actual Output).
Actual Output
Expected Output
No error.
Environment details:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
yard 0.9.34
(Un)related issues
All issues I found for that error are from Ruby 1.9.3 from 2013. But since Ruby 2.0 there is no need to provide an encoding comment to specify the source encoding. Generally there is no issue with encoding with yard even if my files are full of non-ASCII characters in the comments, content and file names. There only issue is when the file name contains non-ASCII chars in
.yardopts
.Debug
This where yard seems to crash
https://github.com/lsegal/yard/blob/2d197a381c5d4cc5c55b2c60fff992b31c986361/lib/yard/logging.rb#L104
However, running
print("\e[2K\e[?25l\e[1mtesté\e[0m\r")
does not seem to crash.