Skip to content
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

Bug: comment changed /doc-comment dropped (mli) #2641

Open
mbarbin opened this issue Jan 5, 2025 · 2 comments
Open

Bug: comment changed /doc-comment dropped (mli) #2641

mbarbin opened this issue Jan 5, 2025 · 2 comments

Comments

@mbarbin
Copy link
Contributor

mbarbin commented Jan 5, 2025

Describe the bug

ocamlformat: Cannot process "lib/miou_vector.mli".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: comment changed.
File "_none_", line 1:
Error: doc-comment (**  similar to [top], but with an option instead of an exception  *) dropped.

How to Reproduce
Steps to reproduce the behavior:

  • What is the formatted file? Please try to minimize the code snippet.
    The comment in question is in the file miou_vector.mli. e.g. at revision 01b75212e595d154a0f24387e0fdde8cf86254f2 permalink

To note, this file has a directive at the top of the file to disable ocamlformat:

[@@@ocamlformat "disable"]
...
val top_opt: 'a t -> 'a option
(** similar to [top], but with an option instead of an exception *)
  • What are the selected options?

As specified by the project in .ocamlformat file.

Additional notes

  • This may be a dup of Bug: comment changed / doc-comment dropped #2585 , however this is in a mli file. Tracking as new issue, you can decide whether to close this one.
  • Listing the file in a local .ocamlformat-ignore file resolve the issue, as an immediate work around.
  • Tried both with ocamlformat 0.26.2 and 0.27.0 - both display the same issue.
@Julow
Copy link
Collaborator

Julow commented Jan 7, 2025

Thanks for this extremely well written issue :) This might be related to #2587

@mbarbin
Copy link
Contributor Author

mbarbin commented Jan 7, 2025

Hey @Julow very nice hearing from you! Thank you for looking into this issue.

Regarding its phrasing, credit goes back to the team that created the issue template, as I naively followed it as if I was filling out a form. Very pleasing experience! Thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants