[SwiftPM] Do not use underscores in target names #83
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.
Context
I'd need to test it, but I assume the SwiftPM would produce xcframeworks named
GoogleUtilities-Environment.xcframework
, for example.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 withimport GoogleUtilities_Environment
.Another option was to remove the underscore so target names would transform between
GoogleUtilities-Environment
→GoogleUtilitiesEnvironment
. 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 higherswift-tools-version
.Fixes firebase/firebase-ios-sdk#9912