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

Release post for Rust 1.17 #162

Merged
merged 8 commits into from
Apr 27, 2017
Merged

Release post for Rust 1.17 #162

merged 8 commits into from
Apr 27, 2017

Conversation

steveklabnik
Copy link
Member

r? @rust-lang/core

your preferences.

Backtraces [now have nicer formatting](https://github.com/rust-lang/rust/pull/38165), eliding
many internal stack frames by default. For example, the full backtrace:
Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like maybe this is worded too aggressively rust-lang/rust#40684

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 we don't do any pruning, but the print out is still intended to be nicer:

before

thread 'main' panicked at 'explicit panic', foo.rs:2
stack backtrace:
   1:     0x55c39a23372c - std::sys::imp::backtrace::tracing::imp::write::hf33ae72d0baa11ed
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x55c39a23571e - std::panicking::default_hook::{{closure}}::h59672b733cc6a455
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:351
   3:     0x55c39a235324 - std::panicking::default_hook::h1670459d2f3f8843
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:367
   4:     0x55c39a235afb - std::panicking::rust_panic_with_hook::hcf0ddb069e7beee7
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:555
   5:     0x55c39a22e866 - std::panicking::begin_panic::heb433e9aa28a7408
   6:     0x55c39a22e9bf - foo::main::hd216d4a160fcce19
   7:     0x55c39a23d44a - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
   8:     0x55c39a236006 - std::rt::lang_start::hd7c880a37a646e81
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:436
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:361
                        at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/rt.rs:57
   9:     0x55c39a22e9e9 - main
  10:     0x7f5e5ed3382f - __libc_start_main
  11:     0x55c39a22e6b8 - _start
  12:                0x0 - <unknown>

after

thread 'main' panicked at 'explicit panic', foo.rs:2
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
   6: foo::main
   7: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
   8: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:433
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:57
   9: main
  10: __libc_start_main
  11: _start

([127, 0, 0, 1], 3000).into())
``

This removes some uneccesary run-time parsing, and is roughly as readable, depending on
Copy link
Member

Choose a reason for hiding this comment

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

uneccesary -> unnecessary


#### Cargo features

Other than the previous mentioned `build.rs` changes, Cargo has a few new improvements.
Copy link
Member

Choose a reason for hiding this comment

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

previous mentioned -> previously mentioned?

SocketAddr::from(([127, 0, 0, 1], 3000))
// or even
([127, 0, 0, 1], 3000).into())
``
Copy link
Member

Choose a reason for hiding this comment

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

Missing a backtick here.

1.17.0][notes] on GitHub.

[install]: https://www.rust-lang.org/install.html
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27

Choose a reason for hiding this comment

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

Note that for at least the posts announcing Rust 1.0 to 1.3, the "release notes" links are to /master/ and the linked anchor no longer exists on the page so the user has to scroll to find the right spot. The Rust 1.4 post links to release notes with a /[commit-id]/ link instead, so the outdated anchor tag format still works.

Consider either updating these links after publication to each point at a specific version of the release notes file, or updating the now broken links in those posts.

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, we've been doing master for a while, as the old ones are never modfied.

That is, the `x, y` form will assume that its values are set to a varaible
with the same name in its scope.

In a similar way, it's common for new Rustaceans to try to use `+` to add two

Choose a reason for hiding this comment

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

I'm not sure that this new paragraph is "in a similar way" to the previous two. Those let you type less code to get the same behavior. This one is just changing an error message.

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, "similar" here was the overall topic of the release: small ergonomic changes. I'll re-word.


Another similar improvement is "field init shorthand." Similar to ECMAScript 6,
which calls this "Object Literal Property Value Shorthand", duplication can be
removed when declaring structs, like this:

Choose a reason for hiding this comment

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

Do you have a link to more information or documentation about this feature? It should appear somewhere right? The Reference? Something like that? I don't know where to look, but I'm guessing it has to be there somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's in the reference, there's a PR open for RBE (to be merged after the release thanks to RBE's deploy process), and the book should mention it.

There's not more to it than what's described here, though.

and you can use `build = false` to opt out.

This release marks [the removal](https://github.com/rust-lang/rust/pull/39431)
of the old `Makefile` based build system. We announced this new system in 1.15,

Choose a reason for hiding this comment

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

"this new system"

Since a new system hasn't been mentioned previously in this paragraph, perhaps the text here could say "the new system."

Choose a reason for hiding this comment

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

Or...

The new system, announced in Rust 1.15, is written in Rust and primarily uses Cargo to drive the build. It is now mature enough to always use.

and [it's now being used](https://github.com/rust-lang/rust/pull/39633) to render
our various book-like documentation:

* [The book](https://doc.rust-lang.org/stable/book/) ([repo](https://github.com/rust-lang/book))

Choose a reason for hiding this comment

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

This isn't generally applicable to all /stable/ links, but it could be appropriate to link these to /1.17.0/ rather than /stable/, since the point of the links was to showcase some kind of specific difference in rendering. If the rendering changes again in the future, the link to /stable/ would probably land the user on something that wasn't actually generated with mdBook.

Copy link
Member Author

Choose a reason for hiding this comment

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

In general we always default to /stable, I agree that maybe changing this convention in the future is a good idea though

moved out of tree. Also, we've added a fourth book, still in-tree: [The
Unstable Book](https://doc.rust-lang.org/stable/unstable-book/). This
provides an overview of unstable features by name, contains links to their
tracking issues, and may contain initial documentation of the feature.

Choose a reason for hiding this comment

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

Perhaps just scratch out "the feature", since it doesn't match with "features" and "links" from earlier in the sentence.

notice once they were no longer connected to the internet. In addition,
some users *did* want to have a local copy of the docs, regardless of
their connectivity. As such, we've [reverted the change](https://github.com/rust-lang/rust/pull/40526), and documentation is being
installed by default again.

Choose a reason for hiding this comment

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

Cool, can you also link me to something explaining exactly what this means, how I'd use it, where to find it, etc.?

Also, that long line could take a break.

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 have no idea where this is, if @brson has ideas for a link, please add them in!

[`collections::Bound`]: https://doc.rust-lang.org/std/collections/enum.Bound.html
[`process::abort`]: https://doc.rust-lang.org/std/process/fn.abort.html
[`ptr::read_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.read_unaligned.html
[`ptr::write_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.write_unaligned.html

Choose a reason for hiding this comment

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

Should all these be to /stable/ like the earlier links were? Is that the most forward-appropriate link to be using?

Copy link
Member Author

Choose a reason for hiding this comment

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

these URLs are an alias to /stable; now that they're stable, they should always be there.

Other than the previously mentioned `build.rs` changes, Cargo has a few new improvements.
[`cargo check --all`](https://github.com/rust-lang/cargo/pull/3731) and
[`cargo run --package`](https://github.com/rust-lang/cargo/pull/3691) are two missing
flags that are now supported.

Choose a reason for hiding this comment

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

What do they do, can you link me to the documentation for these new flags?

Copy link
Member Author

Choose a reason for hiding this comment

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

there's no specific new docs, as these do what cargo check and cargo run do as normal, but were just missing these standard flags


Now, `cargo build` will only build our `postgres-tool` if we have the two features
set, and so we can write a normal `fn main` without all the `cfg` nonsense getting
in the way.

Choose a reason for hiding this comment

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

Can you fill in at least enough of the part currently marked # ... after [[bin]] to show how one of these targets works. The examples on the crates.io docs (wouldn't hurt to link) don't actually show any usage of multiple [[bin]] sections, so I couldn't figure out what this meant until I eventually broke down and did a Google search.

Actually, it seems kind of backwards that this release notes example is more thorough than the one on the crates.io site. Maybe someone can ping whoever is in charge of those?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you fill in at least enough of the part currently marked # ... after [[bin]] to show how one of these targets works.

That would depend on the details of the project itself, which isn't the important part here.

Maybe someone can ping whoever is in charge of those?

Guess who that is? :) Anyone could port this back to Cargo's docs, and in general, I have a "rehaul Cargo's docs) on my plate in the future.

@brson
Copy link
Contributor

brson commented Apr 27, 2017

The relnotes now point to a temporary branch since master is not updated.

};
```

That is, the `x, y` form will assume that its values are set to a varaible
Copy link
Contributor

Choose a reason for hiding this comment

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

variable

17 new bits of API were stabilized this release:

* [`Arc::into_raw`] and [`Rc::into_raw`] let you consume an `Arc` or `Rc` and get a raw pointer.
* [`Arc::from_raw`] and [`Rc::from_raw`] let you take that raw pointer and get an `Arc` or `Rc`.
Copy link
Contributor

Choose a reason for hiding this comment

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

{Arc/Rc}::ptr_eq are missing here.

11: _start
```

By default. As the message says, you can set an environment variable to get the full
Copy link
Contributor

@CryZe CryZe Apr 27, 2017

Choose a reason for hiding this comment

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

This seems weird to me. "The full backtrace is now the full backtrace By Default. As the >missing< message says [...] to get the full backtrace."

This should show the new default backtrace instead. Otherwise this wording doesn't make much sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, this is quite weird. There used to be a message that says you can switch the backtrace. Apparently this message doesn't show anymore and thus the last sentence is missing some context. Also it used to omit the libc start frames, so this is pretty weird why this "regressed" 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.

Okay, so it seems like this is actually a bug. Apparently the old frame pruning was too aggressive, so it got removed and then backported. However the message for the environment variable that shows the full backtrace only comes up when stack frames are pruned. So this message will never come up anymore.

@carols10cents carols10cents merged commit c10b2e5 into gh-pages Apr 27, 2017
@carols10cents carols10cents deleted the 1.17-announcement branch April 27, 2017 17:23
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.

8 participants