jmcnamara / libxlsxwriter

A C library for creating Excel XLSX files.
https://libxlsxwriter.github.io
Other
1.49k stars 332 forks source link

Add SPM Support #369

Closed mariohahn closed 2 years ago

mariohahn commented 2 years ago

In addition to Cocopods it would be great to also support Swift Package Manager.

Thx for the lib. 🎸

https://github.com/jmcnamara/libxlsxwriter/issues/325

jmcnamara commented 2 years ago

There is already a Swift package for libxlsxwriter: https://swiftpackageregistry.com/damuellen/xlsxwriter.swift

jmcnamara commented 2 years ago

@mariohahn Is the linked package sufficient. Can this request be closed?

jmcnamara commented 2 years ago

Closing.

willm132 commented 2 years ago

There is already a Swift package for libxlsxwriter: https://swiftpackageregistry.com/damuellen/xlsxwriter.swift

This does not work or compile so that is not sufficient

jmcnamara commented 2 years ago

@willm132 You need to take that up with the Swift Package maintainer. There isn't anything I can do about it.

orchetect commented 3 months ago

Just FYI: the release tags for the repo are not compatible with SPM. Which greatly limits the ability to use the library as a Swift package. SPM looks for SemVer tags (ie: "1.1.7"), so it won't understand "RELEASE_1.1.7"

This is causing showstopping issues in an open-source project I'm working on. The only current solution is to fork the repo and re-tag which is not really sustainable.

If the library is used as a dependency in an app then it may be possible to just use main branch or a specific tag. But It cannot be used as a dependency within another Swift package because Xcode will not compile, citing an unstable dependency.

The easiest resolution would be to tag the repo as SemVer instead of "RELEASE_x.x.x". If that's not viable, then tagging the repo twice would work fine, one tag as SemVer and the other as "RELEASE_x.x.x".

jmcnamara commented 3 months ago

SPM looks for SemVer tags (ie: "1.1.7"), so it won't understand "RELEASE_1.1.7"

Does it have to be "1.1.7" or can it be "v1.1.7".

orchetect commented 3 months ago

Does it have to be "1.1.7" or can it be "v1.1.7".

Ideally "1.1.7", but "v1.1.7" is also recognized.