Skip to content

Xcode 15: fix non-visionOS build by replacing .custom platform#3005

Merged
NachoSoto merged 5 commits into
mainfrom
nacho/package-swift-test
Aug 11, 2023
Merged

Xcode 15: fix non-visionOS build by replacing .custom platform#3005
NachoSoto merged 5 commits into
mainfrom
nacho/package-swift-test

Conversation

@NachoSoto

@NachoSoto NachoSoto commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

Fixes #2998. See #2989 for why this is needed in the first place.
This is now fixed in SPM: swiftlang/swift-package-manager#6794, but we need a workaround for now.

Since .custom doesn't work properly (it gets evaluated in Xcode even outside of that platform), this splits Package.swift based on Xcode version.

Thanks @neonichu for helping with this.

…sion`

Fixes #2998.
This is now fixed in SPM: swiftlang/swift-package-manager#6794, but we need a workaround for now.

Since `.custom` doesn't work properly, this splits `Package.swift` based on Xcode version.
@NachoSoto NachoSoto added the pr:fix A bug fix label Aug 11, 2023
@NachoSoto NachoSoto requested a review from a team August 11, 2023 15:51
Comment thread Package.swift
.tvOS(.v11),
.iOS(.v11)
.iOS(.v11),
.visionOS(.v1)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

An advantage of this is being able to define this too, even though for some reason it's not actually required.

@codecov

codecov Bot commented Aug 11, 2023

Copy link
Copy Markdown

Codecov Report

Merging #3005 (cc522a3) into main (21a516f) will decrease coverage by 0.06%.
The diff coverage is n/a.

❗ Current head cc522a3 differs from pull request most recent head 61a0665. Consider uploading reports for the commit 61a0665 to get more accurate results

@@            Coverage Diff             @@
##             main    #3005      +/-   ##
==========================================
- Coverage   86.66%   86.61%   -0.06%     
==========================================
  Files         219      219              
  Lines       15619    15619              
==========================================
- Hits        13536    13528       -8     
- Misses       2083     2091       +8     

see 5 files with indirect coverage changes

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not very familiar with this, but makes sense 🚢

Comment thread Package@swift-5.8.swift
@@ -0,0 +1,56 @@
// swift-tools-version:5.8

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can this be 5.6 again?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just added a separate Package@swift-5.7.swift to keep Xcode 14.1 compatibility (the min to submit to the App Store), and added a CI job to verify that.

@NachoSoto NachoSoto enabled auto-merge (squash) August 11, 2023 18:44
@NachoSoto NachoSoto disabled auto-merge August 11, 2023 18:47
@NachoSoto NachoSoto enabled auto-merge (squash) August 11, 2023 18:47
@NachoSoto NachoSoto merged commit 161b04d into main Aug 11, 2023
@NachoSoto NachoSoto deleted the nacho/package-swift-test branch August 11, 2023 18:55
NachoSoto added a commit that referenced this pull request Aug 11, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `Xcode 15`: fix non-`visionOS` build by replacing `.custom` platform
(#3005) via NachoSoto (@NachoSoto)
### Other Changes
* `Integration Tests`: test for
`SignatureVerificationMode.informational` and receipt posting when
fetching `CustomerInfo` (#3000) via NachoSoto (@NachoSoto)
* `Custom Entitlement Computation`: fixed `visionOS` build (#2999) via
NachoSoto (@NachoSoto)
* `HTTPClient`: extracted `HTTPRequestPath` protocol (#2986) via
NachoSoto (@NachoSoto)
* `CI`: add `visionOS` build (#2990) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
…3005)

Fixes #2998. See #2989 for why this is needed in the first place.
This is now fixed in SPM:
swiftlang/swift-package-manager#6794, but we need a
workaround for now.

Since `.custom` doesn't work properly (it gets evaluated in Xcode even
outside of that platform), this splits `Package.swift` based on Xcode
version.

Thanks @neonichu for helping with this.
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `Xcode 15`: fix non-`visionOS` build by replacing `.custom` platform
(#3005) via NachoSoto (@NachoSoto)
### Other Changes
* `Integration Tests`: test for
`SignatureVerificationMode.informational` and receipt posting when
fetching `CustomerInfo` (#3000) via NachoSoto (@NachoSoto)
* `Custom Entitlement Computation`: fixed `visionOS` build (#2999) via
NachoSoto (@NachoSoto)
* `HTTPClient`: extracted `HTTPRequestPath` protocol (#2986) via
NachoSoto (@NachoSoto)
* `CI`: add `visionOS` build (#2990) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RevenueCat fails to build with Xcode 15 Beta 6

3 participants