-
Notifications
You must be signed in to change notification settings - Fork 92
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
dbus_codegen: extern location for dbus_codegen does not exist #53
Comments
Thank you! I can reproduce. This is due to the crate being in a subpath. Cargo actually looks for a matching Cargo.toml, apparently: rust-lang/cargo#1462 (comment) That is a bit crazy but should be supportable in Feel free to add. |
@evanjs Just wondering, but in this particular line of Rust: include!(concat!(env!("OUT_DIR"), "/build.rs")); Did you intend to write this? include!(concat!(env!("OUT_DIR"), "/hello.rs")); I don't think it makes sense to |
Ah yes I suppose that wasn't the best example. pub mod systemd_manager {
#![allow(unused)]
include!(concat!(env!("OUT_DIR"), "/systemd_manager.rs"));
}
pub mod systemd_service {
#![allow(unused)]
include!(concat!(env!("OUT_DIR"), "/systemd_service.rs"));
} I must have gotten too caught up in having a minimum reproducible example. |
It's okay! Looks like that line was fixed when the example was committed into |
Is there any workaround for this? It's not even possible to override the |
@emilazy Did you try overriding the source with I want to work on this anyways, though. |
…sub directories This is what cargo does for git repositories. See related issues: * nix-community/crate2nix#53 * nix-community/crate2nix#33
I submitted a pull request for that to nixpkgs: NixOS/nixpkgs#82155 If you do not want to wait for this, you can override the "workspace_member" argument of buildRustCrate which allows specifying a subdirectory. |
It landed on master but not yet on Fix is waiting here: https://github.com/kolloch/crate2nix/tree/pkolloch-auto-workspace-member |
Cargo does this for git repositories as well: rust-lang/cargo#1462 (comment) This will fix #33, #53 -- integration tests pending. It depends on a nixpkgs buildRustCrate feature PR: NixOS/nixpkgs#82155
Cargo does this for git repositories as well: rust-lang/cargo#1462 (comment) This will fix #33, #53 -- integration tests pending. It depends on a nixpkgs buildRustCrate feature PR: NixOS/nixpkgs#82155
Cargo does this for git repositories as well: rust-lang/cargo#1462 (comment) This will fix #33, #53 -- integration tests pending. It depends on a nixpkgs buildRustCrate feature PR: NixOS/nixpkgs#82155
Merged :) |
…sub directories This is what cargo does for git repositories. See related issues: * nix-community/crate2nix#53 * nix-community/crate2nix#33 (cherry picked from commit 8a6638d)
…sub directories This is what cargo does for git repositories. See related issues: * nix-community/crate2nix#53 * nix-community/crate2nix#33 (cherry picked from commit 8a6638d)
As mentioned in #51 (comment):
When attempting to import
dbus_codegen
, I get some strange errors.Here is a minimal reproducible example for this issue
This is basically the same source that is presented on https://doc.rust-lang.org/cargo/reference/build-scripts.html#case-study-code-generation, with the addition of
use dbus_codegen;
tobuild.rs
.Here is the sort of error message I am getting:
This error seems to be slightly different from that mentioned in #51 (comment).
The text was updated successfully, but these errors were encountered: