Open fibrechannelscsi opened 1 month ago
This also fails under Ubuntu 20 (x86) with the swift-DEVELOPMENT-SNAPSHOT-2024-06-04-a-ubuntu20.04
toolchain.
Even though Collection
conforms to Sequence
, the following modification to line 3 generates an error message saying min
cannot be resolved:
public extension Collection where Self: Differentiable, Self.TangentVector: RangeReplaceableCollection, Self.TangentVector.Element == Element.TangentVector, Element: Differentiable & Comparable
The last part of line 3, Element: Differentiable, Element: Comparable
can be reduced to Element: Differentiable & Comparable
.
Description
The code shown below generates a
signal 6
when an attempt is made to build DocC-style documentation viaswift package generate-documentation
. This affects some toolchains, but not others.It is sufficient to invoke the generation of documentation via an effected toolchain via:
/Library/Developer/Toolchains/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-13-a.xctoolchain/usr/bin/swift package generate-documentation
Reproduction
This project requires one dependency:
dependencies: [.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")]
Adding this dependency will also pull in
swift-docc-symbolkit
.Copy and paste the following code into a new project with the above dependency.
Then, run:
swift package generate-documentation
via the command line, or via Xcode:Product -> Build Documentation
.Stack dump
Expected behavior
The generation of documentation (
Generated DocC archive
) should complete successfully, without crashing.Environment
Toolchains that can cause a crash:
swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-13-a
swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a
A toolchain that is not affected:
swift-DEVELOPMENT-SNAPSHOT-2024-07-07-a
The above pertains to MacOS 14.2.1.
Additional information
Commenting out any of lines 2, 4, or 6 will cause the generation of documentation to succeed. (This is the reason why
,Index == Self.TangentVector.Index
is on a separate line). Although the reproducer itself will build correctly both in Debug and Release mode, it is the generation of the DocC documentation that can cause a crash with certain toolchains.Contents of
Package.resolved
:Here is a potentially related issue; it is the only search result for
Term Verification Failed
: https://github.com/swiftlang/swift/issues/66596If the documentation is generated in Xcode via
Product -> Build Documentation
, the following stack frames will be shown (there is some overlap between the stack trace shown below and the stack trace shown above):Both of these stack traces are generated via the
swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-13-a
toolchain.