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

Compatibility with yard broken since commonmarker 1.x #348

Closed
noraj opened this issue Jan 26, 2025 · 3 comments
Closed

Compatibility with yard broken since commonmarker 1.x #348

noraj opened this issue Jan 26, 2025 · 3 comments

Comments

@noraj
Copy link
Contributor

noraj commented Jan 26, 2025

commonmarker 1.0.0 introduced breakings changes killing yard compatibility (lsegal/yard#1528):

  • class name CommonMarker -> Commonmarker
  • .render_html(<Array<Symbol>) -> .to_html(<Hash>)

The discussion mainly occurred on the PR that tries to fix it on yard side:

lsegal/yard#1540

Could you help to fix the issue, either on yard side or releasing a new version that add a retrocompatibility layer?

@gjtorikian
Copy link
Owner

Well, I’m probably not going to add a compatibility layer. I don’t really want to maintain multiple versions of my own code.

I’m also not sure why YARD can’t just use a more recent version of the library? I think a comparability layer could be YARD’s responsibility. They can load their own lib/common_marker.rb which just calls the 1.0 code; meaning, downstream consumers can keep writing CommonMarker even if it loads Commonmarker behind the scenes. Would that work?

@noraj
Copy link
Contributor Author

noraj commented Jan 26, 2025

@gjtorikian Could you comment on lsegal/yard#1540 where yard owner and PR author were debating the technical issues? What I understand is that yard owner don't want to introduce a breaking change for an optional feature (commonmarker markup support) while it's difficult to support commonmarker 0.x and 1.x (and 2.x) at the same time. If you can give pointers to the PR author on how to support both versions at the same time, this would be awesome.

@gjtorikian
Copy link
Owner

I will do that. I’ll take a look at the PR this week!

Going to close this as it’s not specific to this project, but it would be very awesome indeed for YARD to incorporate the newer updates.

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

No branches or pull requests

2 participants