ipetkov / crane

A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.
https://crane.dev
MIT License
962 stars 92 forks source link

removeReferencesToVendoredSources: cache vendorDir crawling #625

Closed ipetkov closed 6 months ago

ipetkov commented 6 months ago

Motivation

There is no reason to repeatedly crawl the vendor directories for each installed file, we can easily cache the results once up front.

Fixes https://github.com/ipetkov/crane/issues/620

Checklist

9999years commented 6 months ago

I think xargs --no-run-if-empty signIfRequired is introducing an error to my build because signIfRequired is a shell function and not an executable, so xargs can't find it:

https://github.com/NixOS/nixpkgs/blob/7187b3ee8e2687106e8982b02d2890689471579e/pkgs/os-specific/darwin/signing-utils/utils.sh#L38-L43

xargs: signIfRequired: No such file or directory

Maybe we can work around by doing something like this:

https://github.com/NixOS/nixpkgs/blob/7187b3ee8e2687106e8982b02d2890689471579e/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh#L19-L21