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

doc/../rust.section.md: prominently mention buildRustXX names #187921

Merged
merged 1 commit into from Nov 21, 2022
Merged

doc/../rust.section.md: prominently mention buildRustXX names #187921

merged 1 commit into from Nov 21, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 22, 2022

Description of changes

This was a source of massive confusion for me when I first learned my way around nixpkgs' rust machinery:

  • buildRustPackage should have been named buildRustCrateUsingCargo

  • buildRustCrate should have been named buildRustCrateUsingNix (or maybe buildRustCrateUsingRustC)

I seek to save others from the confusion I experienced. It is, unfortunately, too late to change these names. Let's do the next best thing and make the names buildRustPackage and buildRustCrate very prominent in the documentation, so readers see immediately that they need to memorize the following jargon:

  • buildRustPackage means "build this Rust crate by calling cargo in one (or two) monolithic derivations"

  • buildRustCrate means "build this Rust crate by calling rustc in one derivation for each crate"

See also: #187919, #187922

Things done

This was a source of massive confusion for me when I first learned my way around nixpkgs' rust machinery.  I seek to save others from that confusion.

* `buildRustPackage` should have been named `buildRustPackageUsingCargo`

* `buildRustCrate` should have been named `buildRustPackageUsingNix`

It is, unfortunately, too late to fix this.  Let's do the next best thing and make the names `buildRustPackage` and `buildRustCrate` very prominent in the documentation, so readers see immediately that they need to learn the following jargon:

* `buildRustPackage` means "build this Rust crate by calling `cargo` in one (or two) monolithic derivations"

* `buildRustCrate` means "build this Rust crate by calling `rustc` in one derivation for each crate"
@ghost ghost marked this pull request as ready for review August 22, 2022 21:38
@ghost ghost requested a review from zowoq as a code owner August 22, 2022 21:38
@Artturin Artturin merged commit 8021261 into NixOS:master Nov 21, 2022
@ghost ghost deleted the pr/manual/rust/buildRustY branch January 23, 2024 06:49
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.

1 participant