Skip to content
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

[SR-14448] swift-collections compilation failure #56804

Open
heckj opened this issue Apr 5, 2021 · 7 comments
Open

[SR-14448] swift-collections compilation failure #56804

heckj opened this issue Apr 5, 2021 · 7 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@heckj
Copy link
Contributor

heckj commented Apr 5, 2021

Previous ID SR-14448
Radar rdar://problem/75853094
Original Reporter @heckj
Type Bug
Status Reopened
Resolution

Attachment: Download

Environment

macOS 11.2.3

Xcode 12.4, swift version:
Welcome to Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28).

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 03fe1e2a4b4bfa544ec5c48f14551457

is blocked by:

  • SR-14451 CircularBuffer on top of Collections.Deque crashes all Swift compilers from 5.1 to main (on Linux)

Issue Description:

I cloned down the new swift-collections repository and went to open it up, explore a bit. First thing I tried was opening it in Xcode 12.4 (Intel Mac), and when I did a fresh build, I got a compiler failure/crash.

I thought maybe there was a different with swift directly on the command line, so I tried there - but hit basically the same thing.

Is this something I should open a bug for, or am I holding it wrong?

The failure is in swift-collections-CLI-build-failure.txt · GitHub - I didn't to spam it into here, but the key error message seems to be:

<unknown>:0: error: fatal error encountered while reading from module 'OrderedCollections'; please file a bug report with your project and the crash log<unknown>:0: note: module 'OrderedCollections' full misc version is '5.3.2(5.3.2)/Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'

Attached log file is the result of `swift build > log`

@CodaFi
Copy link
Member

CodaFi commented Apr 6, 2021

Looks like a crash in merge-modules. Could you try running a whole-module build instead of an incremental build?

@swift-ci create

@heckj
Copy link
Contributor Author

heckj commented Apr 6, 2021

I reset and built from scratch using the following:

rm -rf .build

git reset --hard origin/main

swift build > build_log.txt

The resulting log is attached.

@heckj
Copy link
Contributor Author

heckj commented Apr 6, 2021

FYI - this is happening on an Intel Mac, but not on an M1 Mac - I was able to build, test, run benchmarks - etc - on the M1 Mac without issue.

@lorentey
Copy link
Member

lorentey commented Apr 6, 2021

One potential workaround is to use an optimized build (`-c release`) – it's not a great option, but it might just do until we figure out what's triggering this.

@heckj
Copy link
Contributor Author

heckj commented Apr 6, 2021

Thanks, `swift build -c release` does compile it without error!

@lorentey
Copy link
Member

Swift Collections 0.0.2 includes a workaround for this bug, so the package should now build reliably on all machines.

This doesn't resolve the MergeModules issue in the compiler, so the same crash could still trigger in a future update – we have no good way to reliably detect it.

@heckj
Copy link
Contributor Author

heckj commented Apr 23, 2021

Thank you @shahmishal

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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 in itself
Projects
None yet
Development

No branches or pull requests

3 participants