swift-markdown-ui icon indicating copy to clipboard operation
swift-markdown-ui copied to clipboard

Make cmark-gfm as dependency package

Open nbmisen opened this issue 1 year ago • 4 comments

My project uses github.com/apple/swift-markdown's SPM as a dependency, and swift-markdown uses https://github.com/apple/swift-cmark as a dependency. When I also use swift-markdown-ui as a dependency, Xcode indicates a conflict with cmark-gfm. Therefore, is it possible to use cmark-gfm as a dependency rather than as source in the code?

Conflict report:multiple targets named 'cmark-gfm' in: 'swift-cmark', 'swift-markdown-ui'

nbmisen avatar Mar 18 '24 13:03 nbmisen

I have the same issue. What's the recommendation?

andreivladmatei avatar Mar 23 '24 13:03 andreivladmatei

Same issue. Is this repository still active ?

zhang-hongshen avatar Apr 10 '24 09:04 zhang-hongshen

Hey folks, Sorry for the late response. Unfortunately, apple/swift-cmark is not using semantic versioning, so is not possible make a flexible version requirement.

For instance, this doesn't work:

dependencies: [
  .package(url: "https://github.com/apple/swift-cmark", "swift-4.2-RELEASE"..<"swift-5.10-RELEASE")
]

Additionally, apple/swift-markdown depends on the gfm branch, instead of an specific version:

https://github.com/apple/swift-markdown/blob/907674c2ae2d24c32fba50101821b1a7fdd291e2/Package.swift#L48

I will be happy to use apple/swift-cmark if it were possible to have a flexible requirement on the version. I am open to any ideas.

Thanks!

gonzalezreal avatar Apr 11 '24 07:04 gonzalezreal

Hey everyone, I had the same issue a few months ago and created a fork which uses apple/swift-markdown. Initially I've planned to open a PR here but since I had limited time and needed to remove a few methods from the public API (might be due to lack of knowledge), I've restrained from doing so. Maybe it is of some help to anyone. If this is interesting to you @gonzalezreal, I can open a PR. Here's the branch: https://github.com/lovetodream/swift-markdown-ui/tree/feature/swift-markdown-refactor

lovetodream avatar May 07 '24 07:05 lovetodream

Having the same issue. Has there been a solution for this yet?

BelDaw avatar Sep 19 '24 21:09 BelDaw

Having the same issue. Has there been a solution for this yet?

I ended up using @lovetodream branch which WFM.

hyperlink avatar Sep 20 '24 14:09 hyperlink