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

Rust 1.20.0 #30088

Merged
merged 6 commits into from Oct 22, 2017
Merged

Rust 1.20.0 #30088

merged 6 commits into from Oct 22, 2017

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Oct 4, 2017

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
Copy link
Member

LnL7 commented Oct 4, 2017

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

@andir
Copy link
Member

andir commented Oct 5, 2017

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

@Mic92
Copy link
Member

Mic92 commented Oct 5, 2017

I start nix-review now.

@zimbatm
Copy link
Member Author

zimbatm commented Oct 5, 2017

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
Copy link
Member

Mic92 commented Oct 5, 2017

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
Contributor

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

@mguentner
Copy link
Contributor

Maybe we need rust's llvm fork https://github.com/rust-lang/llvm/ 🦊

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
Contributor

Still seeing #28459 (comment) after these
commits:
https://github.com/mguentner/nixpkgs/tree/rust_30088

Very sad. 🎺

@ghost
Copy link

ghost commented Oct 8, 2017

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

@zimbatm
Copy link
Member Author

zimbatm commented Oct 8, 2017

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
Copy link
Member

Mic92 commented Oct 9, 2017

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

@bachp
Copy link
Member

bachp commented Oct 9, 2017

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

@mguentner
Copy link
Contributor

@bachp yes. Thank you.

@zimbatm
Copy link
Member Author

zimbatm commented Oct 9, 2017

merging more stuff into this PR :)

@zimbatm
Copy link
Member Author

zimbatm commented Oct 9, 2017

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

@Mic92
Copy link
Member

Mic92 commented Oct 9, 2017

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
Copy link
Member

bachp commented Oct 9, 2017

@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
Copy link
Member

vcunat commented Oct 16, 2017

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

@mguentner
Copy link
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
Copy link
Member Author

zimbatm commented Oct 19, 2017

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
Copy link
Member Author

zimbatm commented Oct 19, 2017

Currently rebasing, please don't push anything

@zimbatm
Copy link
Member Author

zimbatm commented Oct 20, 2017

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
Copy link
Member Author

zimbatm commented Oct 20, 2017

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

@zimbatm
Copy link
Member Author

zimbatm commented Oct 22, 2017

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

@zimbatm
Copy link
Member Author

zimbatm commented Oct 22, 2017

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 <kevincox@kevincox.ca>
* Jörg Thalheim <Mic92@users.noreply.github.com>
* zimbatm <zimbatm@zimbatm.com>
@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
20 tasks
@ghost
Copy link

ghost commented Dec 13, 2017

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants