Skip to content
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

[SwiftPM] Do not use underscores in target names #83

Merged
merged 2 commits into from
Sep 23, 2022
Merged

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Sep 23, 2022

Context

I'd need to test it, but I assume the SwiftPM would produce xcframeworks named GoogleUtilities-Environment.xcframework, for example.

edit: import tests passed

I don't think this is breaking because the targets aren't public and the import statement did not change.

Since the import tests are passing without any additional work, I think that confirms that SwiftPM knows how to generate module names correctly. A target, GoogleUtilities-Environment, gets a module that can imported with import GoogleUtilities_Environment.

Another option was to remove the underscore so target names would transform between GoogleUtilities-EnvironmentGoogleUtilitiesEnvironment. Then, use the module aliasing to prevent the import statement from changing: https://github.com/apple/swift-evolution/blob/main/proposals/0339-module-aliasing-for-disambiguation.md We cannot use this though because I believe it requires a higher swift-tools-version.

Fixes firebase/firebase-ios-sdk#9912

@google-oss-bot
Copy link

Coverage Report 1

Affected Products

  • GoogleUtilities-ios-unit-GoogleUtilities.framework

    Overall coverage changed from ? (334797d) to 0.12% (ff74d02) by ?.

    28 individual files with coverage change

    FilenameBase (334797d)Merge (ff74d02)Diff
    GULAppDelegateSwizzler.m?0.00%?
    GULAppEnvironmentUtil.m?3.73%?
    GULHeartbeatDateStorage.m?0.00%?
    GULHeartbeatDateStorageUserDefaults.m?0.00%?
    GULKeychainStorage.m?0.00%?
    GULKeychainUtils.m?0.00%?
    GULLogger.m?0.00%?
    GULMutableDictionary.m?0.00%?
    GULNetwork.m?0.00%?
    GULNetworkURLSession.m?0.00%?
    GULNSData+zlib.m?0.00%?
    GULObjectSwizzler.m?0.00%?
    GULProxy.m?0.00%?
    GULReachabilityChecker.m?0.00%?
    GULRuntimeClassDiff.m?0.00%?
    GULRuntimeClassSnapshot.m?0.00%?
    GULRuntimeDiff.m?0.00%?
    GULRuntimeSnapshot.m?0.00%?
    GULRuntimeStateHelper.m?0.00%?
    GULSceneDelegateSwizzler.m?0.00%?
    GULSecureCoding.m?0.00%?
    GULSwizzledObject.m?0.00%?
    GULSwizzler+Unswizzle.m?0.00%?
    GULSwizzler.m?0.00%?
    GULSwizzlingCache.m?0.00%?
    GULURLSessionDataResponse.m?0.00%?
    GULUserDefaults.m?0.00%?
    NSURLSession+GULPromises.m?0.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/YaV5XHtejt.html

@ncooke3 ncooke3 requested a review from paulb777 September 23, 2022 17:07
@ncooke3 ncooke3 marked this pull request as ready for review September 23, 2022 17:15
@ncooke3
Copy link
Member Author

ncooke3 commented Sep 23, 2022

@ncooke3
Copy link
Member Author

ncooke3 commented Sep 23, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CFBundleIdentifier invalid characters
3 participants