-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add support for dependency renaming #24
Conversation
Nice, there already is a test! And the test exposed a bug (the build failed when |
Thank you for working on this :) |
@danieldk The changes in nixpkgs have been merged. Thanks again. Now let's get this one over the finishing line :D |
I'll update this PR with the correct nixpkgs revision , then it should be ready for review. |
nixpkgs revision bumped to NixOS/nixpkgs@a69a6c1 |
@danieldk you could include a change to the README.md which at the moment still says that renaming isn't supported under the restrictions section ;} |
sweet, @kolloch can this be merged? |
@kolloch The PR for nixpkgs has been merged to master (NixOS/nixpkgs#68296), should be ready to merge this PR |
oh I just hit this issue today, with this PR I get:
do I need something from nixpkgs upstream? |
oh I do, I need that from master. gotcha. works great! |
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.
Thanks a lot! Great contribution :)
Could you add something to the CHANGELOG, mentioning your name? Otherwise, I'll do it after merge.
@@ -184,8 +184,6 @@ The enabled features for a crate now are resolved at build time! That means you | |||
build generation time since we can simply pass this set to `cargo metadata`. Feature selection during build time is | |||
out of scope for now.~~ | |||
* No support for building and running tests, see [nixpkgs, issue 59177](https://github.com/NixOS/nixpkgs/issues/59177). | |||
* [Renamed crates](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml) |
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.
Can you please mention from what version on this is supported -- in line with the other issues? Thank you!
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.
What version should I mention here? Do you plan to release 0.5.1 next or go to 0.6.0 (since renames introduce an API change in the form of extra arguments to buildRustCrate).
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.
I have now put Before 0.6.x here.
@@ -130,7 +130,6 @@ fn build_and_run_bin_with_lib_git_dep() { | |||
} | |||
|
|||
#[test] | |||
#[ignore] | |||
fn build_and_run_bin_with_rerenamed_lib_dep() { |
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.
Awesome :)
This PR adds support for renamed dependencies. I have marked this as a draft PR, since it only works iff
NixOS/nixpkgs#68296
gets merged. I will also update the PR later to add a test. This fixes #22.