flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
197 stars 107 forks source link

Add Swift Package Manager (SPM) support #395

Closed david-swift closed 9 months ago

david-swift commented 9 months ago

Hi!

This PR adds support for SPM (e.g. useful in combination with the Swift 5 SDK Extension). It contains a script for generating the necessary files, a README and a sample Swift package.

david-swift commented 9 months ago

Thanks for the contribution, Swift support would be great!

Are you going to commit to maintaining this here? As-in, is it OK to set you as a codeowner so new issues are assigned to you.

@TingPing Yes, that's ok. Thanks for the review!

hfiguiere commented 9 months ago

My biggest issue here is that the tool is in Swift. Nothing against Swift but it makes it more difficult to run and to maintain when everything else is in Python.

david-swift commented 9 months ago

My biggest issue here is that the tool is in Swift. Nothing against Swift but it makes it more difficult to run and to maintain when everything else is in Python.

Rewriting in Python wouldn't be too difficult, but the generation itself relies on Swift being installed. Isn't the idea that the app maintainers run those tools themselves? Installing Swift in a GitHub action for example is really simple, and people using this tool probably have Swift installed on their machine. Or do I misunderstand something, @hfiguiere?

TingPing commented 9 months ago

I do agree being in Python would be a little easier to maintain and use.

However I'm fine merging this as-is. You're putting in the work and if Swift works best for you then that's fine.

hfiguiere commented 9 months ago

fine by me too. I just wanted to note the caveats