Skip to content

[Sessions] Migrate to import access modifiers #14670

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

Merged
merged 3 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/sessions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
target: [ios, tvos, macos, watchos]
build-env:
- os: macos-14
xcode: Xcode_15.3
xcode: Xcode_16.2
tests:
# Flaky tests on CI
- os: macos-15
Expand All @@ -51,11 +51,13 @@ jobs:
spm-package-resolved:
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
runs-on: macos-14
runs-on: macos-15
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
steps:
- uses: actions/checkout@v4
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: Generate Swift Package.resolved
id: swift_package_resolve
run: |
Expand All @@ -78,11 +80,8 @@ jobs:
strategy:
matrix:
include:
- os: macos-13
xcode: Xcode_15.2
target: iOS
- os: macos-14
xcode: Xcode_15.4
xcode: Xcode_16.2
target: iOS
- os: macos-15
xcode: Xcode_16.2
Expand Down
6 changes: 3 additions & 3 deletions FirebaseSessions/Sources/ApplicationInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@

import Foundation

@_implementationOnly import FirebaseCore
internal import FirebaseCore

#if SWIFT_PACKAGE
import FirebaseSessionsObjC
#endif // SWIFT_PACKAGE

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

/// Development environment for the application.
Expand Down
2 changes: 1 addition & 1 deletion FirebaseSessions/Sources/EventGDTLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import Foundation

@_implementationOnly import GoogleDataTransport
internal import GoogleDataTransport

protocol EventGDTLoggerProtocol {
func logEvent(event: SessionStartEvent, completion: @escaping (Result<Void, Error>) -> Void)
Expand Down
8 changes: 4 additions & 4 deletions FirebaseSessions/Sources/FirebaseSessions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
import Foundation

// Avoids exposing internal FirebaseCore APIs to Swift users.
@_implementationOnly import FirebaseCoreExtension
@_implementationOnly import FirebaseInstallations
@_implementationOnly import GoogleDataTransport
internal import FirebaseCoreExtension
internal import FirebaseInstallations
internal import GoogleDataTransport

#if swift(>=6.0)
internal import Promises
#elseif swift(>=5.10)
import Promises
#else
@_implementationOnly import Promises
internal import Promises
#endif

private enum GoogleDataTransportConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import Foundation

@_implementationOnly import GoogleDataTransport
internal import GoogleDataTransport

enum GoogleDataTransportProtocolErrors: Error {
case writeFailure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import Foundation

@_implementationOnly import FirebaseInstallations
internal import FirebaseInstallations

protocol InstallationsProtocol {
var installationsWaitTimeInSecond: Int { get }
Expand Down
2 changes: 1 addition & 1 deletion FirebaseSessions/Sources/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import Foundation

@_implementationOnly import FirebaseCoreExtension
internal import FirebaseCoreExtension

///
/// Logger is responsible for printing console logs
Expand Down
4 changes: 2 additions & 2 deletions FirebaseSessions/Sources/NetworkInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import Foundation
#endif // SWIFT_PACKAGE

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

protocol NetworkInfoProtocol {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseSessions/Sources/SessionGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import Foundation

@_implementationOnly import FirebaseInstallations
internal import FirebaseInstallations

struct SessionInfo {
let sessionId: String
Expand Down
6 changes: 3 additions & 3 deletions FirebaseSessions/Sources/SessionStartEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@

import Foundation

@_implementationOnly import GoogleDataTransport
internal import GoogleDataTransport

#if SWIFT_PACKAGE
import FirebaseSessionsObjC
#endif // SWIFT_PACKAGE

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

///
Expand Down
4 changes: 2 additions & 2 deletions FirebaseSessions/Sources/Settings/SettingsCacheClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import Foundation

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_UserDefaults
internal import GoogleUtilities_UserDefaults
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

/// CacheKey is like a "key" to a "safe". It provides necessary metadata about the current cache to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import Foundation

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

protocol SettingsDownloadClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FirebaseSessions
import Foundation

// Avoids exposing internal FirebaseCore APIs to Swift users.
@_implementationOnly import FirebaseCoreExtension
internal import FirebaseCoreExtension

@objc(FIRMockSubscriberSDKProtocol)
protocol MockSubscriberSDKProtocol {
Expand Down
4 changes: 2 additions & 2 deletions FirebaseSessions/Tests/Unit/Mocks/MockApplicationInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import Foundation

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

@testable import FirebaseSessions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

@_implementationOnly import FirebaseInstallations
internal import FirebaseInstallations

@testable import FirebaseSessions

Expand Down
4 changes: 2 additions & 2 deletions FirebaseSessions/Tests/Unit/Mocks/MockNetworkInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import Foundation

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

@testable import FirebaseSessions
Expand Down
4 changes: 2 additions & 2 deletions FirebaseSessions/Tests/Unit/SessionStartEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import XCTest
#endif // SWIFT_PACKAGE

#if SWIFT_PACKAGE
@_implementationOnly import GoogleUtilities_Environment
internal import GoogleUtilities_Environment
#else
@_implementationOnly import GoogleUtilities
internal import GoogleUtilities
#endif // SWIFT_PACKAGE

@testable import FirebaseSessions
Expand Down
Loading