Sender | Message | Time |
---|---|---|
10 Aug 2024 | ||
emily | maybe we could just construct Cargo cache directories š | 20:23:15 |
emily | Download image.png | 20:25:00 |
emily | haha, the Discourse forum thread I clicked on also immediately references Nix. we're the only people in the world who want this | 20:26:04 |
emily | anyway, I guess mixing incompatible feature sets does complicate this significantly š« | 20:29:34 |
emily | so the source-based approach is probably better. (but we're still going to need to be careful about constructing lock files for transitive dependency versions, I think.) | 20:29:53 |
11 Aug 2024 | ||
emily | https://github.com/NixOS/nixpkgs/pull/332809 could maybe use a little testing before it goes in if anyone wants to take a look | 09:49:46 |
emily | I'm guessing a fair number of people use rustup on NixOS and we're bumping through like 1.5 years of changes | 09:50:22 |
GaƩtan Lepage | If I have set sourceRoot to some subfolder of the main source tree, but there is a single Cargo.lock file at the root, how should I do ?I tried mv ../Cargo.lock . in postPatch , but the build fails even before | 12:12:01 |
GaƩtan Lepage | | 12:12:20 |
GaƩtan Lepage | Isn't postPatch suppose to happen... after the patchPhase ? | 12:13:44 |
GaƩtan Lepage |
| 12:16:22 |
emily | do you override patchPhase ? | 13:21:59 |
ghpzin | In reply to @glepage:matrix.orgI think buildAndTestSubdir = "server"; with nothing else should work.If it's a workspace lock and you just want to build one crate from it. | 13:22:34 |
ghpzin | In reply to @glepage:matrix.org* I think buildAndTestSubdir = "server"; with nothing else should work.If it's a workspace lock and you just want to build one crate from it. https://github.com/NixOS/nixpkgs/blob/04f4be3e4385d7962347505807a0e55720c414aa/doc/languages-frameworks/rust.section.md?plain=1#L510-L515 | 13:23:43 |
GaƩtan Lepage | Thanks ! I'll try this :) | 13:24:05 |
12 Aug 2024 | ||
@amiablechief:matrix.org left the room. | 11:34:32 | |
emily | 2024 rust goals: | 18:36:15 |
emily | Download image.png | 18:36:19 |
emily | (https://rust-lang.github.io/rust-project-goals/2024h2/accepted.html) | 18:36:20 |
emily | maybe we can dylib it up by 2025 :) | 18:36:30 |
522 | yeah i have CARGO_TARGET_DIR set for this, but it definitely is a bit hacky | 18:37:20 |
emily | we were talking about actually building crates once in separate derivations without having to replace Cargo entirely the other day | 18:38:05 |
522 | (2 binaries with the same name in different places will alias, so running one may actually run the other, depending on which was built first) | 18:38:11 |
emily | and it seemed like Cargo just really didn't want us to do it. but maybe with this we can make it happen | 18:38:20 |
13 Aug 2024 | ||
Randy Eckenrode | In reply to @emilazy:matrix.orgCan feature flags be included in the name? This seems like a problem the Nix approach is well-equipped to handle. | 13:55:31 |
emily | AIUI, if you have dependencies on crate A that depends on C with feature X and crate B that depends on C with feature Y, Cargo will build crate C with features {X,Y} | 13:56:36 |
emily | that's full version resolver territory | 13:56:46 |
emily | we could potentially get away with just doing our own dumb Nix-like resolution and having more duplicates, but as of now there's no way to convince Cargo to let us do that | 13:57:03 |
K900 | Correct, Cargo features are strictly additive | 13:57:18 |