-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
rust: 1.15.0 -> 1.17.0 #26275
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
rust: 1.15.0 -> 1.17.0 #26275
Conversation
srcSha = "1dp7cjxj8nv960jxkq3p18agh9bpfb69ac14x284jmhwyksim3y7"; | ||
|
||
shortVersion = "1.17.0"; | ||
src = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fetchurl is not in scope here
|
||
shortVersion = "1.17.0"; | ||
src = fetchurl { | ||
url = "https://static.rust-lang.org/dist/rustc-${shortVersion}-src.tar.gz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise, shortVersion is not in scope here, I think the enclosing set should be rec
I've fixed the two errors above, now cargo fails to build with: |
4ae0145
to
a92307e
Compare
Hmm. I don't remember if I tested building cargo - I'll check that out |
cargo doesn't build for me either, but I get a different error that indicates that the registry needs to be updated. I'm going to try that. |
91ddc78
to
0859bc3
Compare
# substituteInPlace src/rust-installer/gen-install-script.sh \ | ||
# --replace /bin/echo "$(type -P echo)" | ||
# substituteInPlace src/rust-installer/gen-installer.sh \ | ||
# --replace /bin/echo "$(type -P echo)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commented out lines in the patch command--maybe they should be deleted if not necessary?
@FlorentBecker try again? cargo builds for me with the latest version of this patch, directly on top of nixos-unstable. |
cargo builds, so do rustfmt and pijul (from its source). |
@@ -141,7 +135,8 @@ stdenv.mkDerivation { | |||
sed -i '28s/home_dir().is_some()/true/' ./src/test/run-pass/env-home-dir.rs | |||
''; | |||
|
|||
doCheck = true; | |||
# XXX: fix test failures | |||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be addressed before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some testing on darwin, needs a few changes but it looks promising. 😃
then "x86_64-unknown-linux-gnu" | ||
else throw "missing bootstrap url for platform ${stdenv.system}"; | ||
|
||
bootstrapHash = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used
let | ||
inherit (stdenv.lib) optionalString; | ||
|
||
platform = if stdenv.system == "x86_64-linux" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also needs to be defined for all platforms and is defined in multiple places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the duplication.
I claim that adding binary nightly builds for other platforms is outside the scope of this diff (they don't exist before this diff either).
0859bc3
to
91c1b8b
Compare
I believe I've addressed all the code issues. Mainly what's needed now is re-enabling tests. I tried it and got at least one failure, which looks like it's probably some upstream test issue that should just be disabled
However, I don't want to spend an hour+ rebuilding to find each failing test. Can anyone recommend a better workflow than rebuilding the full nix expression each time (I'm using |
short of separating the bootsrapping stages into different nix expressions, I don't know of a faster way to do that. |
Is it possible to build with |
4d17e12
to
96a3563
Compare
fixed that, now it seems only gdb-based tests are failing. Do we expect our gdb 7.12 to be able to handle rust binaries correctly? Here's the relevant output from the tests https://gist.github.com/anderspapitto/3694385734d7b46d06895270cacf8411 |
7.12 is the default version in nixpkgs? If so, my memory is that it does not pass the rust tests. |
@anderspapitto I think you can disable it test then. My concern was only that we should have an explicit list of things we disable in the test suite. We already disable gdb in the past, you can take these snippets. |
@anderspapitto You can do something like this to work on the tests, I usually create a git repo of the sources before I change something making it easier to keep track the changes. $ nix-shell -A rustc
$ unpackPhase
$ cd $sourceRoot
$ patchPhase
$ configurePhase
$ buildPhase
$ checkPhase
# edit...
$ checkPhase
# edit... |
@LnL7 I archived this snippet for future nixers: https://github.com/nixos-users/wiki/wiki/nix-command-cookbook#debug-a-package-build |
96a3563
to
85cecd1
Compare
I've disabled the few failing gdb tests. all other tests are now enabled and passing. I currently consider this patch to be complete/ready to merge. @LnL7 thanks, that is actually really helpful. |
actually, I should test building beta and nightly first. they might require different sets of tests to be disabled |
FYI, this breaks the build of firefox due to the upgrade to cargo 0.18. To fix the build, we will likely need this patch (taken from Arch Linux, which took it from Firefox trunk): References: |
FYI this also does not work on darwin currently as far as I can see. I experienced several issues:
|
@anderspapitto Maybe the compilation issue is a non-issue as compilation also fails on current master. Can anybody confirm compilation of rust projects on macOS (and running their binaries) works for their cases? |
Could you remove me as rustc maintainer in this PR, as it seems that I won't have time to allocate to this anytime soon? Thanks :) |
@wizeman are you sure? I don't see cargo or rust as a dependency of the firefox expression, and applying this patch doesn't cause firefox to rebuild for me |
85cecd1
to
6ecdc2e
Compare
got rid of the extra substituteInPlace, removed retrry as reviewer. I can't replicate the failure of firefox, or any of the rumored macOS problems |
6ecdc2e
to
f6b579e
Compare
currently, I've tested that each of rust.rustc, rust.cargo, rustBeta.rustc, rustBeta.cargo, rustNightlyBin.rustc, rustNightlyBin.cargo build. I've cheated in two ways I don't think either of those is worth holding up the PR over. |
I'll fix the failing tests for darwin, I also tested some packages that use rust and those build/run fine. |
Also updates beta, nightly, nightlyBin, and bootstrap compilers. Also updates the registry. Also consolidates logic between bootstrap and nightlyBin compilers. Also contains some miscellaneous cleanups. Also patches firefox to build with the newer cargo
f6b579e
to
1e0866e
Compare
reproduced the firefox build failure that @wizeman brought up, and added the patch to fix it |
@anderspapitto out of curiosity, why did you upgrade the bootstrap compiler to 1.17.0, instead of the more customary 1.16.0? |
Talking to people in #rust-internals, it sounds like using 1.17.0 to bootstrap 1.17.0 could cause these issues. |
then | ||
echo "No date supplied" | ||
exit -1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to work:
grahamc@Morbo> ./print-hashes.sh 2017-06-08 1.17.0
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>dist/2017-06-08/rust-1.17.0-i686-unknown-linux-gnu.tar.gz.sha256</Key><RequestId>C34D6395F7683D89</RequestId><HostId>lr90iQsHnNluvVulVA4Nbf0S96ZYksq0aGQeZ3FBKO+L2ATnW7SV7ujZnG2rOzENjTTzvy5LhHY=</HostId></Error><?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>dist/2017-06-08/rust-1.17.0-x86_64-unknown-linux-gnu.tar.gz.sha256</Key><RequestId>33D783FED92A3750</RequestId><HostId>cr7TZsC9Xe29GI9sCWJhSxc0FpXboooNOwZHln0ZsBKnO5djQEQG5bP7uNDvKaIE438Dxl9Cw44=</HostId></Error><?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>dist/2017-06-08/rust-1.17.0-i686-apple-darwin.tar.gz.sha256</Key><RequestId>236CB3DD279BECAE</RequestId><HostId>xyplFt5QbqswtiSOQxH8mUpLBLKuBC+3T92kKD7V+9KqjKKqYbB1Y+kHDycz+dNu6zeQ5hTTd2w=</HostId></Error><?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>dist/2017-06-08/rust-1.17.0-x86_64-apple-darwin.tar.gz.sha256</Key><RequestId>6591E6D2614E1664</RequestId><HostId>fimagRKeC4GecGI/YFO0MDvtaUibYKh3vlFY7eIvoKlTH5/LVxk949K1ryXBGixiMo7d0NSwpwk=</HostId></Error>%
when using https://static.rust-lang.org/dist/channel-rust-stable-date.txt
@grahamc I didn't realize at the time that the bootstrap compiler should be the previous version. We should probably change it to 1.16.0 then if it will fix this. I'll look at the print-hashes.sh thing. It works for some things (like the beta channel), not sure why it fails there. |
@grahamc ah - because on 2017-06-08, the stable compiler was already 1.18.0 :) so it may require some manual digging around in https://static.rust-lang.org/dist/index.html to find the correct date. |
I think you'll want these
|
should we also cherry pick this to 17.03? since rust 1.x is backwards compatible \cc @LnL7 @anderspapitto |
I have no opinion on cherry-picking to 17.03 |
Also updates beta, nightly, nightlyBin, and bootstrap compilers.
Also consolidates logic between bootstrap and nightlyBin compilers.
I have successfully compiled the various rustcs (on NixOS only), but haven't done any further testing of the resulting binaries. Please review and/or try it out!