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

Print version diff for rust and cargo since last rustup.sh invocaction #18485

Closed
wants to merge 1 commit into from

Conversation

jakerr
Copy link
Contributor

@jakerr jakerr commented Oct 31, 2014

I've been using this patch on my local rustup.sh for sometime and quite like it as a way to see what has changed since my last update.

The prevailing style in this file seems to be 8 space indent in condition bodies, 4 elsewhere.
Though I'm unfamiliar with that style I tried to match it.

Also I'm no bash guru so please give a review before accepting 😅

The output looks like this:

... 

install: verifying installed binaries are executable

    Rust is ready to roll.

    Went from version:
    rustc 0.13.0-nightly (1652a1f2c 2014-10-28 22:11:56 +0000)
    to
    rustc 0.13.0-nightly (15dd90b64 2014-10-30 00:27:02 +0000)
    See diff here: https://github.com/rust-lang/rust/compare/1652a1f2c...15dd90b64

...

install: verifying installed binaries are executable

    Cargo is ready to roll.

    Went from version:
    cargo 0.0.1-pre-nightly (947a62b 2014-10-28 19:59:49 +0000)
    to
    cargo 0.0.1-pre-nightly (041d14e 2014-10-29 19:32:55 +0000)
    See diff here: https://github.com/rust-lang/cargo/compare/947a62b...041d14e

@ghost
Copy link

ghost commented Oct 31, 2014

I think the "Went from version:" bit is certainly useful, however, I am not sure about the diff URL. For casual users of rustc I wouldn't expect the diff between two versions of the compiler/package manager to be of much use. I also think "Rust is ready to roll." should follow everything else.

@brson
Copy link
Contributor

brson commented Oct 31, 2014

Seems like a useful feature, but I think I agree about the diff link - it's pretty specialized.

The order of installation is pre-existing and I don't think we need to change it here, but yes that is a pet peeve of mine too. It's intended to be fixed as part of #16456 but we could do a follow up to fix it in rustup.sh. The only reason I haven't done it before is that it's conceptually strange to for cargo (which is unusable without rustc) to be installed before rustc.

@brson
Copy link
Contributor

brson commented Oct 31, 2014

Note that even if this lands it has to be deployed manually.

@brson
Copy link
Contributor

brson commented Oct 31, 2014

Oh, I also might prefer to have the version notice before the 'ready to roll' message. Ideally - as long as we're being cute - I prefer 'Rust is ready to roll' be the last thing printed. Get's you pumped up for some Rust!

@brson
Copy link
Contributor

brson commented Oct 31, 2014

In that case, these version messages would need to be added to install.sh in this repo and cargo, which seems like the appropriate place for them anyway.

@brson
Copy link
Contributor

brson commented Oct 31, 2014

Sorry for all the spam. If these messages go into install.sh that adds new requirements to the future combined installer. Haven't thought about the impact.

cc @alexcrichton

@alexcrichton
Copy link
Member

I agree with basically all of @brson's comments, install.sh seems like a good place for this rather than rustup.sh.

@jakerr
Copy link
Contributor Author

jakerr commented Nov 2, 2014

Thanks for the feedback. I'm happy to move this into the install scripts if people want it.

Re: the comment on the diff URL potentially being too specialized and not useful for casual rust users I'd encourage you to actually visit one of the URLs if you haven't: 1652a1f...15dd90b
It's not a simple git-diff but actually a list of all of the commits that have landed since your last upgrade which can be a great help for understanding why your code stopped compiling after an upgrade. Obviously less useful once we have stability post 1.0.

Can I get a few more comments as to whether or not we should show a github diff URL?

@ghost
Copy link

ghost commented Nov 2, 2014

@jakerr Indeed, I should have clicked on the link! As you pointed out it is more than a diff but I still think it is rather unapproachable to most present and future users of Rust. It is certainly not easy to navigate that list to learn what had changed in the language in between two versions of the compiler. If we continuously maintained RELEASES.md on a commit-to-commit basis then perhaps that would be a useful resource to link to.

@jakerr
Copy link
Contributor Author

jakerr commented Nov 4, 2014

@jakub- No worries! That's a fair assessment. I find the github diff link very useful, but it's probably because I follow the project quite closely so a quick scan of the commits is enough; but I think you're right and I'm probably not a typical user.

@jakerr jakerr closed this Nov 4, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Nov 28, 2024
…_braces-to-use-SyntaxFactory

feat: convert add_braces to SyntaxFactory SyntaxEditor abstraction
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.

3 participants