Patchwork rust-format: pin the formatted to a specific nightly version

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 29, 2020, 12:48 p.m.
Message ID <b5a33ddb633aa0caedba.1606654117@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/47739/
State Accepted
Headers show

Comments

Pierre-Yves David - Nov. 29, 2020, 12:48 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1606138438 -3600
#      Mon Nov 23 14:33:58 2020 +0100
# Node ID b5a33ddb633aa0caedba4b9cca01a476a949044e
# Parent  f96059fa519ca27b6c9c925c254eb02ded23258c
# EXP-Topic rust-format
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r b5a33ddb633a
rust-format: pin the formatted to a specific nightly version

Version 1.50 change the way rust-format behave. We pin the version for now, we
can figure out something better later.
Pulkit Goyal - Nov. 30, 2020, 4:50 p.m.
On Sun, Nov 29, 2020 at 6:18 PM Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
>
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1606138438 -3600
> #      Mon Nov 23 14:33:58 2020 +0100
> # Node ID b5a33ddb633aa0caedba4b9cca01a476a949044e
> # Parent  f96059fa519ca27b6c9c925c254eb02ded23258c
> # EXP-Topic rust-format
> # Available At https://foss.heptapod.net/octobus/mercurial-devel/
> #              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r b5a33ddb633a
> rust-format: pin the formatted to a specific nightly version
>
> Version 1.50 change the way rust-format behave. We pin the version for now, we
> can figure out something better later.

Queued this, many thanks!

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1058,11 +1058,12 @@  def has_pytype():
     return version and sv(_bytes2sys(version.group(0))) >= sv('2019.10.17')
 
 
-@check("rustfmt", "rustfmt tool")
+@check("rustfmt", "rustfmt tool at version nightly-2020-10-04")
 def has_rustfmt():
     # We use Nightly's rustfmt due to current unstable config options.
     return matchoutput(
-        '`rustup which --toolchain nightly rustfmt` --version', b'rustfmt'
+        '`rustup which --toolchain nightly-2020-10-04 rustfmt` --version',
+        b'rustfmt',
     )
 
 
diff --git a/tests/test-check-rust-format.t b/tests/test-check-rust-format.t
--- a/tests/test-check-rust-format.t
+++ b/tests/test-check-rust-format.t
@@ -3,7 +3,7 @@ 
   $ . "$TESTDIR/helpers-testrepo.sh"
 
   $ cd "$TESTDIR"/..
-  $ RUSTFMT=$(rustup which --toolchain nightly rustfmt)
+  $ RUSTFMT=$(rustup which --toolchain nightly-2020-10-04 rustfmt)
   $ for f in `testrepohg files 'glob:**/*.rs'` ; do
   >   $RUSTFMT --check --edition=2018 --unstable-features --color=never $f
   > done