!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

520 Members
Rust116 Servers

Load older messages


SenderMessageTime
19 Nov 2024
@9hp71n:matrix.orgghpzin @crop
Iirc it is only included in nightly toolchains even in rustup, so you need either of the 2 overlays with nightly:
https://github.com/nix-community/fenix
https://github.com/oxalica/rust-overlay
Something like this:
https://github.com/tweag/nix-remote-rust/blob/2daccaa44eaa6e684531996f0f01eb94d3f71d75/flake.nix#L25
05:17:32
@crop_tech:matrix.orgcrop thank you @ghpzin 05:20:52
@crop_tech:matrix.orgcropis it possible to mix toolchains? i don't need nightly for development. can i still use miri as the only thing from nightly?05:29:09
@9hp71n:matrix.orgghpzin there is combine in fenix:
https://github.com/nix-community/fenix/blob/e10ba121773f754a30d31b6163919a3e404a434f/README.md?plain=1#L145
and probably something similar in rust-overlay
05:58:53
@glepage:matrix.orgGaétan Lepage

Let's say a rust package has build features [a, b, c, d].
I want to remove a.
Is my only option

buildNoDefaultFeatures = true;
buildFeatures = [ "b" "c" "d" ];

?

This seems quite flaky to me. There is no buildDisabledFeatures ?

14:03:27
@emilazy:matrix.orgemilyno, Cargo does not support that14:04:05
@emilazy:matrix.orgemily you can patch the line out of the Cargo.toml instead 14:04:14
@glepage:matrix.orgGaétan LepageWould you recommend this over my approach ?14:04:58
@emilazy:matrix.orgemilyit avoids drift if the upstream defaults change at least14:05:31
@glepage:matrix.orgGaétan LepageIndeed. Thanks :)14:06:23
@khaneliman:matrix.orgAustin HorstmanI did that with tabby when we were bumping it, too. Since their default features included building llama-cpp-server, which we already built in another derivation. 14:18:23
@glepage:matrix.orgGaétan Lepage Ok ! I asked for zellij: https://github.com/NixOS/nixpkgs/pull/357261 14:19:10
@khaneliman:matrix.orgAustin Horstmanoooh, they bumped it already14:20:44
@khaneliman:matrix.orgAustin Horstmanhoping it fixes a bunch of the weird issues we were seeing14:21:00
@morj:morj.menMorj
In reply to@glepage:matrix.org

Let's say a rust package has build features [a, b, c, d].
I want to remove a.
Is my only option

buildNoDefaultFeatures = true;
buildFeatures = [ "b" "c" "d" ];

?

This seems quite flaky to me. There is no buildDisabledFeatures ?

Removing a default feature is a breaking semver change: https://doc.rust-lang.org/cargo/reference/semver.html#cargo-feature-remove-another - if I read it right. So you can rest safe until a major update
14:21:46
@glepage:matrix.orgGaétan LepageSure, but this doesn't prevent us from forgetting to check what upstream does and forget to add newly introduced default feature to our white-list, right ?14:24:51
@khaneliman:matrix.orgAustin HorstmanI think the idea was that should only need to check it on breaking changes, if they actually follow semver properly. 14:27:22
@khaneliman:matrix.orgAustin HorstmanAlthough, they introduced a default in a patch version :P14:28:10
@morj:morj.menMorj
In reply to@glepage:matrix.org
Sure, but this doesn't prevent us from forgetting to check what upstream does and forget to add newly introduced default feature to our white-list, right ?
No it doesn't. But in general if you have a major version upgrade, you can't be sure that your code using it will still work. This situation is no different
14:28:58
@khaneliman:matrix.orgAustin HorstmanI guess, it's not a real breaking change since it preserves the default behavior14:29:01
@glepage:matrix.orgGaétan Lepage
In reply to @morj:morj.men
No it doesn't. But in general if you have a major version upgrade, you can't be sure that your code using it will still work. This situation is no different

Well, I would argue that the code I used in the PR can either:

  • succesfully remove the vendored_curl default feature
  • fail (I used --replace-fail)

I don't see how it could "silently do something different)

14:30:14
@glepage:matrix.orgGaétan Lepage *

Well, I would argue that the code I used in the PR can either:

  • succesfully remove the vendored_curl default feature
  • fail (I used --replace-fail)

I don't see how it could "silently do something different"

14:30:16
20 Nov 2024
@inayet:matrix.orginayet removed their profile picture.00:59:16
@dre:imad.nycimadnyc changed their display name from dre to imadnyc.01:41:37
21 Nov 2024
@robert:scs.ems.hostRobert Rose joined the room.13:22:19
22 Nov 2024
@hive:the-apothecary.clubLi-ion changed their profile picture.20:25:54
25 Nov 2024
@glepage:matrix.orgGaétan Lepage

Would it make sense to have a disabledTests attribute in buildRustPackages (similar to the one of buildPythonPackage) ?

checkFlags = [
  "--skip=foo::bar::baz"
  "--skip=bonjour::au_revoir"
];

->

disabledTests = [
  "foo::bar::baz"
  "bonjour::au_revoir"
];
09:11:20
@nullcube:matrix.orgNullCube joined the room.09:59:04
@tnias:stratum0.orgtnias joined the room.23:08:17
26 Nov 2024
@tomasajt:matrix.orgTomaWould appreciate some feedback at https://github.com/NixOS/nixpkgs/pull/350541 also, related trivial fix: https://github.com/NixOS/nixpkgs/pull/35921107:58:07

Show newer messages


Back to Room ListRoom Version: 6