-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Carnix: 0.7.2 -> 0.8.10 #40587
Carnix: 0.7.2 -> 0.8.10 #40587
Conversation
This change looks pretty good to me. The split makes sense. First of all how do we plan to maintain our Here a notes regarding the
if Is it possible to include help messages on subcommand level? $ carnix --help
carnix 0.8.5
pmeunier <pe@pijul.org>
Generate a nix derivation set from a cargo registry
USAGE:
carnix [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
build Build project in current directory
help Prints this message or the help of the given subcommand(s)
generate Generate nix expression
run
Finally it would be great when |
|
I cherry-picked the build fix into this pull request: https://github.com/NixOS/nixpkgs/pull/40808/files |
I don't think I'm the one who should decide. A reasonable middle ground could be to maintain it manually, with the caveat that the format might change again in the future (the features code is not yet minimal). Another option could be to add a command to carnix, that generates the file from a list of packages and versions, with the goal of not importing tons of useless packages into nixpkgs. Yet another way could be to generate the whole thing from crates.io and put it online somewhere. I don't have the resources (mostly in terms of time) to setup a server now that would keep importing from crates.io (or even better, from the list of packages on GitHub), but I can provide guidance to someone who would want to do that.
No, but I expect it to be quite large. Many parts of the output are still quite verbose. Another issue is, I'd like to write tests to check that we don't break any package when we change |
How did you generate the current list? If we feed in a list of packages, we have in nixpkgs, it should good enough. UPDATE I can also take care of the documentation if it is clear to me how cratesIO is generated. |
Looks like there was a temporary merge conflict. |
@Mic92: the current list is generated by Carnix, just as before, except that the output is split into two files now. |
@P-E-Meunier How would one create a common crates-io.nix file for all |
@Mic92 there are lots of crates with lots of versions on crates.io. Importing them all would yield a fast-changing big file in nixpkgs. What we could do is to only include the ones that are useful for binaries currently packaged in nixpkgs, which would require (1) some manual work to merge new deps into the file, and (2) automated checks on the nixpkgs repository. Maybe these two tasks could be included in Carnix, at least (1) seems easy. |
I agree we should not have all crate versions in nixpkgs and I also thought about having a list of packages that is used to generate all packages. |
@P-E-Meunier is this what became of the following? |
There isn't much to "know" about the Nest, but it's now at https://nest.pijul.com/pmeunier/carnix |
Folks, Is there any work that remains to be done on this PR before it can be merged? (Or are we still stuck trying to figure out how to handle the crates.io-part of the output)? Thank you! Michael |
This and #39317 have been sitting around for quite a while. There are major bug fixes in both, that are necessary for building other packages (e.g. xi-editor requires the fix for local crates). |
I have a non-conflicting version. Also, Carnix changed a little bit since this pull request, a better option could be that we close this and open a different PR. |
Ok, this PR includes #47976, and is mergeable now. |
Success on x86_64-linux (full log) Attempted: carnix, cargo-vendor Partial log (click to expand)
|
I just fixed @sjmackenzie's issue, his example compiles with Carnix 0.8.10. Feel free to report other bugs. |
Well, if you're planning on fixing them now then https://github.com/xi-editor/xi-editor was one that previously gave me trouble (since some crates are only local, and not uploaded). EDIT: https://nest.pijul.com/pmeunier/carnix/discussions/15#46dd7fb6-3a19-4a51-9f0a-382a47fbab48 |
Pierre, thank you so much, I greatly appreciate that! 🍻 |
Ah wait, @P-E-Meunier just tried to take it for a spin but the patch doesn't pass muster.
|
The carnix 0.8.10 executable is generating code without panicking, but the generated code seems to be incorrect.
EDIT: after reading a comment in this thread: https://nest.pijul.com/pmeunier/carnix/discussions/15#46dd7fb6-3a19-4a51-9f0a-382a47fbab48 At least |
Okay I've found a last little bug in the software (at least on this execution path :-) ) To put it briefly: For detailed steps to reproduce please go here: https://nest.pijul.com/pmeunier/carnix/discussions/16 |
@P-E-Meunier nearly! :-)
|
Yes, you should regenerate your Cargo.nix, the types have changed. |
Na mate, I haven't got to the stage to regenerate my Cargo.nix file. It's failing when loading |
Ok, fixed. |
Ah, the error persists: given the most recent patch only changes a comment and code.
|
How very odd, I'm on 08d8ff0 and I'm getting
|
Thanks @sjmackenzie, and sorry about the multiple failed attempts. I believe it's working now. |
@GrahamcOfBorg build carnix cargo-vendor |
LGTM! @P-E-Meunier it's always a pleasure using your software mate. Thanks! |
Success on aarch64-linux (full log) Attempted: carnix, cargo-vendor Partial log (click to expand)
|
Timed out, unknown build status on x86_64-linux (full log) Attempted: carnix, cargo-vendor Partial log (click to expand)
|
I don't know why buildRustCrateHelpers was removed from the repository, who did it, nor why I wasn't asked to review that change or to update Carnix to take it into account, but I just spent two hours debugging a project that required it, and kept giving me obscure errors. The code produced by the version of Carnix that's in nixpkgs requires that line, and that's actually why it was there. Maybe a bad git merge is responsible for this situation, since I couldn't find any other information about the change. In any case, we need that line (and that file) back. The last thing I want is to fight with anyone, because I love everybody, and I know everyone spent lots of time on Nix and Nixpkgs, which is a fantastic project. But I'm a little bit upset, since I invested a substantial amount of time into Carnix to make it work out of the box, and accommodated many feature requests from the community. |
Wait, was this entire PR reverted? Why? |
Ok, this is weird. I didn't check it out locally, and only looked at GitHub. I can definitely see it there now, I swear it didn't show up when I wrote that. Thanks. |
@P-E-Meunier it's not just you, i've seen similar oddities when using github before; search functionality, Mary Celeste code. Not often, but enough to question my sanity. |
Motivation for this change
This new version of Carnix splits its input into two parts:
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)