cmark icon indicating copy to clipboard operation
cmark copied to clipboard

New constant for breaking changes in libcmark 0.29.0

Open anthonyryan1 opened this issue 6 years ago • 10 comments

Safe is now enabled by default and a no-op, which will probably come as a surprise to some people upgrading. People wanting the old default behavior will need to use the new Unsafe constant.

I'm not sure if we'll want to deprecate the Safe constant over a couple years or just leave it since it's a no-op.

anthonyryan1 avatar Aug 08 '19 19:08 anthonyryan1

Pull Request Test Coverage Report for Build 535

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 96.008%

Totals Coverage Status
Change from base Build 243: -0.2%
Covered Lines: 1900
Relevant Lines: 1979

💛 - Coveralls

coveralls avatar Aug 08 '19 19:08 coveralls

There are three other constants that have been added to libcmark besides Unsafe: CMARK_OPT_NORMALIZE, CMARK_OPT_VALIDATE_UTF8 and CMARK_OPT_SMART. Is there any value in including these constants as well?

dwo0 avatar Aug 08 '19 19:08 dwo0

@anthonyryan1 thanks ... I think we ought to treat constants the same as upstream, so a no-op is fine.

@dwo0 adding those seems reasonable, right ?

krakjoe avatar Aug 09 '19 06:08 krakjoe

Does raising minimal supported library version really make sense ?

remicollet avatar Aug 09 '19 07:08 remicollet

@remicollet I'm not sure actually, did any distros bump, what do you think ?

krakjoe avatar Aug 09 '19 07:08 krakjoe

@krakjoe Fedora have 0.28.3 https://rpms.remirepo.net/rpmphp/zoom.php?rpm=cmark

remicollet avatar Aug 09 '19 07:08 remicollet

@anthonyryan1 I think the only thing we can reasonably do here is register the constant for versions that support it, and carry the breaking change ... it's awkward, but < 1.0, so kinda expected ...

krakjoe avatar Aug 09 '19 09:08 krakjoe

One year later.

I've updated this pull request based on the feedback above.

  • I have added the other missing render options.
  • Instead of bumping the library requirement, we're going to pass through the new constant if it's exposed (aka, built against libcmark 0.29.0)

Feedback welcome!

anthonyryan1 avatar Aug 23 '20 22:08 anthonyryan1

I like it.

dwo0 avatar Aug 24 '20 17:08 dwo0

@anthonyryan1, actually, you may have an error on line 154. CMARK_OPT_SMART should be CMARK_OPT_VALIDATE_UTF8.

dwo0 avatar Aug 24 '20 18:08 dwo0