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

buildRustCrate: do not overlay OUT_PATH on src/ #78706

Merged
merged 2 commits into from Jan 30, 2020

Conversation

andir
Copy link
Member

@andir andir commented Jan 28, 2020

Motivation for this change

build.rs files might create files during the configurePhaes. Those files are supposed to go into
OUT_DIR (envirionment variable) and not be overlayed onto the source
tree. So far we did both. With this change we will only use the OUT_PATH.

fixes #78412

cc @kolloch

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

`build.rs` files might create files. Those files are supposed to go into
`OUT_DIR` (envirionment variable) and not be overlayed onto the source
tree.
@andir
Copy link
Member Author

andir commented Jan 28, 2020

@GrahamcOfBorg build buildRustCrateTests

@kolloch
Copy link
Contributor

kolloch commented Jan 28, 2020

This should also fix #74071. Just hoping that nothing depends on the old, odd behavior. Good luck! :)

@andir
Copy link
Member Author

andir commented Jan 28, 2020

This should also fix #74071. Just hoping that nothing depends on the old, odd behavior. Good luck! :)

One of my short-term goals is going to be a topN rust crates build against latest crate2nix & buildRustCrate to have a bit more visibility on the impact of such changes. I compiled a few projects with this change and they all didn't fail. I am very confident (right now) that this change will not break more then what was broken before.

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.

buildRustCrate fails to build rustversion 1.0.2
2 participants