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

Add support for Swift Package Manager. #72

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Add support for Swift Package Manager. #72

merged 2 commits into from
Aug 23, 2022

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Aug 17, 2022

This PR adds the following:

  • Package.swift for SwiftPM support
  • Copies base_types/swift into types/swift after stub generation to have a single path for all Swift files.
  • Adds a GitHub action that will build the files for Swift on every PR or push to main (#40).

@pixlwave pixlwave marked this pull request as ready for review August 17, 2022 16:32
@pixlwave pixlwave requested a review from a team as a code owner August 17, 2022 16:32
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Comment on lines +21 to +27
- name: Install Swift
uses: slashmo/[email protected]
with:
version: 5.6

- name: Build for Swift
run: swift build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👏

@@ -0,0 +1,36 @@
//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we delete the original one from base_types or would that break Element? Might be worth importing the swift package into Element too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the main issue here is that the stub generator deletes types/swift before generating the latest types. So for now it will need to be a copy each time. And yep, we definitely should migrate to the package for EI as we'll be able to specify a version instead of a commit on the release/swift branch.

@bmarty
Copy link
Collaborator

bmarty commented Aug 18, 2022

image

Nice!

Copy link

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, looks good to me ✅

@@ -0,0 +1,36 @@
//
// Copyright 2021 New Vector Ltd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright year is incorrect, but that links to #68

Copy link
Member Author

@pixlwave pixlwave Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a note in that issue about handling base_types 👍

@pixlwave pixlwave merged commit 4f27bc0 into main Aug 23, 2022
@pixlwave pixlwave deleted the doug/swiftpm branch August 23, 2022 09:42
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

Successfully merging this pull request may close these issues.

4 participants