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
please provide location info for warnings #5901
Comments
Comment author: @gasche I'm marking this as a "junior job" because this is non-critic code that can be improved easily. But this would still require pervasives changes to the ocamldoc codebase (to have location information flowing to the places that throw warnings), so it should not be considered easy either. |
Comment author: junsli Hello, what's the plan on this bug? I'd like to fix it. |
Comment author: @gasche junsli: please feel free to go ahead. Where you asking about particular directions of where to go in the source? (I don't know, but I would just grep fragments of the text of the warning above, to find where those warnings are emitted.) |
Comment author: junsli Hi gasche, Thanks. I meant the target plan, but I guess it does not matter. I'll work on this anyway. |
Comment author: junsli Some updates: A good starting point of propagating location information from parser upwards is odoc_parser.main, instead of returning string of description and remaining text, location info should also be returned. It is still unclear why odoc_lexer (and odoc_text_lexer) maintains line_number (and char_number) instead of using the line information in lexbuf. |
Comment author: junsli I'll stop working on this bug. ocamldoc has a few places extracting strings Here is what I got for someone who wants to hack this bug in the future.
type loc_str = { str : string; start_p : Lexing.position; } (i.e. add a start position for the string)
and let the type system lead the change.
Note: Location.t contains location information for comments in interface and |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 5901
Reporter: Hendrik Tews
Assigned to: @zoggy
Status: assigned (set by Hendrik Tews on 2013-01-22T21:41:55Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.00.1
Category: ocamldoc
Tags: junior_job
Duplicate of: #8401
Related to: #7084 #7187
Monitored by: junsli @hcarty
Bug description
Hi,
ocamldoc outputs several types of warnings without an information about the point in the source that triggered the warning. For instance
Warning: Element some_xref not found
It's quite time consuming to find the point in the source that triggered this warning.
Bye,
Hendrik
The text was updated successfully, but these errors were encountered: