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

No comment #32

Closed
wants to merge 3 commits into from
Closed

No comment #32

wants to merge 3 commits into from

Conversation

rjbou
Copy link
Contributor

@rjbou rjbou commented Nov 17, 2020

Add OpamPrinter.FullPos.without_comments and its associate OpamPrinter.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 into opam-format.
To rebase after #31 merged

Comment on lines 805 to 808
|> split_on_chars [ '\n'; '\r' ]
|> List.map empty_end
|> List.filter (fun x -> x != "")
|> String.concat "\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @dra27 for crlf

Copy link
Member

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.

@rjbou
Copy link
Contributor Author

rjbou commented Nov 27, 2020

ping @kit-ty-kate & @NathanReb for basic test?

@rjbou rjbou added this to the 2.1.2 milestone Nov 27, 2020
src/opamPrinter.ml Outdated Show resolved Hide resolved
@dra27
Copy link
Member

dra27 commented Dec 17, 2020

Does this definitely need to be in 2.1.2, just in terms of getting it released very soon?

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
@rjbou
Copy link
Contributor Author

rjbou commented Dec 17, 2020

No need, no. It can be in next release.

@dra27 dra27 modified the milestones: 2.1.2, 2.1.3 Jan 7, 2021
@dra27
Copy link
Member

dra27 commented Apr 23, 2021

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.

@dra27 dra27 closed this Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants