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
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:
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?
In any case, I can confirm that all comments are still stored in the cmt_comments field.
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).