-
Notifications
You must be signed in to change notification settings - Fork 193
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
HTMLFormatter Dependency issue #199
Comments
@mynona have you tried forking this repo and depending on the fork instead? |
Hi @MahdiBM , this did not work because swift-markdown itself depends on a "non-stable" version according to SPM
I didn't experience this issue in the past. Maybe this is connected to XCode 16 I did more research and found out that you cannot have from: on one level and then a dependency on a branch on another level. Example: You have a repository with a release tag "1.0.0". When you create the dependeny to this repo than all dependencies in each repo you refer to must also be based on release tags. All the way back from repo to repo. Either you reference only branches and commits (branch: revision:) or you referency only release tags (from:). Example: some-repo.git from: "1.0.0" -> "swift-markdown.git" from: "x.x.x" -> cmark from: "x.x.x" (only FROM references) But SPM fails when you mix FROM & BRANCH/REVISION dependency references across repos. It's a really weird behavior and I am 100% sure that this worked in the past prior to XCode 16 Anyway, it would be best if a release could be done for swift-markdown instead of referencing the main branch or a specific commit. |
Thank you for testing the HTML Formatter! Swift-Markdown releases version tags based on releases of Swift itself. When a major or minor release of Swift is finalized, we tag the corresponding If you want to test the HTML Formatter before that happens, you need to depend on branch or commit versions for the entire dependency line that leads to Swift-Markdown. You cannot depend on a tagged version that itself depends on a branch or commit; that is part of the entire design of Swift Package Manager. |
I guess 6.0 will anyway be released soon and this problem will be solved :-) |
6.0 will not have this change, as the formatter was not cherry-picked into |
@QuietMisdreavus I wonder if a pre-release would be possible? Will that even solve this problem?! I understand that this is more like a SwiftPM issue, but would be nice if libraries could be understanding of the situation. (well, even if it's a "feature", I still see it as an "issue". From a user's POV, I expect SwiftPM to just allow me to use different versions etc..., perhaps with some warnings about my bad usage, but nothing more) |
Related - #178 |
Unfortunately, the great enhancement by @QuietMisdreavus has just been merged to "main" but not released.
When I use this feature in a library with SPM:
(Regardless if I use revision to point to the commit or branch)
and import it as dependency to another project then SPM fails with the following error message as it doesn't accept branch or revision as a stable version.
@QuietMisdreavus
Could you please be so kind and release this enhancement with a release version number?
Or in case, there is a work-around for SPM maybe you can support me how to reference to the commit or branch as dependency. The issue only appears when pointing to another package that has the dependency (2 level). If you import it directly to one feature it works with revision and branch. Unfortunately, SPM, will also not accept revision or branch if you try to import it in all features.
Additionally I found a small bug: added it here as it is related to the newline issue
#197
The text was updated successfully, but these errors were encountered: