Canvas fails with "Runtime Linking Failure" in Swift Package

I have a view inside a Swift Package that relies on an external Swift Package. My Preview Canvas breaks as soon as I use code from the external package:

import ComplexModule // From swift-numerics
import SwiftUI

struct MyView: View {
	// Commenting out this line will make Previews work
	let number: Complex<Double> = 123

	var body: some View {
		Text("Hello World")
	}
}

#Preview {
	MyView()
}

This is part of the error the preview emits:

== PREVIEW UPDATE ERROR:

    GroupRecordingError
    
    Error encountered during update group #33
    
    ==================================
    
    |  [Remote] JITError: Runtime linking failure
    |  
    |  Additional Link Time Errors:
    |  Symbols not found: [ _$sSd10RealModule0A0AAMc, _$s13ComplexModule0A0VMn, _$s13ComplexModule0A0V14integerLiteralACyxG07IntegerD4TypeQz_tcfC ]
    |  
    |  ==================================
    |  
    |  |  [Remote] LLVMError
    |  |  
    |  |  LLVMError: LLVMError(description: "Failed to materialize symbols: { (static-MyTarget, { __replacement_tag$1 }) }")

Did anyone else see this before?

Canvas fails with "Runtime Linking Failure" in Swift Package
 
 
Q