-
Notifications
You must be signed in to change notification settings - Fork 24
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
No comment #32
No comment #32
Conversation
src/opamPrinter.ml
Outdated
|> split_on_chars [ '\n'; '\r' ] | ||
|> List.map empty_end | ||
|> List.filter (fun x -> x != "") | ||
|> String.concat "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @dra27 for crlf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's no worse than the rest of the library does - we'll sort this out with #11's rebase for opam 2.2.
ping @kit-ty-kate & @NathanReb for basic test? |
…moves trailing newlines
Does this definitely need to be in 2.1.2, just in terms of getting it released very soon? |
No need, no. It can be in next release. |
From dev meeting: this change won't go in opam-file-format; it might go either in opam-format itself or in an intermediate library. For dune-release, for now the workaround will simply be to strip comments on line 1 manually. |
Add
OpamPrinter.FullPos.without_comments
and its associateOpamPrinter.FullPos.write_without_comment
that removes all comments from an opamfile, and trailing newlines.cf. ocaml/opam#4302 (comment)
As it is low-level, It's implemented in
opam-file-format
, but it can be easily moved intoopam-format
.To rebase after #31 merged