Conversation
|
r? @varkor (rust-highfive has picked a reviewer for you, use r? to override) |
|
Happy to go through the MCP process if you think it would be helpful, not sure what the procedure is for unstable flags. |
This comment has been minimized.
This comment has been minimized.
The Rust Playground uses it: ~/rust-playground master
❯ rg -- --pretty
ui/src/sandbox.rs
402: "--pretty=expanded", |
|
@varkor I saw you marked this as waiting on author - do you want me to fix CI first? Or does that mean you think removing the flag is a bad idea? |
It doesn't do anything `--unpretty` doesn't, and due to a bug, also didn't show up in `--help`. I don't think there's any reason to keep it around, I haven't seen anyone using it.
|
@rust-lang/compiler @rust-lang/compiler-contributors: does know of any reason |
|
@jyn514: if no-one objects, the changes look good to me. |
|
Meanwhile we are at this, couldn't (on a different PR of course) we also propose to rename unpretty to something more meaningful?. I've seen a bunch of people confused about it and I also was confused at some point. |
|
I mean, we could change |
|
(cc @shepmaster regarding play) |
|
I don't really have a clear picture of the differences behind these flags, but I think that consolidating seems fine, or perhaps just make one an alias for the other. I think it's pretty amusing that Rust has "unpretty printing" myself :) |
|
Does it really work like a pretty printer in most cases? or is it more like a dump-* kind of thing? |
I think most of the formats are just for debugging, not pretty-printing. |
|
@jyn514 right, that's what I meant, then maybe dump or something else is more precise than pretty/unpretty. |
I'm fine removing it, but the playground CI cannot run now because rustfmt is broken. When it unbreaks, I plan to merge the change. |
|
Rustfmt should have been fixed in #84886. |
I definitely would think it strange to keep a flag named Anyway, I don't know. I think there's value in having two variants, but I suspect I'm in the minority here. |
|
I'll remove the @rustbot label -S-waiting-on-team |
|
Also, I kind of wonder what the point of |
|
Rust has it's own "pretty" printer. |
|
Another alternative @nikomatsakis / @Mark-Simulacrum thought of in the meantime is to actually use rustfmt as a library for pretty-printing; that should be feasible now that it's in-tree: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/rustdoc.20is.20using.20rustc_ast_pretty.2C.20would.20.E2.80.A6.20compiler-team.23403/near/225171876 |
|
@jyn514 I retract the objection I voiced above. I'll go ahead and take a look. |
|
@bors r+ |
|
📌 Commit 23bbd65 has been approved by |
|
☀️ Test successful - checks-actions |
`--pretty` is gone as of rust-lang/rust#83491
`--pretty` is gone as of rust-lang/rust#83491
Apparently the `--pretty` option was dropped in newer rustc, see rust-lang/rust#83491
The `--pretty` and `--xpretty` arguments have been deprecated [0] and removed [1]. They have been renamed to '-Zunpretty' and moved to nightly [2]. This means that currently, with the default stable compiler this won't work. You will have to use nightly or wait until it is stabilized (which is an ongoing effort [3]). [0]: rust-lang/rust#21441 [1]: rust-lang/rust#83491 [2]: rust-lang/rust#27392 [3]: rust-lang/rust#43364 Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
The `--pretty` and `--xpretty` arguments have been deprecated [0] and removed [1]. They have been renamed to '-Zunpretty' and moved to nightly [2]. This means that currently, with the default stable compiler this won't work. You will have to use nightly or wait until it is stabilized (which is an ongoing effort [3]). [0]: rust-lang/rust#21441 [1]: rust-lang/rust#83491 [2]: rust-lang/rust#27392 [3]: rust-lang/rust#43364 Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
It doesn't do anything
--unprettydoesn't, and due to a bug, alsodidn't show up in
--help. I don't think there's any reason to keep itaround, I haven't seen anyone using it.
Closes #36473.