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

SwiftPM archiving hotfix #185

Merged
merged 15 commits into from
Mar 12, 2021

Conversation

kylewludwig
Copy link
Contributor

@kylewludwig kylewludwig commented Feb 23, 2021

Hotfix in response to an issue with archiving projects using the MAVSDK-Swift SwiftPM dependency remotely. This fix has only been tested with a local SwiftPM import; I will need to test a remote import from this fork.

  • Rename MAVSDK_Swift import to Mavsdk and include MavsdkServer.swift.
  • Create separate MavsdkServer import for the mavsdk_server binary target import to fix archiving issues. NOTE Currently, a Libary in Package.swift can support multiple .target or one .binaryTarget.
  • Bash scripts in tools still need to be tested and fixed due to path changes. This may be a good time to bump from v0.35 to v0.36, too.

…included, add MavsdkServer library for mavsdk_server.xcframework binaryTarget import to fix archiving issue, update Package.swift usages and naming
@@ -21,7 +25,7 @@ let package = Package(
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0"),
],
targets: [
.target(name: "MAVSDK-Swift",
.target(name: "Mavsdk",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this target now depend on mavsdk_server? Could it be the reason why the build fails in CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just added it to try it but there may be an issue with binary targets as dependencies in other targets. We may have to create a separate Swift Package just for the binary dependency in another GitHub repo.

Copy link
Contributor Author

@kylewludwig kylewludwig Mar 7, 2021

Choose a reason for hiding this comment

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

Once a release is tagged on MAVSDK-XCFramework for v0.37.0 this should be ready to merge. It should be tested with the MAVSDK-Swift-Example by adding my fork as a Swift Package dependency referencing branch swiftpm-archiving-hotfix.

@kylewludwig
Copy link
Contributor Author

@JonasVautherin The scripts to generate the protos and docs are failing, can you take a look?

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Tested to work (could archive) with the MAVSDK-Swift-Example!

Thanks a lot! 🚀

@JonasVautherin JonasVautherin merged commit fa54b0a into mavlink:master Mar 12, 2021
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.

2 participants