-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support SUPPORTED_PLATFORMS
dynamically with intelligent parsing from xcodebuild -showsdks -json
.
#3001
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…om `xcodebuild -showsdks -json`. Previously, Carthage would propagate errors upon reading non-compiled-in values from `SUPPORTED_PLATFORMS` or `PLATFORM_NAME`. Carthage’s `--platform` argument takes the same input of 2019-era SDKs — however, in alignment with the above: the default (a.k.a. “all”) parameter will allow dynamically-parsed SDKs to propagate. CarthageKit’s `BuildOptions.platforms` provides even more control — now, takes a true set of dynamically-parsed SDKs where empty set means empty set, and `nil` means use various default values. Eliminate usage of `XCDBLD.Platform` — we were using Platform wrong, twisting it into a simulatorless instance of the SDK. • instead, we just derive a method for that — `SDK.platformSimulatorlessFromHeuristic` • all the info needed for that gets parsed from -showsdks -json and stored in the SDK type `carthage archive` still uses the hardcoded four 2019-era SDKs. The `carthage cleanup` command — existing on-master, but unshipped-in-tags — no longer makes sense (when set of SDKs are non-fixed across Xcode versions.) • The crucial function `removeUnneededItems` now functionlessly returns an empty signal. • That function and the entire command will be removed in a subsequent commit. • Again, to note once more, this command never shipped in a tagged Carthage release. The previous hardcoded `XCDBLD.SDK` remains for illustrative effect (renamed to `XCDBLD.SD_K`) and will be removed in a subsequent commit. Dynamic SDK parsing can occur from `xcodebuild -showsdks -json` with fallbacks to `BuildSetting` extraction from a Xcode-bundled `xcodeproj`, beyond falling back to hardcoded 2019-era values. Will omit SDKs — such as DriverKit — where JSON-derived `canonicalName` and `platform` do not share a common prefix · DriverKit has an ouptut `canonicalName` similar to «driverkit.macosx19.0».
…-in-tags — which no longer makes sense (when set of SDKs are non-fixed across Xcode versions.) See also <github.com/Carthage/pull/2872> — and major thanks to @sidepelican and @chuganzy for developing it… 〜 sorry that the new system of dynamically parsed SDKs makes it nonviable; maybe it's viable in some future way… See commit 883f1c8.
…c SDK enum. The non-dynamic SDK enum has replacement in commit 883f1c8. Eliminate declaration of `XCDBLD.Platform` — we were using Platform wrong, twisting it into a simulatorless instance of the SDK. • instead, we just derive a method for that — `SDK.platformSimulatorlessFromHeuristic` • all the info needed for that gets parsed from -showsdks -json and stored in the SDK type See `SDK.platformSimulatorlessFromHeuristic` from commit 883f1c8.
tmspzz
approved these changes
Jun 18, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had already reviewed this code privately and reviewed it again now. Looks good to me.
7 tasks
philipphofmann
added a commit
to getsentry/sentry-cocoa
that referenced
this pull request
Jan 29, 2024
Fix Sources/Configuration/SDK.xcconfig by removing the workaround added with #491 so CI can build Carthage XCFrameworks to include VisionOS. The workaround seems to be fixed with Carthage/Carthage#3001 in Carthage 0.35.0 released in Jun 2020. Therefore, we can remove the SDKROOT__CARTHAGE settings in Sources/Configuration/SDK.xcconfig, which caused problems when building the SDK for visionOS see #3410 (comment). We never removed the workaround #491, as it didn't cause any problems. Furthermore, bump pre-commit action https://github.com/python-jsonschema/check-jsonschema to 0.27.3, so it allows macos-13-xlarge as a valid runner.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, Carthage would propagate errors upon reading non-compiled-in values from
SUPPORTED_PLATFORMS
orPLATFORM_NAME
.Carthage’s
--platform
argument takes the same input of 2019-era SDKs — however, in alignment with the above: the default (a.k.a. “all”) parameter will allow dynamically-parsed SDKs to propagate.CarthageKit’s
BuildOptions.platforms
provides even more control — now, takes a true set of dynamically-parsed SDKs where empty set means empty set, andnil
means use various default values.Eliminate usage of
XCDBLD.Platform
— we were using Platform wrong, twisting it into a simulatorless instance of the SDK.• instead, we just derive a method for that —
SDK.platformSimulatorlessFromHeuristic
• all the info needed for that gets parsed from -showsdks -json and stored in the SDK type
carthage archive
still uses the hardcoded four 2019-era SDKs.The
carthage cleanup
command — existing on-master, but unshipped-in-tags — no longer makes sense (when set of SDKs are non-fixed across Xcode versions.)•
The crucial functionremoveUnneededItems
now functionlessly returns an empty signal.• That function and the entire command
will beremoved in a subsequent commit.• Again, to note once more, this command never shipped in a tagged Carthage release.
The previous hardcoded
XCDBLD.SDK
remains for illustrative effect (renamed toremoved in a subsequent commit.XCDBLD.SD_K
) and will beDynamic SDK Parsing 📮
Dynamic SDK parsing can occur from
xcodebuild -showsdks -json
with fallbacks toBuildSetting
extraction from a Xcode-bundledxcodeproj
, beyond falling back to hardcoded 2019-era values.Will omit SDKs — such as DriverKit — where JSON-derived
canonicalName
andplatform
do not share a common prefix · DriverKit has an ouptutcanonicalName
similar to «driverkit.macosx19.0».