News for hackers. Stuff that matters.
Re:Swift 3.1 Released by misterdata on Monday March 27, 2017 @05:11PM (#13971803)
Just installed, compiling a fairly large project gives me "Command failed due to signal: Illegal instruction: 4" without any further information. Smooth...
Re:Swift 3.1 Released by okket on Monday March 27, 2017 @05:26PM (#13971919)
Congratulations, you managed to crash the compiler. Can you please file a bug?

https://swift.org/contributing/#reporting-bugs

Re:Swift 3.1 Released by misterdata on Monday March 27, 2017 @05:31PM (#13971966)
Of course, just did. Very surprised that this happens for a 'source compatible' point release of Swift. Especially as this can be triggered with only five fairly simple lines of code. Not good.
Re:Swift 3.1 Released by bsaul on Monday March 27, 2017 @06:02PM (#13972231)
Imho, Swift Compiler crashes are the single most worrying things for the swift language future, because it casts shadows over the unit tests, and thus make people doubt the reliability of the whole project.
Re:Swift 3.1 Released by slavapestov on Monday March 27, 2017 @06:31PM (#13972419)
Unit testing a compiler for a language like Swift is hard because there are so many features that interact in complex ways. There are unit tests but it's easy to miss things that look "obvious" in hindsight.

Until recently the focus was on finishing the design of the language itself and not fixing bugs or improving compile time. Now that the language is source stable the focus is shifting to the latter two tasks.

Also source stability means we can build up a larger body of code for testing (imagine having to constantly migrate unit tests that exercise corner cases and quirks... not fun).

Re:Swift 3.1 Released by bsaul on Tuesday March 28, 2017 @04:52AM (#13975088)
I understand. I guess the problem comes from the fact that the language is still extremely young and moving fast, and yet advertized by Apple itself as something that should be used right now to develop apps for the billion dollars iOS market.
Re:Swift 3.1 Released by numerlo on Monday March 27, 2017 @05:41PM (#13972046)
Well they are called bugs and they exist in every software. It's not like they did it on purpose.
Re:Swift 3.1 Released by devsquid on Monday March 27, 2017 @06:48PM (#13972524)
Yea, but the Swift compiler is extremely buggy. Plus its gotten buggier with each release.
Re:Swift 3.1 Released by flipgimble on Tuesday March 28, 2017 @11:26AM (#13977392)
That sounds like you are making engineering decisions by superstition. Unless you have some source of data to back it up, please don't spread your subjective misinformation.
Re:Swift 3.1 Released by markcerqueira on Monday March 27, 2017 @05:59PM (#13972202)
I'm curious! Mind sharing your five lines of code if they are simple and don't contain anything special?
Re:Swift 3.1 Released by misterdata on Monday March 27, 2017 @06:10PM (#13972276)
https://gist.github.com/pixelspark/f4f34a257d84611e7204b646d...

Real-world use: https://github.com/pixelspark/warp/blob/dcf57462bd400df6d067...

(the typealias thing is a bit weird here, I agree - it also doesn't crash without it. Nevertheless this compiled fine on 3.0 and should show a nice error, not require me to leave out every other file from the build to find out where it goes wrong, then bisect that file to find out which line causes it)

Re:Swift 3.1 Released by slavapestov on Monday March 27, 2017 @06:29PM (#13972406)
Your snippet works in the latest master development snapshot too it seems.
Re:Swift 3.1 Released by okket on Monday March 27, 2017 @05:38PM (#13972024)
Thank you!