Skip to content

Pin rustfmt and nightly revision used to build it #609

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

Merged
merged 1 commit into from
Apr 6, 2021
Merged

Conversation

djc
Copy link
Member

@djc djc commented Mar 31, 2021

No description provided.

@codecov-io
Copy link

codecov-io commented Mar 31, 2021

Codecov Report

Merging #609 (74d35f9) into main (4ca593a) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #609      +/-   ##
==========================================
+ Coverage   96.21%   96.23%   +0.02%     
==========================================
  Files          51       51              
  Lines        8977     8977              
==========================================
+ Hits         8637     8639       +2     
+ Misses        340      338       -2     
Impacted Files Coverage Δ
rustls/src/server/handy.rs 100.00% <0.00%> (+0.80%) ⬆️
rustls/src/client/handy.rs 100.00% <0.00%> (+1.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ca593a...74d35f9. Read the comment docs.

@@ -4,7 +4,13 @@ set -xe
ADMIN=$(dirname "$0")
PREV=$(pwd)
if [ ! -d $ADMIN/rustfmt ] ; then
git clone --depth 1 https://github.com/rust-lang/rustfmt $ADMIN/rustfmt
COMMIT=8829e455b722f1ba8ade915ad2687639a2abb2c3
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a comment above this about why we're pinning the Rustfmt version: We want to ensure that people submitting PRs and CI agree on what version to use, and we want to limit our exposure to breaking changes in the rust-lang/rustfmt repo.

Further, it seems like we should use a fixed version of Rust Nightly, e.g. +nightly-2021-03-31 to get a consistent build of rustfmt so the script doesn't break when the rust-lang/rust repo is updated.

Further, We need to ensure that that version of Rust Nightly is installed. Note that the runner of this script might not have any version of Rust Nightly installed already, especially if they typically use stable Rust.

@@ -4,7 +4,13 @@ set -xe
ADMIN=$(dirname "$0")
PREV=$(pwd)
if [ ! -d $ADMIN/rustfmt ] ; then
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we need to check the actual version of rustfmt stored in $ADMIN/rustfmt to see if it is the version that corresponds to the given commit. In particular, when we update $COMMIT below, this should trigger a re-download and rebuild of the new version of rustfmt.

Copy link
Contributor

@sayrer sayrer Apr 1, 2021

Choose a reason for hiding this comment

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

Apologies in advance for this very annoying comment: Bazel would do this as part of its approach. If we're going this route, it might be better to download Bazel and run this script through it, instead of depending on these shell scripts to get this right.

@ctz
Copy link
Member

ctz commented Apr 6, 2021

Going to merge this. I don't think there's a lot of value in gold-plating this script, as hopefully it will go away in a future version of rustfmt available via rustup: see rust-lang/rustfmt/pull/4782 and rust-lang/rustfmt/issues/4769

@ctz ctz merged commit f9b8d68 into main Apr 6, 2021
@ctz ctz deleted the admin-fmt-pin branch April 6, 2021 11:23
@djc
Copy link
Member Author

djc commented Apr 6, 2021

Yeah, that's looking great!

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.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy