Skip to content

Commit d670436

Browse files
authored
Add InternalImportsByDefault support (#151)
1 parent 322f6ff commit d670436

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+58
-54
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default:
5555

5656
var sharedSwiftSettings: [SwiftSetting] = [
5757
.enableUpcomingFeature("BareSlashRegexLiterals"),
58-
// .enableUpcomingFeature("InternalImportsByDefault"),
58+
.enableUpcomingFeature("InternalImportsByDefault"),
5959
.define("OPENSWIFTUI_SUPPRESS_DEPRECATED_WARNINGS"),
6060
.define("OPENSWIFTUI_RELEASE_\(releaseVersion)"),
6161
.swiftLanguageMode(.v5),

Sources/OpenSwiftUI/EventHandling/SystemEvent/OpenURLAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: 1F1831D737D24A15A8A759DDE72CEF68
88

9-
import Foundation
9+
public import Foundation
1010

1111
/// An action that opens a URL.
1212
///

Sources/OpenSwiftUI/Integration/Representable/UIKit/UIViewRepresentable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#if os(iOS)
99

10-
import UIKit
10+
public import UIKit
1111

1212
/// A wrapper for a UIKit view that you use to integrate that view into your
1313
/// OpenSwiftUI view hierarchy.

Sources/OpenSwiftUI/Integration/UIKit/UIHostingController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#if os(iOS)
2-
import UIKit
2+
public import UIKit
33

44
@available(macOS, unavailable)
55
@available(watchOS, unavailable)

Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if os(iOS)
1010
@_spi(ForOpenSwiftUIOnly) public import OpenSwiftUICore
11-
import UIKit
11+
public import UIKit
1212

1313
@available(macOS, unavailable)
1414
@available(watchOS, unavailable)

Sources/OpenSwiftUI/Test/_BenchmarkHost.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: 3E629D505F0A70F29ACFC010AA42C6E0
88

9-
import Foundation
9+
public import Foundation
1010

1111
#if canImport(QuartzCore)
1212
import QuartzCore

Sources/OpenSwiftUI/View/Control/Link/Link.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Blocked by Text and Accessibility
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A control for navigating to a URL.
1111
///

Sources/OpenSwiftUICore/Animation/TODO/Animatable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Audited for RELEASE_2021
66
// Status: Blocked by Graph
77

8+
public import Foundation
9+
810
// MARK: - Animatable
911

1012
/// A type that describes how to animate a property of a view.
@@ -48,8 +50,6 @@ extension Animatable where AnimatableData == EmptyAnimatableData {
4850
}
4951
}
5052

51-
import Foundation
52-
5353
// MARK: - Animatable + CoreGraphics
5454

5555
extension CGPoint: Animatable {

Sources/OpenSwiftUICore/Animation/VectorArithmetic.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Audited for RELEASE_2023
66
// Status: Complete
77

8+
public import Foundation
9+
810
public protocol VectorArithmetic: AdditiveArithmetic {
911
mutating func scale(by rhs: Double)
1012
var magnitudeSquared: Double { get }
@@ -56,8 +58,6 @@ extension Double: VectorArithmetic {
5658
}
5759
}
5860

59-
import Foundation
60-
6161
extension CGFloat: VectorArithmetic {
6262
@_transparent
6363
public mutating func scale(by rhs: Double) { self *= CGFloat(rhs) }

Sources/OpenSwiftUICore/Data/Environment/Environment.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
internal import OpenGraphShims
1010
#if OPENSWIFTUI_SWIFT_LOG
11-
import Logging
11+
public import Logging
1212
#else
13-
import os
13+
public import os
1414
#endif
1515

1616
/// A property wrapper that reads a value from a view's environment.

0 commit comments

Comments
 (0)