You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I keep hitting a heisenbug in #198963, where we get make: /usr/bin/env: No such file or directory. this is triggered because, per @SuperSandro2000's suggestion, we split setup into postPatch and preBuild. this makes intuitive sense, because the former is a bunch of nix related in place substitutions, and the latter is a pre-build code generation phase.
because this suggestion came late in the development process, I had already seeded a fod into the nix store, with a single preBuild containing all the logic. as such, when I broke them apart, the derivation was broken, but it worked on my system. this caused a large amount of delay, and probably annoyed @SuperSandro2000, sorry.
I understand the logic of wanting to share preBuild between the main derivation and go-module, but most authors will not be clear that only preBuild gets shared, and it needs to work without other hooks.
Steps To Reproduce
Steps to reproduce the behavior:
make a buildGoModule derivation with both preBuildvendorHash attrs
successfully build the derivation
split preBuild in two (say postPatch and preBuild) such that preBuild alone is not enough
confirm that it builds successfully locally
confirm that it fails to build on empty nix store
Expected behavior
I would have expected that we pass all the hooks or none. I know we already have modBuildPhase, and maybe that is the correct way to pass things like preBuild or postPatch, e.g. modPreBuild and modPostPatch respectively. the ux for this would not be too bad: modPreBuild = preBuild;, but I get that this is a breaking change.
Notify maintainers
@NixOS/golang
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
yep, no rush. I opened the issue half to document what went wrong, so that other people searching this might find it. I am also happy to help, if you can sketch out what your proposed solution would be, e.g. my naive modPreBuild suggestion.
Describe the bug
I keep hitting a heisenbug in #198963, where we get
make: /usr/bin/env: No such file or directory
. this is triggered because, per @SuperSandro2000's suggestion, we split setup intopostPatch
andpreBuild
. this makes intuitive sense, because the former is a bunch of nix related in place substitutions, and the latter is a pre-build code generation phase.because this suggestion came late in the development process, I had already seeded a fod into the nix store, with a single
preBuild
containing all the logic. as such, when I broke them apart, the derivation was broken, but it worked on my system. this caused a large amount of delay, and probably annoyed @SuperSandro2000, sorry.I understand the logic of wanting to share
preBuild
between the main derivation andgo-module
, but most authors will not be clear that onlypreBuild
gets shared, and it needs to work without other hooks.Steps To Reproduce
Steps to reproduce the behavior:
buildGoModule
derivation with bothpreBuild
vendorHash
attrspreBuild
in two (saypostPatch
andpreBuild
) such thatpreBuild
alone is not enoughExpected behavior
I would have expected that we pass all the hooks or none. I know we already have
modBuildPhase
, and maybe that is the correct way to pass things likepreBuild
orpostPatch
, e.g.modPreBuild
andmodPostPatch
respectively. the ux for this would not be too bad:modPreBuild = preBuild;
, but I get that this is a breaking change.Notify maintainers
@NixOS/golang
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: