-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nim doc ..
compiler crash (regression 0.19.6 => 1.0)
#14474
Comments
So the regression happened between 19.6 and 1.0. Also, the problem disappears with #14439 but for the following reason: it ignores the doc comment because it appears after The question is whether doc comments after proc body should be docgen'd: proc fn*() = discard
## foo
proc fn2*(): int = 12
## foo I actually think it indeed should but that it wasn't supposed to work, even though apparently it does |
Sorry, I just fixed the minimal example to reflect a valid doc string case. The crash can still be reproduced on nim 1.2.0, nim devel and also with #14439.
Nah, I wouldn't worry about that.. that's a different rabbit hole :) |
IMO nim doc should not error for unsupported or invalid doc comments, but instead use best effort and output a warning (with sufficient debugging context) when it can't handle a doc comment, and then move on to next doc comment. There could be many more such instances. Best effort is TBD but simplest is to stop on 1st invalid character, replace that doc comment with a string (eg: nimdoc:unrecognized:foo.nim:12:24) and continue with other doc comments |
nim doc ..
compiler crashnim doc ..
compiler crash (regression 0.19.6 => 1.0)
Today, while running
nim doc ..
on a nimterop generated file, I saw this crash.Example
Current Output
Expected Output
No crash
Workaround
I can prevent the crash if I alter the nimterop-generated files, by removing the
*******..
lines:Additional Information
FYI @genotrance @jyapayne .. above dummy code is a minimal example from a real project where I used nimterop v0.5.7.
The text was updated successfully, but these errors were encountered: