Skip to content

Failed to reconstruct type for Swift.AsyncThrowingStream<A, B> #63934

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

Closed
glbrntt opened this issue Feb 27, 2023 · 1 comment
Closed

Failed to reconstruct type for Swift.AsyncThrowingStream<A, B> #63934

glbrntt opened this issue Feb 27, 2023 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself crash Bug: A crash, i.e., an abnormal termination of software demangling Area → compiler: The `libswiftDemangling` library duplicate Resolution: Duplicates another issue generics Feature: generic declarations and types swift 5.9

Comments

@glbrntt
Copy link

glbrntt commented Feb 27, 2023

Description

Compilation of the attached single-file package fails with "Failed to reconstruct type for $sScsyxq_GD" (demangled: "Failed to reconstruct type for Swift.AsyncThrowingStream<A, B>").

The snippet wraps an AsyncThrowingStream and its iterator.

Steps to reproduce

FailedToReconstructType.zip

  • swift build the attached package

Output:

Building for debugging...
error: compile command failed due to signal 6 (use -v to see invocation)
Failed to reconstruct type for $sScsyxq_GD
Original type:
(bound_generic_struct_type decl=_Concurrency.(file).AsyncThrowingStream
  (generic_type_param_type depth=0 index=0 decl=_Concurrency.(file).AsyncThrowingStream.Element)
  (generic_type_param_type depth=0 index=1 decl=_Concurrency.(file).AsyncThrowingStream.Failure))
Generic signature: <τ_0_0 where τ_0_0 : Sendable>
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/bin/swift-frontend -frontend -c -primary-file /code/Sources/FailedToReconstructType/FailedToReconstructType.swift -emit-dependencies-path /code/.build/aarch64-unknown-linux-gnu/debug/FailedToReconstructType.build/FailedToReconstructType.d -emit-reference-dependencies-path /code/.build/aarch64-unknown-linux-gnu/debug/FailedToReconstructType.build/FailedToReconstructType.swiftdeps -target aarch64-unknown-linux-gnu -Xllvm -aarch64-use-tbi -disable-objc-interop -I /code/.build/aarch64-unknown-linux-gnu/debug -color-diagnostics -enable-testing -g -module-cache-path /code/.build/aarch64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -new-driver-path /usr/bin/swift-driver -empty-abi-descriptor -plugin-path /usr/lib/swift/host/plugins -resource-dir /usr/lib/swift -enable-anonymous-context-mangled-names -module-name FailedToReconstructType -parse-as-library -o /code/.build/aarch64-unknown-linux-gnu/debug/FailedToReconstructType.build/FailedToReconstructType.swift.o -index-store-path /code/.build/aarch64-unknown-linux-gnu/debug/index/store -index-system-modules
1.	Swift version 5.9-dev (LLVM 9e0f849c04f21c4, Swift 83888d305ede1f5)
2.	Compiling with the current language version
3.	While evaluating request IRGenRequest(IR Generation for file "/code/Sources/FailedToReconstructType/FailedToReconstructType.swift")
4.	While emitting IR SIL function "@$s23FailedToReconstructType13WrappedStreamV6SourceV12continuationScs12ContinuationVyxs5Error_p_Gvg".
 for getter for continuation (at /code/Sources/FailedToReconstructType/FailedToReconstructType.swift:5:18)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/usr/bin/swift-frontend[0x5c75218]

Expected behavior

Should build without failure.

Environment

Swift version 5.9-dev (LLVM 9e0f849c04f21c4, Swift 83888d3)
Target: aarch64-unknown-linux-gnu

@glbrntt glbrntt added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Feb 27, 2023
@AnthonyLatsis AnthonyLatsis added demangling Area → compiler: The `libswiftDemangling` library compiler The Swift compiler itself compiler crash crash Bug: A crash, i.e., an abnormal termination of software swift 5.9 generics Feature: generic declarations and types and removed triage needed This issue needs more specific labels labels Feb 27, 2023
@slavapestov
Copy link
Contributor

I believe this is a duplicate of #63869 which is already fixed.

@AnthonyLatsis AnthonyLatsis added the duplicate Resolution: Duplicates another issue label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself crash Bug: A crash, i.e., an abnormal termination of software demangling Area → compiler: The `libswiftDemangling` library duplicate Resolution: Duplicates another issue generics Feature: generic declarations and types swift 5.9
Projects
None yet
Development

No branches or pull requests

3 participants