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

Rust 1.12 release announcement #126

Merged
merged 20 commits into from
Sep 29, 2016

Conversation

steveklabnik
Copy link
Member

@steveklabnik steveklabnik commented Sep 27, 2016

Not ready to merge yet, of course.

rendered

@rust-highfive
Copy link

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Contributor

@sophiajt sophiajt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted a few areas inline


### What's in 1.12.0 stable

Oh my god! So much stuff!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! I think brson put this in as a joke. I don't mind something fun here since there is a lot of stuff in this release, but maybe "Oh my god!" is a step too far.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just imported the raw text for now 😄 I've just pushed a commit that re-works the intro a bit.

excited to see what you think of them:

![A new mismatched trait
error](/images/2016-09-Rust-1.12/mismatched-trait-error.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use the same trait error in both this section and the expanded section below? Might read better to have pictures of a different kind of error here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree


With 1.12 we're introducing a new error format which helps to surface a lot of
the internal knowledge about why an error is occurring to you, the developer. It
does this by focusing on your code, and the points of interest in your code that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra comma

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would put it here, but i over-comma, so 👍

The new Rust "mid-level IR", usually called "MIR", gives the compiler a simpler
way to think about Rust code than it's previous way of operating entirely on the
Rust abstract syntax tree. It makes analysis and optimizations possible that
have previously been difficult to implement correctly. The first of many
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just said "previous" in the sentence prior. Maybe "that would otherwise have been difficult to implement correctly"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giving "historically" a try

but this resulted in significant extra memory being used at runtime.

MIR exposes perfect information about the program's control flow, so the
compiler knows exactly whether types are moved or not, in which case it knows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awkward wording

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updatin'

hyper.0.5.0 24.03s 5.23s -78.2%
helloworld 0.17s 0.14s -16.4%
regex.0.1.30 9.63s 2.39s -75.2%
```
Copy link
Contributor

@sophiajt sophiajt Sep 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were thinking of this being a table. We may also want to turn the negative percentages into a column called "compile time" and change the percentage to a multiplier of improvement. Maybe something like:

2.35x faster
4.58x faster
1.20x faster
4.03x faster

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


### Contributors to 1.12.0

We had 176 individuals contribute to 1.12.0. Thank you so much!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to point out how many more people are in this one than before? Looking at 1.11 we had 126 and 1.10 had 139. It's not like an order of magnitude more, but the bump is noticeable at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am of two minds. It will then be conspicuously absent in the future 😉

@steveklabnik
Copy link
Member Author

I'm increasingly feeling that the initial error should be different than the one we use in the description. What's the best error message we've seen so far?

@sophiajt
Copy link
Contributor

@steveklabnik - lemme poke around the 1.12 release and see if there's a good one we can use. Will report back


The Rust team is happy to announce the latest version of Rust, 1.12.0. Rust is
a systems programming language with the slogan "fast, safe, concurrent: pick
three."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm warming to Aaron's "Safe, fast, convenient"(?) especially since we're talking about some of the convenience improvements in this post.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was concurrent. I'm also happy to switch it to whatever. @aturon ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast, Reliable, Productive

passes in LLVM to reason about. The end result is less work for the compiler and
less bloat at runtime.

The improvements in compile times of some workloads due to this change alone are
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does "this change" refer to static drop, or to MIR trans?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brson mentioned yesterday this was from the non-zeroing drop. Brian, can we confirm that?

Copy link
Member Author

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured two tables here made more sense. Maybe we should also change to the "1.x faster" style? @jonathandturner can you do that math real quick? I always mess it up.

| inflate-0.1.0 | 10.17s | 4.32s | -57.5% |
| hyper.0.5.0 | 24.03s | 5.23s | -78.2% |
| helloworld | 0.17s | 0.14s | -16.4% |
| regex.0.1.30 | 9.63s | 2.39s | -75.2% |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm betting you're just moving things around, but wanted to have a FIXME that this is the same table as the one above, just with a different last column.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I actually didn't totally realize that, i was just transcribing from the irccloud link

less bloat at runtime.

The improvements in compile times of some workloads due to this change alone are
significant:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to say something to the effect "though not all workloads will see these improvements" or something to help set expectations. I don't want people to be like "but 1.12 doesn't compile my codebase 4.5x faster :( :("

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

| inflate-0.1.0 | 175MB | 135MB | -22.9% |
| hyper.0.5.0 | 321MB | 302MB | -5.9% |
| helloworld | 127MB | 90MB | -29.1% |
| regex.0.1.30 | 230MB | 194MB | -15.7% |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.11 1.12 % of orig size
inflate-0.1.0 175MB 135MB 77.1%
hyper.0.5.0 321MB 302MB 94.1%
helloworld 127MB 90MB 70.9%
regex.0.1.30 230MB 194MB 84.3%

@sophiajt
Copy link
Contributor

@steveklabnik - here are some other possibilities. I can give you the hi-res original to use:

screen shot 2016-09-27 at 10 59 23 am

screen shot 2016-09-27 at 10 57 21 am

screen shot 2016-09-27 at 10 54 39 am

screen shot 2016-09-27 at 10 54 19 am

* Bastien Dejean
* Ben Boeckel
* Ben Stern
* bors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol bors

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bots are people too! @bors has been credited in every release so far. They work really hard!

Copy link
Contributor

@sophiajt sophiajt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: remove the extra table

(putting this here so we don't forget)

@steveklabnik
Copy link
Member Author

also have to integrate the smaller stuff from https://raw.githubusercontent.com/brson/rust/relnotes/RELEASES.md

update every one of `rustc`s errors to the new format. We're excited to see
what you think of them:

![A new borrow-check error](/images/2016-09-Rust-1.12/borrowck-error.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the preview this image looks hella big :) We may want to scale it down a bit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

psssh loud and proud! :p

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe, the other new error image is also a bit big (though not as big as this one)

|---------------|--------|-------|--------------|
| inflate-0.1.0 | 10.17s | 4.32s | 2.35x faster |
| hyper-0.5.0 | 24.03s | 5.23s | 4.58x faster |
| hellworld | 0.17s | 0.14s | 1.20x faster |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I... wouldn't want to name my program that. Perhaps you meant helloworld?

To maintain the semantics of Rust's `Drop` implementation, we always need to
check whether a type must be dropped when it goes out of scope. Historically,
this has been done by adding a special flag to all types that implement `Drop`,
but this resulted in significant extra memory being used at runtime.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph and the one before need to go (although you can say that MIR doesn't need to fill memory with a specific byte pattern to know when to drop values), as the full removal of old trans and drop flags is only in 1.13.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddyb - we saw the compile time performance from perf.rust-lang.org. How would you describe what happened between 1.11 and 1.12 to improve compile-time performance?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MIR backend is barely faster - however it's possible some of @nikomatsakis performance improvements to type/trait-related instrumentation to be in there, warrants further investigation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am removing these paras but we should talk about it.

don't match:

![A new mismatched trait
error](/images/2016-09-Rust-1.12/mismatched-trait-error.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a screenshot which doesn't include the //~ comments from the test suite. Otherwise, it looks like errors are printed twice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathandturner mind sending a PR to my PR with new screenshots?


The largest internal change in this release is moving to a new compiler backend
based on the new Rust [MIR]. While this feature does not result in any new
user-visible features, it paves the way for a number of future compiler

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeating the word "feature" sounds weird, I would change the first occurrence to "change".

#### MIR code generation

The new Rust "mid-level IR", usually called "MIR", gives the compiler a simpler
way to think about Rust code than it's previous way of operating entirely on the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's -> its

error](/images/2016-09-Rust-1.12/old-mismatched-trait-error.png)

In the new error format we represent the error by instead showing the points in
the code that matter the most. Here the relevant line in the trait declaration,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing word after "Here" -- "is" or "it shows"?

error](/images/2016-09-Rust-1.12/mismatched-trait-error.png)

Initially, this error design was built to aid borrow-checking errors, but we
found, like the error above, the format can be broadly applied to a wide variety

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like -> as with

![A new mismatched trait
error](/images/2016-09-Rust-1.12/mismatched-trait-error.png)

Initially, this error design was built to aid borrow-checking errors, but we

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aid -> aid in understanding

#### MIR code generation

The new Rust "mid-level IR", usually called "MIR", gives the compiler a simpler
way to think about Rust code than it's previous way of operating entirely on the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's -> its

| inflate-0.1.0 | 175MB | 135MB | 77.1% |
| hyper.0.5.0 | 321MB | 302MB | 94.1% |
| helloworld | 127MB | 90MB | 70.9% |
| regex.0.1.30 | 230MB | 194MB | 84.3% |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the memory usage of rustc or of the compiled program? Might want to clarify that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to use the percent decrease with a minus sign, I initially wondered if the MIR transition were that good.

|---------------|--------|-------|---------------|
| inflate-0.1.0 | 10.17s | 4.32s | 2.35x faster |
| hyper-0.5.0 | 24.03s | 5.23s | 4.58x faster |
| helloworld | 0.17s | 0.14s | 1.20x faster |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The | is not aligned in the markdown here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

I'd like to elaborate a bit more on cargo stuff
| | 1.11 | 1.12 | compile time |
|---------------|--------|-------|--------------|
| inflate-0.1.0 | 10.17s | 4.32s | 2.35x faster |
| hyper-0.5.0 | 24.03s | 5.23s | 4.58x faster |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to reproduce this, but so far I'm not seeing this improvement.

"cargo build" of a project that depends on hyper 0.5.0:
1.11: 0m26.975s
beta: 0m31.901s

"cargo build --release" of a project that depends on hyper 0.5.0:
1.11: 0m40.412s
beta: 0m43.502s

Does anyone know how to repro this chart? @eddyb? @nikomatsakis?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should mention that I got the table numbers from perf.rust-lang.org

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME FIXME FIXME FIXME FIXME
WARNING WARNING WARNING

The perf numbers could not be verified. It seems perf.rust-lang.org was giving us bogus values. We tried to repro the improvements and were not able to.

We'll need to remove these, sadly :(

On the plus side, I did see improvements compared to nightly, so there are some improvements coming. They're just not in 1.12.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathandturner The improvements you are seeing in nightly are likely due to rust-lang/rust#36524

@steveklabnik
Copy link
Member Author

@kmc @bstrie @eddyb fixed that stuff, thanks 😄

Copy link
Contributor

@sophiajt sophiajt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the perf chart, as we were not able to repro this.

| | 1.11 | 1.12 | compile time |
|---------------|--------|-------|--------------|
| inflate-0.1.0 | 10.17s | 4.32s | 2.35x faster |
| hyper-0.5.0 | 24.03s | 5.23s | 4.58x faster |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME FIXME FIXME FIXME FIXME
WARNING WARNING WARNING

The perf numbers could not be verified. It seems perf.rust-lang.org was giving us bogus values. We tried to repro the improvements and were not able to.

We'll need to remove these, sadly :(

On the plus side, I did see improvements compared to nightly, so there are some improvements coming. They're just not in 1.12.

Copy link
Member

@aturon aturon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great over all! Left just a few minor nits.


The largest internal change in this release is moving to a new compiler backend
based on the new Rust [MIR]. While this feature does not result in anything
user-visible, it paves the way for a number of future compiler optimizations,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe say: user-visible today


With 1.12 we're introducing a new error format which helps to surface a lot of
the internal knowledge about why an error is occurring to you, the developer. It
does this by focusing on your code and the points of interest in your code that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It does this by putting your code front and center, highlighting the parts relevant to the error with annotations describing what went wrong"

(https://github.com/rust-lang/rust/pull/35060).
These targets produce statically-linked binaries. There are no binary release
builds yet though.
* In error descriptions,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"more human errors"?

* [`Cell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
and
[`RefCell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
* `IpAddr`, `Ivp4Addr`, and `Ipv6Addr` have a few new methods.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're all separate, and there's a ton of them. Not sure how best to do the links here.


Cargo has some modest improvments:

* [Support local mirrors of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one seems like a biggie -- maybe worth pulling out into a brief paragraph? Maybe talk to @alexcrichton about it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, how about something like:


The biggest feature added to Cargo this cycle is the ability to [override the source of a crate](link here). Using this tools like cargo-vendor and cargo-local-registry allow vendoring dependencies locally in a robust fashion. Eventually this support will be the foundation of supporting mirrors of crates.io as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great. I wanted to do this, but it got lost in the rest of it.

user-visible, it paves the way for a number of future compiler optimizations,
and for some codebases it already results in improvements to compile times and
reductions in code size.
user-visible today, but it paves the way for a number of future compiler

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"while... but" typo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, thank you

Copy link
Contributor

@sophiajt sophiajt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first image is still too large.

@steveklabnik
Copy link
Member Author

Okay, I think this is good to go. @rust-lang/core?

@alexcrichton
Copy link
Member

👍

@brson is doing the final prep for the release right now in terms of artifacts I believe, and after that should be good to go

@steveklabnik steveklabnik merged commit 70afca3 into rust-lang:gh-pages Sep 29, 2016
@steveklabnik steveklabnik deleted the 1.12-announcement branch September 29, 2016 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.