Live data from Hacker News

Swift 3.1 Released

swift.org

11–20 of 71 posts

Re: Swift 3.1 Released

#11
post #6

Earlier quoted context omitted.

Congratulations, you managed to crash the compiler. Can you please file a bug? https://swift.org/contributing/#reporting-bugs

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.

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

#12
post #6

Earlier quoted context omitted.

Congratulations, you managed to crash the compiler. Can you please file a bug? https://swift.org/contributing/#reporting-bugs

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.

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

#13
post #8

Earlier quoted context omitted.

Good news - it does. For me, it fixed a lot of bugs that I had no idea existed. Seems like a pretty easy mistake to make, since third party libraries I use were littered with exactly the same mistake.

Yep it was a really nasty one. Because it used to work differently in Swift 2.x where it would not put Optional() around it in certain circumstances.

Interesting, I don't remember noticing it behaving that way. What were the circumstances, if you recall?

Re: Swift 3.1 Released

#14

Earlier quoted context omitted.

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.

I'm curious! Mind sharing your five lines of code if they are simple and don't contain anything special?

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

#15

Earlier quoted context omitted.

I'm curious! Mind sharing your five lines of code if they are simple and don't contain anything special?

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 fin…

Your snippet works in the latest master development snapshot too it seems.

Re: Swift 3.1 Released

#17
post #12

Earlier quoted context omitted.

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.

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.

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

#18
post #16

Does anyone know where the new Linux binaries are? The release announcement links to https://swift.org/download , but I can't actually find the 3.1 binaries anywhere.

There are neither source releases, nor tags in git repository yet (except the 'swift' repository).

Re: Swift 3.1 Released

#19
post #10

Earlier quoted context omitted.

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.

Well they are called bugs and they exist in every software. It's not like they did it on purpose.

Yea, but the Swift compiler is extremely buggy. Plus its gotten buggier with each release.
Post reply on HN