fix: remove swiftsettings from binarytarget #121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #120.
Notes to the reviewers
This fixes the reason for the error in #120.
I can follow up in an additional PR how to re-fix not showing the warnings that this code will re-introduce by removing
suppress-warnings
from.binaryTarget
, but this PR's main goal is the fix the issue where a user can not use ldk-swift in their Xcode project, which was because ofsuppress-warnings
in.binaryTarget
. Here is the warnings showing up:Other Thoughts
Why did this error show in
.117
but not.116
? This question still bugs me because I would like to have seen a specific changelog from Apple relating to this. From documentation I researched though, in the Swift Package ManagerswiftSettings
is a parameter that is specific to.target
instances. From what I read binary targets don't have source files that need to be compiled, so they don't seem to have aswiftSettings
parameter; so I'm guessing theswiftSettings
parameter isn't supposed to be used with.binaryTarget
it seems as per the design of the Swift Package Manager. It's possible that there might have been a change or a bug fix in the Swift Package Manager that now enforces this rule more strictly?I also looked and tested across LDK Node + BDK Swift + LDK Swift, LDK Swift was the only dependency I was getting an error like this for and one of the main differences between the
Package.swift
in LDK Swift as compared to LDK Node and BDK Swift is thatsuppressWarnings
was included in the.binaryTarget
for LDK Swift but it was included in the.target
for both LDK Node and BDK Swift.So taking all of that into consideration, and also testing 2 things to make sure worked:
Submissions:
I did sign all my commits
I did not format my code per
.swift-format
since that change over 200+ files that were unrelated to my small code change.I linked to the Issue this PR fixes.
Draft PR
I will just put this PR in Draft mode for now.