-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 uplift for 17.03 #26970
rust uplift for 17.03 #26970
Conversation
Since cargo build became a rust package, postInstall hook was no longer called. When the hook was reenabled in cdd11368426380db545cad84c76e350e5e201adc, it revealed that scripts leftover from the component based installer are no longer present.
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
bootstrapping rust requires the prior version of rust according to #rust-internals they theorize this could be causing the build problems on i686
We saw this error when building main.rs:error: this needs a 'static lifetime or the static_in_const feature, see NixOS#35897
dont yet merge i'm still building locally so that everything will works |
paul, aszlig and me are about to removing cargo from the nixos toolchain and create a |
@qknight what's the design of |
@Mic92 @bennofs @sjmackenzie @seitz cargo2nix internal
note: cargo is then only used for generating the referenceswhat has been created in https://github.com/NixOS/nixpkgs/pull/24991/files looks similar to https://github.com/nixcloud/nixcrates/blob/master/default.nix . we are going build something like i strongly encourage to use the dependency calculator of todoyet we have to check if |
@qknight what is the motiviation for not using the cargo tool for building? |
motivation for dropping cargo@bennofs one original motivation for
one is also able to pick a specific version of a crate using post mortemturns out that maybe we can do something with https://github.com/shlevy/nix-exec to be able to call |
@qknight actually the original motivation was a mix of being able to describe dependencies in such a brief manner but also to facilitate incremental recompilation which is achieved by "builds all single dependencies" then "then links them all with the project object into the final ELF binary". Primarily the incremental compilation. |
@sjmackenzie thanks for bringing me back on track! |
I'm not sure it's possible to achieve the succinct dependency declaration, it requires a Cargo.toml + Cargo.lock + Cargo.lock.nix. In an attempt to rescue the succinct dependency declaration the { agent, edges, mods, pkgs }:
agent {
src = ./.;
edges = with edges; [ PrimBool ];
mods = with mods.rs; [ ./Cargo.lock.nix ];
osdeps = with pkgs; [];
} Though the urgency of a functional dependency calculator is more important than aesthetics atm/imho. |
@@ -12,6 +25,6 @@ fi | |||
|
|||
for PLATFORM in $PLATFORMS | |||
do | |||
URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256" | |||
URL="$BASEURL/$DATE/rust-$VERSION-$PLATFORM.tar.gz.sha256" |
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.
You should remove the quotes here and add them on the next line.
@@ -98,15 +80,26 @@ stdenv.mkDerivation { | |||
# https://reviews.llvm.org/rL281650 | |||
rm -vr src/test/run-pass/issue-36474.rs || true | |||
|
|||
# Disable some failing gdb tests. Try re-enabling these when gdb | |||
# is updated past version 7.12. | |||
rm src/test/debuginfo/basic-types-globals.rs |
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.
Call rm
once instead.
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.
In many places the quoting needs to be fixed, but assuming it works, it looks fine.
i'm closing this since i will focus on things in current master since it will becomes stable soon |
Motivation for this change
Rust is keeping backward compatibility in 1.x and it should be safe to uplift all rust related changes to 17.03.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)