libfetchers: Fix lazy attribute comparisons - #16430
Conversation
f336db8 to
2ad624c
Compare
|
Ah amazing, revCount in shallow clones also doesn't work properly here. @roberth any thoughts? So it was being compared after all (though just by pointer equaility - which is not good). I do think that deep comparison is the right approach here of course but something needs to be done about not relying on pointer equality. I'll do a quick hack for this particular issue but I hope you have better ideas. |
|
Maybe we can indicate a lack of |
2ad624c to
56c9611
Compare
|
Ok looks like I hacked up something, but I utterly hate it. Seems like the only way is to short-circuit Attr comparison of attribute is unavailable - i.e. missing like with revCount case. Maybe it's fine and I'm overthinking it. |
Comparison was erroneously shallow, which lead to lock file comparison returning garbage on `flake update` commit message. Also make code more concise (specifically operator<=> defaulting also defaults operator== and operator!=, though defining it explicitly doesn't - only = default does that).
56c9611 to
ce0aa19
Compare
Motivation
Comparison was erroneously shallow and comparing pointers without also considering LazyAttr producing the same value equivalent with another non-lazy attr, which lead to lock file comparison returning garbage on
flake updatecommit message (and stderr output).Also make code more concise (specifically operator<=> defaulting also defaults operator== and operator!=, though defining it explicitly doesn't - only = default does that).
Context
Reported in #15772 (comment). cc @SuperSandro2000
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.