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

Intermediate build not generating targets #193

Open
deifactor opened this issue Oct 9, 2021 · 1 comment
Open

Intermediate build not generating targets #193

deifactor opened this issue Oct 9, 2021 · 1 comment

Comments

@deifactor
Copy link

Using the latest version, running nix build . appears to generate a deps output with an empty target dir; /nix/store/3q39kpl5441cdi8w6ldna9f8dlmxq9wh-blah-deps-0.1.0 has a zstd file that's only 93 bytes or so.

Using df71f5e produces an actual deps output. So I think 08afb3d broke it, but I don't know enough about nix or cargo build internals to figure out why CARGO_TARGET_DIR isn't working.

@deifactor
Copy link
Author

Aha, I figured it out. It turns out that --out-path and CARGO_TARGET_DIR have different behavior.

--out-path puts the binary in the specified directory but leaves the intermediates in target. CARGO_TARGET_DIR moves everything. So I think changing the copyTarget code to look in out instead of target will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant