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
ocamldoc comments no longer in the cmt_comments field of .cmt files #6972
Comments
Comment author: @gasche I suspect that this is an unintended change (I would expect all comments to be stored in this field). Unfortunately it's probably too late to fix this regression in a 4.02.x release. |
Comment author: @lpw25 I cannot reproduce the problem. Could you give more details about what differences you are seeing? |
Comment author: @trefis The only difference I could notice between 4.02.1 and >=4.02.2 is that before 4.02.2 an ocamldoc comment would be stored with a leading star, whereas now you don't have that star anymore (since '(**' is now handled specially). If you tool relied on that, maybe that explains the breakage? |
Comment author: @oandrieu Ooh right, indeed it's the missing leading star that broke my tool. I had then a quick look at the patch, misread it and thought the comments were gone from cmt_comments. sorry about that. |
Comment author: @alainfrisch I'm not sure about the resolution status. If the source code contains a comment (** ... *), shouldn't the leading star be reflected in the cmt_comments field? |
Comment author: @lpw25
I had thought not, but I guess there is no other way to distinguish special and regular comments in that field. |
Comment author: @alainfrisch My question was rather rhetorical. Since comments are delimited by (...), it seems pretty clear that the "payload" of (*FOO) is "*FOO". The fact that ocamldoc-like comments are recognized in a special way and passed through attribute is an addition, it should not break existing tools that rely on finding "*FOO" in the cmt files (esp. when the new -keep-docs is not used). |
Original bug ID: 6972
Reporter: @oandrieu
Assigned to: @lpw25
Status: closed (set by @xavierleroy on 2017-02-16T14:14:38Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.2
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @jmeber
Bug description
Since the store-ocamldoc-comments-as-attributes-in-the-AST change in 4.02.2, the cmt_comments part of .cmt files only contains non-ocamldoc comments. This broke my program that was looking for ocamldoc comments there.
I'm not sure this was intended, just reporting this in case it was an oversight.
The text was updated successfully, but these errors were encountered: