peachsim 0.1.2198 → 0.1.2199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +139 -81
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +106 -49
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +143 -85
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +3 -3
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +3 -3
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +195 -134
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +91 -39
- package/dist-lib/vite.cjs +3 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSByteCountFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSCompoundPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDateIntervalFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDecimalNumber.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSEnergyFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExpression.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSFileHandle.h +2 -2
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSIndexSet.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSLengthFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSLock.h +3 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMassFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSNotification.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSNotificationQueue.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h +4 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSOrthography.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSScanner.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSThread.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSUnit.h +25 -25
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +1 -0
- package/src/expo-native-workspace.ts +2 -3
- package/src/native-prebuilt.ts +34 -0
- package/src/native-swift-slices.ts +43 -2
- package/src/react-native-bridge-modules.ts +7 -1
- package/src/swift-packages.ts +3 -0
- package/src/swift-standins.ts +5 -2
package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h
CHANGED
|
@@ -77,7 +77,7 @@ typedef NS_OPTIONS(NSUInteger, NSISO8601DateFormatOptions) {
|
|
|
77
77
|
/// > Tip:
|
|
78
78
|
/// > In Swift, you can use ``Date/ISO8601FormatStyle`` rather than ``ISO8601DateFormatter``. The ``FormatStyle`` API offers a declarative idiom for customizing the formatting of various types. Also, Foundation caches identical ``FormatStyle`` instances, so you don't need to pass them around your app, or risk wasting memory with duplicate formatters.
|
|
79
79
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
80
|
-
@interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
|
|
80
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
|
|
81
81
|
@private
|
|
82
82
|
CFDateFormatterRef _formatter;
|
|
83
83
|
NSTimeZone *_timeZone;
|
|
@@ -250,7 +250,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
250
250
|
///
|
|
251
251
|
/// > Important:
|
|
252
252
|
/// > The Swift overlay to the Foundation framework provides the ``IndexSet`` structure, which bridges to the ``NSMutableIndexSet`` class and its immutable superclass, ``NSIndexSet``. For more information about value types, see <doc://com.apple.documentation/documentation/swift/working-with-foundation-types>.
|
|
253
|
-
@interface NSMutableIndexSet : NSIndexSet
|
|
253
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSMutableIndexSet : NSIndexSet
|
|
254
254
|
|
|
255
255
|
/// Adds the indexes in an index set to the receiver.
|
|
256
256
|
/// - Parameter indexSet: Index set to add.
|
|
@@ -31,7 +31,7 @@ typedef NS_ENUM(NSInteger, NSLengthFormatterUnit) {
|
|
|
31
31
|
/// > Note:
|
|
32
32
|
/// > As of iOS 10, macOS 10.12, tvOS 10, and watchOS 3, Foundation provides the ``MeasurementFormatter`` class, which can be used to represent quantities of ``UnitLength`` to provide equivalent functionality to ``LengthFormatter``. You are encouraged to transition to these new Foundation Units and Measurements APIs whenever possible.
|
|
33
33
|
API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
|
|
34
|
-
@interface NSLengthFormatter : NSFormatter
|
|
34
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSLengthFormatter : NSFormatter
|
|
35
35
|
|
|
36
36
|
/// The number formatter used to format the numbers in a length string.
|
|
37
37
|
///
|
|
@@ -21,7 +21,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
21
21
|
|
|
22
22
|
/// An object that coordinates the operation of multiple threads of execution within the same application.
|
|
23
23
|
NS_SWIFT_SENDABLE
|
|
24
|
-
@interface NSLock : NSObject <NSLocking>
|
|
24
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSLock : NSObject <NSLocking>
|
|
25
25
|
|
|
26
26
|
#if !0
|
|
27
27
|
/// Attempts to acquire a lock and immediately returns a Boolean value that indicates whether the attempt was successful.
|
|
@@ -72,7 +72,7 @@ NS_SWIFT_SENDABLE
|
|
|
72
72
|
|
|
73
73
|
/// A lock that may be acquired multiple times by the same thread without causing a deadlock.
|
|
74
74
|
NS_SWIFT_SENDABLE
|
|
75
|
-
@interface NSRecursiveLock : NSObject <NSLocking>
|
|
75
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSRecursiveLock : NSObject <NSLocking>
|
|
76
76
|
|
|
77
77
|
/// Attempts to acquire a lock and immediately returns a Boolean value that indicates whether the attempt was successful.
|
|
78
78
|
- (BOOL)tryLock NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use async-safe scoped locking instead");
|
|
@@ -89,7 +89,7 @@ NS_SWIFT_SENDABLE
|
|
|
89
89
|
/// A condition variable whose semantics follow those used for POSIX-style conditions.
|
|
90
90
|
NS_SWIFT_SENDABLE
|
|
91
91
|
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
|
|
92
|
-
@interface NSCondition : NSObject <NSLocking>
|
|
92
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSCondition : NSObject <NSLocking>
|
|
93
93
|
|
|
94
94
|
/// Blocks the current thread until the condition is signaled.
|
|
95
95
|
- (void)wait NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use async-safe scoped locking instead");
|
|
@@ -27,7 +27,7 @@ typedef NS_ENUM(NSInteger, NSMassFormatterUnit) {
|
|
|
27
27
|
/// > Note:
|
|
28
28
|
/// > As of iOS 10, macOS 10.12, tvOS 10, and watchOS 3, Foundation provides the ``MeasurementFormatter`` class, which can be used to represent quantities of ``UnitMass`` to provide equivalent functionality to ``MassFormatter``. You are encouraged to transition to these new Foundation Units and Measurements APIs whenever possible.
|
|
29
29
|
API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
|
|
30
|
-
@interface NSMassFormatter : NSFormatter
|
|
30
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSMassFormatter : NSFormatter
|
|
31
31
|
|
|
32
32
|
/// The number formatter used to format the numbers in a mass string.
|
|
33
33
|
///
|
package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h
CHANGED
|
@@ -29,7 +29,7 @@ typedef NS_OPTIONS(NSUInteger, NSMeasurementFormatterUnitOptions) {
|
|
|
29
29
|
/// > Tip:
|
|
30
30
|
/// > In Swift, you can use ``Measurement/FormatStyle`` rather than ``MeasurementFormatter``. The ``FormatStyle`` API offers a declarative idiom for customizing the formatting of various types. Also, Foundation caches identical ``FormatStyle`` instances, so you don't need to pass them around your app, or risk wasting memory with duplicate formatters.
|
|
31
31
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
32
|
-
@interface NSMeasurementFormatter : NSFormatter <NSSecureCoding> {
|
|
32
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSMeasurementFormatter : NSFormatter <NSSecureCoding> {
|
|
33
33
|
@private
|
|
34
34
|
void *_formatter;
|
|
35
35
|
}
|
|
@@ -106,7 +106,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
106
106
|
///
|
|
107
107
|
/// A notification center can deliver notifications only within a single program. On macOS, if you want to post a notification to other processes or receive notifications from other processes, use ``DistributedNotificationCenter`` instead.
|
|
108
108
|
NS_SWIFT_SENDABLE
|
|
109
|
-
@interface NSNotificationCenter : NSObject
|
|
109
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSNotificationCenter : NSObject
|
|
110
110
|
|
|
111
111
|
/// The app's default notification center.
|
|
112
112
|
@property (class, readonly, strong) NSNotificationCenter *defaultCenter;
|
package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSNotificationQueue.h
CHANGED
|
@@ -40,7 +40,7 @@ typedef NS_OPTIONS(NSUInteger, NSNotificationCoalescing) {
|
|
|
40
40
|
/// A notification queue maintains notifications in first in, first out (FIFO) order. When a notification moves to the front of the queue, the queue posts it to the notification center, which in turn dispatches the notification to all objects registered as observers.
|
|
41
41
|
///
|
|
42
42
|
/// Every thread has a default notification queue, which is associated with the default notification center for the process. You can create your own notification queues and have multiple queues per center and thread.
|
|
43
|
-
@interface NSNotificationQueue : NSObject
|
|
43
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSNotificationQueue : NSObject
|
|
44
44
|
|
|
45
45
|
/// Returns the default notification queue for the current thread.
|
|
46
46
|
///
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
#include <TargetConditionals.h>
|
|
6
6
|
#include <Availability.h>
|
|
7
7
|
|
|
8
|
+
#ifndef PEACH_SWIFT_CLASS
|
|
9
|
+
#define PEACH_SWIFT_CLASS(module) __attribute__((external_source_symbol(language="Swift", defined_in=#module, generated_declaration)))
|
|
10
|
+
#endif
|
|
11
|
+
|
|
8
12
|
#if TARGET_OS_OSX || TARGET_OS_IPHONE || 0
|
|
9
13
|
#include <objc/NSObjCRuntime.h>
|
|
10
14
|
#include <stdarg.h>
|
|
@@ -22,7 +22,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
22
22
|
///
|
|
23
23
|
/// Subclasses must override the ``dominantScript`` and ``languageMap`` properties. These properties are set using ``init(dominantScript:languageMap:)`` or ``orthographyWithDominantScript:languageMap:`` in Objective-C.
|
|
24
24
|
API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
|
|
25
|
-
@interface NSOrthography : NSObject <NSCopying, NSSecureCoding>
|
|
25
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSOrthography : NSObject <NSCopying, NSSecureCoding>
|
|
26
26
|
|
|
27
27
|
/// The dominant script for the text.
|
|
28
28
|
///
|
|
@@ -24,7 +24,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
24
24
|
/// To set a ``Scanner`` object to ignore a set of characters as it scans the string, use the ``charactersToBeSkipped`` property. Characters in the skip set are skipped over before the target is scanned. The default set of characters to skip is the whitespace and newline character set.
|
|
25
25
|
///
|
|
26
26
|
/// To retrieve the unscanned remainder of the string, use `scanner.string.substring(from: scanner.scanLocation)`.
|
|
27
|
-
@interface NSScanner : NSObject <NSCopying>
|
|
27
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSScanner : NSObject <NSCopying>
|
|
28
28
|
|
|
29
29
|
/// The string the scanner will scan.
|
|
30
30
|
@property (readonly, copy) NSString *string;
|
|
@@ -19,7 +19,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
19
19
|
/// ### Subclassing Notes
|
|
20
20
|
///
|
|
21
21
|
/// You can subclass ``Thread`` and override the ``main()`` method to implement your thread's main entry point. If you override ``main()``, you do not need to invoke the inherited behavior by calling `super`.
|
|
22
|
-
@interface NSThread : NSObject {
|
|
22
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSThread : NSObject {
|
|
23
23
|
@private
|
|
24
24
|
id _private;
|
|
25
25
|
uint8_t _bytes[44];
|
|
@@ -29,7 +29,7 @@ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
|
29
29
|
///
|
|
30
30
|
/// As stated above, most physical units can be converted using a linear equation with ``UnitConverterLinear``. You should only create a custom subclass of ``NSUnitConverter`` for units that cannot be converted in this way.
|
|
31
31
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
32
|
-
@interface NSUnitConverter : NSObject
|
|
32
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitConverter : NSObject
|
|
33
33
|
|
|
34
34
|
/*
|
|
35
35
|
The following methods perform conversions to and from the base unit of a unit class's dimension. Each unit is defined against the base unit for the dimension to which the unit belongs.
|
|
@@ -103,7 +103,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
103
103
|
/// }
|
|
104
104
|
/// }
|
|
105
105
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
106
|
-
@interface NSUnitConverterLinear : NSUnitConverter <NSSecureCoding> {
|
|
106
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitConverterLinear : NSUnitConverter <NSSecureCoding> {
|
|
107
107
|
@private
|
|
108
108
|
double _coefficient;
|
|
109
109
|
double _constant;
|
|
@@ -158,7 +158,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
158
158
|
/// ``NSUnit`` is intended for subclassing. For dimensional units, you should use one of the Apple provided ``Dimension`` subclasses listed in Table 1 of ``Dimension``, or create a custom subclass of ``Dimension``. You can create a direct subclass of ``NSUnit`` to represent a custom dimensionless unit, such as a count, score, or ratio.
|
|
159
159
|
NS_SWIFT_SENDABLE
|
|
160
160
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
161
|
-
@interface NSUnit : NSObject <NSCopying, NSSecureCoding> {
|
|
161
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnit : NSObject <NSCopying, NSSecureCoding> {
|
|
162
162
|
@private
|
|
163
163
|
NSString *_symbol;
|
|
164
164
|
}
|
|
@@ -340,7 +340,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
340
340
|
/// As described in <doc:#Working-with-Custom-Units>, you need to create a custom subclass of ``Dimension`` only if you or the system haven't defined a unit of the desired dimension. You can define a custom unit for an existing ``Dimension`` subclass by either calling the ``init(symbol:converter:)`` method or extending the subclass and adding a corresponding class method.
|
|
341
341
|
NS_SWIFT_SENDABLE
|
|
342
342
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
343
|
-
@interface NSDimension : NSUnit <NSSecureCoding> {
|
|
343
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSDimension : NSUnit <NSSecureCoding> {
|
|
344
344
|
@private
|
|
345
345
|
NSUInteger _reserved;
|
|
346
346
|
@protected
|
|
@@ -384,7 +384,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
384
384
|
/// | Gravity | ``gravity`` | g | `9.81` |
|
|
385
385
|
NS_SWIFT_SENDABLE
|
|
386
386
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
387
|
-
@interface NSUnitAcceleration : NSDimension <NSSecureCoding>
|
|
387
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitAcceleration : NSDimension <NSSecureCoding>
|
|
388
388
|
/*
|
|
389
389
|
Base unit - metersPerSecondSquared
|
|
390
390
|
*/
|
|
@@ -417,7 +417,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
417
417
|
/// | Revolutions | ``revolutions`` | rev | `360` |
|
|
418
418
|
NS_SWIFT_SENDABLE
|
|
419
419
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
420
|
-
@interface NSUnitAngle : NSDimension <NSSecureCoding>
|
|
420
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitAngle : NSDimension <NSSecureCoding>
|
|
421
421
|
/*
|
|
422
422
|
Base unit - degrees
|
|
423
423
|
*/
|
|
@@ -466,7 +466,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
466
466
|
/// | Hectares | ``hectares`` | ha | `10000` |
|
|
467
467
|
NS_SWIFT_SENDABLE
|
|
468
468
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
469
|
-
@interface NSUnitArea : NSDimension <NSSecureCoding>
|
|
469
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitArea : NSDimension <NSSecureCoding>
|
|
470
470
|
/*
|
|
471
471
|
Base unit - squareMeters
|
|
472
472
|
*/
|
|
@@ -520,7 +520,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
520
520
|
/// | Millimoles Per Liter | ``millimolesPerLiter(withGramsPerMole:)`` | mmol/L | `18 * gramsPerMole` |
|
|
521
521
|
NS_SWIFT_SENDABLE
|
|
522
522
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
523
|
-
@interface NSUnitConcentrationMass : NSDimension <NSSecureCoding>
|
|
523
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitConcentrationMass : NSDimension <NSSecureCoding>
|
|
524
524
|
/*
|
|
525
525
|
Base unit - gramsPerLiter
|
|
526
526
|
*/
|
|
@@ -551,7 +551,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
551
551
|
/// | Parts Per Million | ``partsPerMillion`` | ppm |
|
|
552
552
|
NS_SWIFT_SENDABLE
|
|
553
553
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
554
|
-
@interface NSUnitDispersion : NSDimension <NSSecureCoding>
|
|
554
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitDispersion : NSDimension <NSSecureCoding>
|
|
555
555
|
/*
|
|
556
556
|
Base unit - partsPerMillion
|
|
557
557
|
*/
|
|
@@ -581,7 +581,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
581
581
|
/// | Hours | ``hours`` | hr | `3600` |
|
|
582
582
|
NS_SWIFT_SENDABLE
|
|
583
583
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
584
|
-
@interface NSUnitDuration : NSDimension <NSSecureCoding> // Note: This class is not meant to be used for date calculation. Use NSDate/NSCalendar/NSDateComponents for calendrical date and time operations.
|
|
584
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitDuration : NSDimension <NSSecureCoding> // Note: This class is not meant to be used for date calculation. Use NSDate/NSCalendar/NSDateComponents for calendrical date and time operations.
|
|
585
585
|
/*
|
|
586
586
|
Base unit - seconds
|
|
587
587
|
*/
|
|
@@ -624,7 +624,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
624
624
|
/// | Microampere Hours | ``microampereHours`` | µAh | `0.0036` |
|
|
625
625
|
NS_SWIFT_SENDABLE
|
|
626
626
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
627
|
-
@interface NSUnitElectricCharge : NSDimension <NSSecureCoding>
|
|
627
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitElectricCharge : NSDimension <NSSecureCoding>
|
|
628
628
|
/*
|
|
629
629
|
Base unit - coulombs
|
|
630
630
|
*/
|
|
@@ -664,7 +664,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
664
664
|
/// | Microamperes | ``microamperes`` | µA | `0.000001` |
|
|
665
665
|
NS_SWIFT_SENDABLE
|
|
666
666
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
667
|
-
@interface NSUnitElectricCurrent : NSDimension <NSSecureCoding>
|
|
667
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitElectricCurrent : NSDimension <NSSecureCoding>
|
|
668
668
|
/*
|
|
669
669
|
Base unit - amperes
|
|
670
670
|
*/
|
|
@@ -702,7 +702,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
702
702
|
/// | Microvolts | ``microvolts`` | µV | `0.000001` |
|
|
703
703
|
NS_SWIFT_SENDABLE
|
|
704
704
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
705
|
-
@interface NSUnitElectricPotentialDifference : NSDimension <NSSecureCoding>
|
|
705
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitElectricPotentialDifference : NSDimension <NSSecureCoding>
|
|
706
706
|
/*
|
|
707
707
|
Base unit - volts
|
|
708
708
|
*/
|
|
@@ -740,7 +740,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
740
740
|
/// | Microohms | ``microohms`` | µΩ | `0.000001` |
|
|
741
741
|
NS_SWIFT_SENDABLE
|
|
742
742
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
743
|
-
@interface NSUnitElectricResistance : NSDimension <NSSecureCoding>
|
|
743
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitElectricResistance : NSDimension <NSSecureCoding>
|
|
744
744
|
/*
|
|
745
745
|
Base unit - ohms
|
|
746
746
|
*/
|
|
@@ -778,7 +778,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
778
778
|
/// | Kilowatt Hours | ``kilowattHours`` | kWh | `3600000.0` |
|
|
779
779
|
NS_SWIFT_SENDABLE
|
|
780
780
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
781
|
-
@interface NSUnitEnergy : NSDimension <NSSecureCoding>
|
|
781
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitEnergy : NSDimension <NSSecureCoding>
|
|
782
782
|
/*
|
|
783
783
|
Base unit - joules
|
|
784
784
|
*/
|
|
@@ -819,7 +819,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
819
819
|
/// | Nanohertz | ``nanohertz`` | nHz | `1e-9` |
|
|
820
820
|
NS_SWIFT_SENDABLE
|
|
821
821
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
822
|
-
@interface NSUnitFrequency : NSDimension <NSSecureCoding>
|
|
822
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitFrequency : NSDimension <NSSecureCoding>
|
|
823
823
|
/*
|
|
824
824
|
Base unit - hertz
|
|
825
825
|
*/
|
|
@@ -865,7 +865,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
865
865
|
/// | Miles Per Imperial Gallon | ``milesPerImperialGallon`` | mpg |
|
|
866
866
|
NS_SWIFT_SENDABLE
|
|
867
867
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
868
|
-
@interface NSUnitFuelEfficiency : NSDimension <NSSecureCoding>
|
|
868
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitFuelEfficiency : NSDimension <NSSecureCoding>
|
|
869
869
|
/*
|
|
870
870
|
Base unit - litersPer100Kilometers
|
|
871
871
|
*/
|
|
@@ -1045,7 +1045,7 @@ NS_SWIFT_NAME(UnitInformationStorage)
|
|
|
1045
1045
|
/// | Parsecs | ``parsecs`` | pc | `3.086e+16` |
|
|
1046
1046
|
NS_SWIFT_SENDABLE
|
|
1047
1047
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1048
|
-
@interface NSUnitLength : NSDimension <NSSecureCoding>
|
|
1048
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitLength : NSDimension <NSSecureCoding>
|
|
1049
1049
|
/*
|
|
1050
1050
|
Base unit - meters
|
|
1051
1051
|
*/
|
|
@@ -1113,7 +1113,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1113
1113
|
/// | Lux | ``lux`` | lx |
|
|
1114
1114
|
NS_SWIFT_SENDABLE
|
|
1115
1115
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1116
|
-
@interface NSUnitIlluminance : NSDimension <NSSecureCoding>
|
|
1116
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitIlluminance : NSDimension <NSSecureCoding>
|
|
1117
1117
|
/*
|
|
1118
1118
|
Base unit - lux
|
|
1119
1119
|
*/
|
|
@@ -1154,7 +1154,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1154
1154
|
/// | Slugs | ``slugs`` | slug | `14.5939` |
|
|
1155
1155
|
NS_SWIFT_SENDABLE
|
|
1156
1156
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1157
|
-
@interface NSUnitMass : NSDimension <NSSecureCoding>
|
|
1157
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitMass : NSDimension <NSSecureCoding>
|
|
1158
1158
|
/*
|
|
1159
1159
|
Base unit - kilograms
|
|
1160
1160
|
*/
|
|
@@ -1220,7 +1220,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1220
1220
|
/// | Horsepower | ``horsepower`` | hp | `745.7` |
|
|
1221
1221
|
NS_SWIFT_SENDABLE
|
|
1222
1222
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1223
|
-
@interface NSUnitPower : NSDimension <NSSecureCoding>
|
|
1223
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitPower : NSDimension <NSSecureCoding>
|
|
1224
1224
|
/*
|
|
1225
1225
|
Base unit - watts
|
|
1226
1226
|
*/
|
|
@@ -1275,7 +1275,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1275
1275
|
/// | Pounds Per Square Inch | ``poundsForcePerSquareInch`` | psi | `6894.76` |
|
|
1276
1276
|
NS_SWIFT_SENDABLE
|
|
1277
1277
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1278
|
-
@interface NSUnitPressure : NSDimension <NSSecureCoding>
|
|
1278
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitPressure : NSDimension <NSSecureCoding>
|
|
1279
1279
|
/*
|
|
1280
1280
|
Base unit - newtonsPerMetersSquared (equivalent to 1 pascal)
|
|
1281
1281
|
*/
|
|
@@ -1324,7 +1324,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1324
1324
|
/// The base unit is ``metersPerSecond`` and is accessed via ``NSDimension/baseUnit`` on the ``NSDimension`` protocol.
|
|
1325
1325
|
NS_SWIFT_SENDABLE
|
|
1326
1326
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1327
|
-
@interface NSUnitSpeed : NSDimension <NSSecureCoding>
|
|
1327
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitSpeed : NSDimension <NSSecureCoding>
|
|
1328
1328
|
/*
|
|
1329
1329
|
Base unit - metersPerSecond
|
|
1330
1330
|
*/
|
|
@@ -1358,7 +1358,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1358
1358
|
/// | Degree Fahrenheit | ``fahrenheit`` | °F | `0.55555555555556` | `255.37222222222427` |
|
|
1359
1359
|
NS_SWIFT_SENDABLE
|
|
1360
1360
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1361
|
-
@interface NSUnitTemperature : NSDimension <NSSecureCoding>
|
|
1361
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitTemperature : NSDimension <NSSecureCoding>
|
|
1362
1362
|
/*
|
|
1363
1363
|
Base unit - kelvin
|
|
1364
1364
|
*/
|
|
@@ -1418,7 +1418,7 @@ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
|
1418
1418
|
/// | Metric Cups | ``metricCups`` | metric cup | `0.25` |
|
|
1419
1419
|
NS_SWIFT_SENDABLE
|
|
1420
1420
|
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
1421
|
-
@interface NSUnitVolume : NSDimension <NSSecureCoding>
|
|
1421
|
+
PEACH_SWIFT_CLASS(Foundation) @interface NSUnitVolume : NSDimension <NSSecureCoding>
|
|
1422
1422
|
/*
|
|
1423
1423
|
Base unit - liters
|
|
1424
1424
|
*/
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
#import <QuartzCore/CAEmitterCell.h>
|
|
15
15
|
#import <QuartzCore/CAEmitterLayer.h>
|
|
16
16
|
#import <QuartzCore/CAGradientLayer.h>
|
|
17
|
+
#import <QuartzCore/CAMetalLayer.h>
|
|
17
18
|
#import <QuartzCore/CAReplicatorLayer.h>
|
|
18
19
|
#import <QuartzCore/CAScrollLayer.h>
|
|
19
20
|
#import <QuartzCore/CAShapeLayer.h>
|
|
@@ -744,7 +744,7 @@ function trackedSourceEntries(root: string, work: string): string[] {
|
|
|
744
744
|
function initializeWorkspaceGit(root: string, work: string) {
|
|
745
745
|
requireNativeGit()
|
|
746
746
|
const env = { ...process.env, ...isolatedGitEnv }
|
|
747
|
-
execFileSync('git', ['init', '--quiet'], { cwd: work, env
|
|
747
|
+
execFileSync('git', ['init', '--quiet'], { cwd: work, env })
|
|
748
748
|
execFileSync(
|
|
749
749
|
'git',
|
|
750
750
|
[
|
|
@@ -761,7 +761,7 @@ function initializeWorkspaceGit(root: string, work: string) {
|
|
|
761
761
|
'-m',
|
|
762
762
|
'prepared workspace',
|
|
763
763
|
],
|
|
764
|
-
{ cwd: work, env
|
|
764
|
+
{ cwd: work, env },
|
|
765
765
|
)
|
|
766
766
|
const tracked = trackedSourceEntries(root, work)
|
|
767
767
|
if (tracked.length > 0)
|
|
@@ -769,7 +769,6 @@ function initializeWorkspaceGit(root: string, work: string) {
|
|
|
769
769
|
cwd: work,
|
|
770
770
|
env,
|
|
771
771
|
input: tracked.join('\0'),
|
|
772
|
-
timeout: 60_000,
|
|
773
772
|
})
|
|
774
773
|
}
|
|
775
774
|
|
package/src/native-prebuilt.ts
CHANGED
|
@@ -146,6 +146,40 @@ export function fetchNativeEntry(
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* installs a locally produced entry directory (descriptor beside its files) as
|
|
151
|
+
* the cache's entry for its key, after the same checks a download gets.
|
|
152
|
+
* a private distribution has no registry entries, so its host produces them.
|
|
153
|
+
*/
|
|
154
|
+
export function installNativeEntry(
|
|
155
|
+
kind: NativeEntryKind,
|
|
156
|
+
name: string,
|
|
157
|
+
key: string,
|
|
158
|
+
source: string,
|
|
159
|
+
): string {
|
|
160
|
+
const files = parseFiles(
|
|
161
|
+
fs.readFileSync(path.join(source, 'descriptor.json'), 'utf8'),
|
|
162
|
+
kind,
|
|
163
|
+
name,
|
|
164
|
+
key,
|
|
165
|
+
)
|
|
166
|
+
for (const file of files) {
|
|
167
|
+
const target = path.join(source, file.path)
|
|
168
|
+
if (fs.statSync(target).size !== file.size || sha256(target) !== file.sha256)
|
|
169
|
+
throw new Error(
|
|
170
|
+
`native prebuilt ${kind}/${name}/${key}: ${file.path} does not match its descriptor`,
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
const dir = entryCache(kind, name, key)
|
|
174
|
+
fs.mkdirSync(path.dirname(dir), { recursive: true })
|
|
175
|
+
const staging = `${dir}.${process.pid}.partial`
|
|
176
|
+
fs.rmSync(staging, { recursive: true, force: true })
|
|
177
|
+
fs.cpSync(source, staging, { recursive: true })
|
|
178
|
+
fs.rmSync(dir, { recursive: true, force: true })
|
|
179
|
+
fs.renameSync(staging, dir)
|
|
180
|
+
return dir
|
|
181
|
+
}
|
|
182
|
+
|
|
149
183
|
/** the descriptor for files a publisher is about to upload. */
|
|
150
184
|
export function describeNativeEntry(
|
|
151
185
|
kind: NativeEntryKind,
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process'
|
|
1
2
|
import { createHash } from 'node:crypto'
|
|
2
3
|
import fs from 'node:fs'
|
|
4
|
+
import os from 'node:os'
|
|
3
5
|
import path from 'node:path'
|
|
4
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
fetchNativeEntry,
|
|
8
|
+
installNativeEntry,
|
|
9
|
+
nativeEntryKey,
|
|
10
|
+
nativeEntryPrefix,
|
|
11
|
+
} from './native-prebuilt'
|
|
5
12
|
import {
|
|
6
13
|
swiftDistributionAt,
|
|
7
14
|
swiftInterfaceDeclarations,
|
|
8
15
|
withoutSwiftDeclarations,
|
|
9
16
|
} from './swift-compile'
|
|
17
|
+
import { privateSwiftDistributionRoot, sourceSwiftCheckout } from './swift-toolchain'
|
|
10
18
|
import { simulatorNativeLibrary } from './swift-xcframework'
|
|
11
19
|
import type { SwiftStandin } from './swift-standins'
|
|
12
20
|
|
|
@@ -44,6 +52,37 @@ export function nativeSwiftSliceEntry(
|
|
|
44
52
|
return { name: SENTRY_SWIFT_SLICE.name, inputs, key: nativeEntryKey(inputs) }
|
|
45
53
|
}
|
|
46
54
|
|
|
55
|
+
// the registry holds entries only for the pinned distribution; a private one
|
|
56
|
+
// (a canary or local candidate) has none, so its host produces the slice.
|
|
57
|
+
function privateSentrySlice(
|
|
58
|
+
entry: ReturnType<typeof nativeSwiftSliceEntry>,
|
|
59
|
+
moduleRoot: string,
|
|
60
|
+
): string | null {
|
|
61
|
+
const privateRoot = privateSwiftDistributionRoot()
|
|
62
|
+
if (!privateRoot || fs.realpathSync(privateRoot) !== fs.realpathSync(moduleRoot))
|
|
63
|
+
return null
|
|
64
|
+
const script = path.join(sourceSwiftCheckout(), 'scripts/build-sentry-wasi.ts')
|
|
65
|
+
if (!fs.existsSync(script))
|
|
66
|
+
throw new Error(
|
|
67
|
+
'the Sentry slice for a private Swift distribution builds from a Contrast source checkout',
|
|
68
|
+
)
|
|
69
|
+
const staging = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'sentry-slice-'))
|
|
70
|
+
try {
|
|
71
|
+
process.stderr.write('peach: building the Sentry slice for a private distribution…\n')
|
|
72
|
+
execFileSync('bun', [script, '--output', staging, '--module-root', moduleRoot], {
|
|
73
|
+
stdio: ['ignore', 2, 2],
|
|
74
|
+
})
|
|
75
|
+
return installNativeEntry(
|
|
76
|
+
'slice',
|
|
77
|
+
entry.name,
|
|
78
|
+
entry.key,
|
|
79
|
+
path.join(staging, nativeEntryPrefix('slice', entry.name, entry.key)),
|
|
80
|
+
)
|
|
81
|
+
} finally {
|
|
82
|
+
fs.rmSync(staging, { recursive: true, force: true })
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
47
86
|
export function nativeSwiftSlice(
|
|
48
87
|
standin: SwiftStandin,
|
|
49
88
|
moduleRoot: string,
|
|
@@ -66,7 +105,9 @@ export function nativeSwiftSlice(
|
|
|
66
105
|
const distribution = swiftDistributionAt(moduleRoot)
|
|
67
106
|
if (!distribution) throw new Error('native Swift slices need a compiled distribution')
|
|
68
107
|
const entry = nativeSwiftSliceEntry(distribution, generator)
|
|
69
|
-
const directory =
|
|
108
|
+
const directory =
|
|
109
|
+
fetchNativeEntry('slice', entry.name, entry.key) ??
|
|
110
|
+
privateSentrySlice(entry, moduleRoot)
|
|
70
111
|
if (!directory)
|
|
71
112
|
throw new Error(
|
|
72
113
|
`native Swift slice ${entry.name}/${entry.key} is not built for this compiler and SDK`,
|
|
@@ -477,7 +477,13 @@ export function collectBridgeModuleSources(
|
|
|
477
477
|
if (swiftClass) {
|
|
478
478
|
const bridgingHeader = target.objc?.bridgingHeader
|
|
479
479
|
if (bridgingHeader && target.objc && app) {
|
|
480
|
-
nativeInputs ??= xcodeObjCInputs(
|
|
480
|
+
nativeInputs ??= xcodeObjCInputs(
|
|
481
|
+
app,
|
|
482
|
+
[],
|
|
483
|
+
null,
|
|
484
|
+
undefined,
|
|
485
|
+
installedWorkspace ? app.rootDir : projectRoot,
|
|
486
|
+
)
|
|
481
487
|
const native = target.objc
|
|
482
488
|
// an installed package a monorepo hoists above the project keeps its
|
|
483
489
|
// absolute path under one reserved prefix.
|
package/src/swift-packages.ts
CHANGED
|
@@ -778,6 +778,9 @@ export function resolveSwiftPackages(options: {
|
|
|
778
778
|
)
|
|
779
779
|
)
|
|
780
780
|
return false
|
|
781
|
+
// an assembly target stands in from its public headers, so a stand-in
|
|
782
|
+
// peach built for it stays provided instead of compiling its sources
|
|
783
|
+
if (providedTargets.has(name) && assemblySources(files, target)) return false
|
|
781
784
|
claimed.add(key)
|
|
782
785
|
providedTargets.delete(name)
|
|
783
786
|
for (const dependency of target.dependencies) {
|
package/src/swift-standins.ts
CHANGED
|
@@ -659,9 +659,12 @@ function cxxOnly(surface: Surface): boolean {
|
|
|
659
659
|
if (surface.kind !== 'c' && surface.kind !== 'objc') return false
|
|
660
660
|
return files(surface.headers, (name) => name.endsWith('.h')).some((file) => {
|
|
661
661
|
const guards: boolean[] = []
|
|
662
|
-
|
|
662
|
+
// documentation prose such as "class that conforms to" is not a declaration
|
|
663
|
+
const code = fs
|
|
663
664
|
.readFileSync(path.join(surface.headers, file), 'utf8')
|
|
664
|
-
.
|
|
665
|
+
.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
666
|
+
.replace(/\/\/.*$/gm, '')
|
|
667
|
+
for (const line of code.split('\n')) {
|
|
665
668
|
if (/^\s*#\s*if/.test(line))
|
|
666
669
|
guards.push(/__cplusplus/.test(line) && !/!\s*defined|ifndef/.test(line))
|
|
667
670
|
else if (/^\s*#\s*endif/.test(line)) guards.pop()
|