apple / apple/swift-numerics

`** ARCHIVE FAILED **` due to `_NumericsShims` missing

Open
#267 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.9k
Forks
181
Avg merge
2d 5h
Merged PRs (30d)
6

Description

Despite `_NumericsShims` is NOT intended to be part of public API, attempt to archive any of the publicly exposed modules results into failure.

The command to execute in CLI:

**xcodebuild archive -scheme Numerics -destination "generic/platform=iOS" -archivePath "build/ios-device" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES**

it fails with underlaying error being:

**.../Library/Developer/Xcode/DerivedData/swift-numerics-dgyhdelhvghturdxbqtbuzsazzjo/Build/Intermediates.noindex/ArchiveIntermediates/Numerics/IntermediateBuildFilesPath/swift-numerics.build/Release-iphoneos/RealModule.build/Objects-normal/arm64/RealModule.swiftinterface:6:8: error: no such module '_NumericsShims'**

Same happens when try to archive in similar fashion any framework (does not matter if it's a Swift Package or created via Xcode framework), WHERE `swift-numerics` is in the dependencies list.

NOTE: in case of a framework that is built using Xcode, `Archive` via Xcode GUI works fine with same settings set in Xcode build settings (SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES) - archive works fine. I'd resort to that option, but it does not allow to archive for iOS simulator and I really want to put it in a script for automated execution.

Is it expected/intended behaviour? Any clarifications/suggestions would be much appreciated!

Xcode version 14.3.1

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the provided xcodebuild archive command on Xcode 14.3.1 and inspect the generated RealModule.swiftinterface at the reported archive path. Compare the command-line archive with the successful Xcode GUI archive, focusing on why _NumericsShims is unavailable. Done means scripted archives no longer fail for modules or frameworks that depend on swift-numerics, including the requested simulator workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.