Skip to content

Rust 1.20.0 - #30088

Merged
zimbatm merged 6 commits into
NixOS:masterfrom
zimbatm:rust-1.20.0
Oct 22, 2017
Merged

zimbatm merged 6 commits into
NixOS:masterfrom
zimbatm:rust-1.20.0

Conversation

@zimbatm

@zimbatm zimbatm commented Oct 4, 2017 •

Copy link
Copy Markdown
Member
Motivation for this change

Updating the rust package and cleaning things up a bit. In general nixpkgs doesn't hold unstable software unless there is a specific need so I suggest to remove beta and nightly and rely on nixpkgs-mozilla for those.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Newly-broken packages

A number of packages were broken by the update (or just exposed as already broken):

  • pkgs/applications/misc/alacritty/default.nix (no release, git dependencies)
  • pkgs/applications/networking/cluster/habitat/default.nix (git dependencies)
error: failed to sync

Caused by:
  found duplicate version of package `urlencoded v0.5.0` vendored from two sources:

        source 1: https://github.com/iron/urlencoded#8157212e
        source 2: registry https://github.com/rust-lang/crates.io-index
  • pkgs/applications/window-managers/way-cooler/default.nix (compiler error, new upstream release)
  • pkgs/applications/window-managers/wtftw/default.nix (no release, unmaintianed)
error: the lock file needs to be updated but --locked was passed to prevent this
  • pkgs/development/tools/misc/tokei/default.nix (cc @gebner )
error: the lock file needs to be updated but --locked was passed to prevent this
  • pkgs/development/tools/rust/rainicorn/default.nix (no maintainer, unstable)
warning: path `src/main.rs` was erroneously implicitly accepted for binary parse_describe,
  • pkgs/tools/package-management/cargo-edit/default.nix (new upstream release)
  • pkgs/tools/text/staccato/default.nix (new upstream release)
  • pkgs/applications/altcoins/ethrun.nix (new upstream release)

@LnL7

LnL7 commented Oct 4, 2017

Copy link
Copy Markdown
Member

I agree that we should remove the nightly builds. However there's an alias for rustNightly that causes an evaluation error.

@LnL7 LnL7 added 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 8.has: clean-up This PR removes packages or removes other cruft labels Oct 4, 2017
@andir

andir commented Oct 5, 2017 •

Copy link
Copy Markdown
Member

You should probably also remove the references (to beta and nightly versions) in the docs (doc/languages-frameworks/rust.md).

@Mic92

Mic92 commented Oct 5, 2017

Copy link
Copy Markdown
Member

I start nix-review now.

@zimbatm

zimbatm commented Oct 5, 2017

Copy link
Copy Markdown
Member Author

ok I fixed the doc as well. there is a last thing I want to do but on the nixpkgs-mozilla overlay: it should be aligned so that makeRustPlatform latest.rustChannels.beta would work.

@Mic92

Mic92 commented Oct 5, 2017 •

Copy link
Copy Markdown
Member

I get the following test failures, when running the rust test suite:

https://gist.github.com/anonymous/95cefd8f364351b17294c59a9fe56be8

From the commandline arguments it looks, like it does something with adb? I think we can disable that test. The other one looks more serious.

@mguentner

Copy link
Copy Markdown
Contributor

@Mic92 Seems like this is related:
#28459 (comment)
apparently it has been fixed (?) in rust-lang/rust#43026

@mguentner

Copy link
Copy Markdown
Contributor

mguentner added a commit to mguentner/nixpkgs that referenced this pull request Oct 6, 2017
the rust project has forked the llvm compiler to solve some
issues.
With pkgs.llvm the test suite fails.

See rust-lang/rust#43026

And PR NixOS#30088
@mguentner

Copy link
Copy Markdown
Contributor

@ghost

ghost commented Oct 8, 2017

Copy link
Copy Markdown

I would recommend jumping straight to Rust v1.21 since that is releasing in a few days.

@zimbatm

zimbatm commented Oct 8, 2017

Copy link
Copy Markdown
Member Author

It looks like cargo has a new way of creating crates.io-index mirrors. See http://doc.crates.io/source-replacement.html . I'm trying to untangle how everything work and come up with a more stable solution.

@Mic92

Mic92 commented Oct 9, 2017

Copy link
Copy Markdown
Member

Actually it should be easier now to provide a custom replacement for the official registry.

@bachp

bachp commented Oct 9, 2017

Copy link
Copy Markdown
Member

@Mic92 @zimbatm I think you are talking about #27964

@mguentner

Copy link
Copy Markdown
Contributor

@bachp yes. Thank you.

@zimbatm

zimbatm commented Oct 9, 2017

Copy link
Copy Markdown
Member Author

merging more stuff into this PR :)

@zimbatm

zimbatm commented Oct 9, 2017

Copy link
Copy Markdown
Member Author

success! it's a mess so I will cleanup the branch a bit

@Mic92

Mic92 commented Oct 9, 2017

Copy link
Copy Markdown
Member

Did you forgot to add something?

error: while evaluating 'callPackageWith' at /home/joerg/git/nixpkgs/.review/pr-30088-s6ksz1c1/lib/customisation.nix:113:35, called from /home/joerg/git/nixpkgs/.review/pr-30088-s6ksz1c1/pkgs/top-level/all-packages.nix:6187:18:
while evaluating 'makeOverridable' at /home/joerg/git/nixpkgs/.review/pr-30088-s6ksz1c1/lib/customisation.nix:72:24, called from /home/joerg/git/nixpkgs/.review/pr-30088-s6ksz1c1/lib/customisation.nix:117:8:
getting status of '/home/joerg/git/nixpkgs/.review/pr-30088-s6ksz1c1/pkgs/top-level/rust-packages.nix': No such file or directory

@bachp

bachp commented Oct 9, 2017

Copy link
Copy Markdown
Member

@zimbatm I wrote an alternative version of the print-hashes script that doesn't required the date and prints an attr set that can be pasted directly into the .nix file.

My plan was to submit this while adding support for aarch64, but it might be helpful here already.

@vcunat

vcunat commented Oct 16, 2017

Copy link
Copy Markdown
Member

@wizeman: I see. Thanks. I suppose I'll have to get used to waiting a long time for Firefox...

@mguentner

Copy link
Copy Markdown
Contributor

cargo 0.22.0 has been released https://github.com/rust-lang/cargo/releases/tag/0.22.0 which includes rust-lang/cargo@5b08b8f and thus should form the base for dhovart/cargo-local-registry#9 (so many meta-dependencies! 😥)

@zimbatm
zimbatm force-pushed the rust-1.20.0 branch 2 times, most recently from b787ca1 to 523ae7d Compare October 19, 2017 13:51
@zimbatm

zimbatm commented Oct 19, 2017

Copy link
Copy Markdown
Member Author

I have replaced the dependency fetching method to use cargo-vendor and it seems to be producing much more stable sha256. Anyone wants to nox-review?

@zimbatm

zimbatm commented Oct 19, 2017

Copy link
Copy Markdown
Member Author

Currently rebasing, please don't push anything

@zimbatm

zimbatm commented Oct 20, 2017

Copy link
Copy Markdown
Member Author

It's working but programs who depend one git are still problematic. The issue is that the .cargo/config should contain an override for all the targets.

Is it acceptable for now to mark all these packages as broken and move on?

@zimbatm

zimbatm commented Oct 20, 2017

Copy link
Copy Markdown
Member Author

Once we have alexcrichton/cargo-vendor#53 it will be easier to generate the .cargo/config and store it alongside the vendor output

@zimbatm

zimbatm commented Oct 22, 2017

Copy link
Copy Markdown
Member Author

Even with the generated cargo config, cargo seems to need the git repos to work properly :/

@zimbatm

zimbatm commented Oct 22, 2017

Copy link
Copy Markdown
Member Author

I think that we should just merge that for now

zimbatm and others added 6 commits October 23, 2017 00:30
nixpkgs is for stable software. If you want beta and nightly, use the
nixpkgs-mozilla overlay.
simplify the boostrap hashes a bit

build with bundled llvm:

the rust project has forked the llvm compiler to solve some
issues.
With pkgs.llvm the test suite fails.

See rust-lang/rust#43026

And PR NixOS#30088
The biggest benefit is that we no longer have to update the registry
package. This means that just about any cargo package can be built by
nix. No longer does `cargo update` need to be feared because it will
update to packages newer then what is available in nixpkgs.

Instead of fetching the cargo registry this bundles all the source code
into a "vendor/" folder.

This also uses the new --frozen and --locked flags which is nice.

Currently cargo-vendor only provides binaries for Linux and
macOS 64-bit. This can be solved by building it for the other
architectures and uploading it somewhere (like the NixOS cache).

This also has the downside that it requires a change to everyone's deps
hash. And if the old one is used because it was cached it will fail to
build as it will attempt to use the old version. For this reason the
attribute has been renamed to `cargoSha256`.

Authors:
* Kevin Cox <[email protected]>
* Jörg Thalheim <[email protected]>
* zimbatm <[email protected]>
@zimbatm
zimbatm merged commit 2d59a62 into NixOS:master Oct 22, 2017
@zimbatm
zimbatm deleted the rust-1.20.0 branch October 22, 2017 23:31
@Ma27 Ma27 mentioned this pull request Oct 23, 2017
gebner added a commit that referenced this pull request Nov 2, 2017
@orivej orivej mentioned this pull request Nov 2, 2017
8 tasks
@ghost ghost mentioned this pull request Dec 3, 2017
16 of 20 tasks
@ghost

ghost commented Dec 13, 2017 •

Copy link
Copy Markdown

@zimbatm

pkgs/applications/window-managers/way-cooler/default.nix (compiler error, new upstream release)

Will be fixed by #32285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 8.has: clean-up This PR removes packages or removes other cruft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants