-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
access controlFeature → modifiers: Access control and access levelsFeature → modifiers: Access control and access levelsasync & awaitFeature → concurrency: asynchronous function aka the async/await patternFeature → concurrency: asynchronous function aka the async/await patternbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.classFeature → type declarations: Class declarationsFeature → type declarations: Class declarationscompilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featuresinheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class memberslinker errormultiple modulesFlag: An issue whose reproduction requires multiple modulesFlag: An issue whose reproduction requires multiple modulesoptimized onlyFlag: An issue whose reproduction requires optimized compilationFlag: An issue whose reproduction requires optimized compilationswift 5.7unexpected errorBug: Unexpected errorBug: Unexpected error
Description
Description
Having private
or internal
methods with async
modifier inside open class
contained inside xcframework
or Swift Package
and subclassing in other framework or project ends up with Undefined symbol
errors looking for this exact method marked as private/internal
when building with Release
configuration. Current workaround is to put all private
and internal
methods in separate extension
Steps to reproduce
Sample project here: Example.zip
OR
- Step 1:
Code inside library
:
open class Implementation {
private func function() async {}
}
Code inside other framework / target
final class Subclass: Implementation {}
- Step 2:
Run with Release
configuration
- Step 3:
Building fails with:
Undefined symbol: _$s7Library14ImplementationC8function33_F5F9723BA4E7E4900FBC54E81B5A0B49LLyyYaFTu
Expected behavior
Project runs with Release
configuration - Archiving
the project is impossible as well
Environment
- Swift compiler version info:
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: arm64-apple-macosx12.0
- Xcode version info
14.2
- Deployment target:
iOS 14.0
dlbuckley, briannadoubt and ThuggishNuggets
Metadata
Metadata
Assignees
Labels
access controlFeature → modifiers: Access control and access levelsFeature → modifiers: Access control and access levelsasync & awaitFeature → concurrency: asynchronous function aka the async/await patternFeature → concurrency: asynchronous function aka the async/await patternbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.classFeature → type declarations: Class declarationsFeature → type declarations: Class declarationscompilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featuresinheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class memberslinker errormultiple modulesFlag: An issue whose reproduction requires multiple modulesFlag: An issue whose reproduction requires multiple modulesoptimized onlyFlag: An issue whose reproduction requires optimized compilationFlag: An issue whose reproduction requires optimized compilationswift 5.7unexpected errorBug: Unexpected errorBug: Unexpected error