Open dpc opened 1 month ago
As a workaround I can just use rev=$(git rev-parse ${tag}^{commit})
to always point at the commit it in all invocations.
Git fetching has been revised significantly since 2.18. Could you try with 2.24?
AFAICT, still happens with nix_2_23
Describe the bug
We are trying to rely on Nix deterministic building and I found some weird behavior.
when building using local
git+file:
vs remotegithub
to the same tag reference, we see different results.and
This is because we embedd the the git tag passed by the Nix/flake into our binary, as a post processing step. I investigated the diff between binaries and indeed it seems that in the local invocation Nix will pass the object id of the annotated tag itself vs object id of the commit that the tag points at. Both IDs resolve to the same commit ID:
However after trying to use
rev=
version of the commit itself in both invocations to compare the results:now all the invocations (even one that had a weird behavior before) are giving the same (
2ac5afee3e
) result, so it looks like something about the caching kicked in and bandaided the issue.Expected behavior
I guess Nix should peel of the tag -> commit indirection to make all invocations use the same git rev.
nix-env --version
outputAdditional context na
Priorities
Add :+1: to issues you find important.