lib.types.defaultTypeMerge: refactor functor.{payload,wrapped} merging#350906
lib.types.defaultTypeMerge: refactor functor.{payload,wrapped} merging#350906infinisil merged 1 commit intoNixOS:masterfrom
Conversation
7f14388 to
dbc5ee1
Compare
82f7630 to
7de011e
Compare
7de011e to
81ca8b5
Compare
|
The need to flip the order isn't obvious to me, can you explain that? |
I have two arguments mainly:
|
|
As a reminder, me and @hsjobeki just had a meeting where we looked at this and improved it to a point where I think it's ready to merge. Still needs to be pushed and the PR title/description updated though :) |
81ca8b5 to
b978799
Compare
|
@infinisil Just pushed all the updates we made. So maybe we should add a warning instead of a hard failure? |
|
This would be a potential problem with the (written next to @hsjobeki in Zürich #ZurichZHF :)) |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Refactors
defaultTypeMergepayloadandwrappedat the same time are now an explicit error.This shouldn't have worked before and will now be an explicit error.
If anyone relies on having both they should decide. While I recommend using
payload.elemTypetogether with binOp.See the existing types that use
functor.payloadfor examples.What also changed:
This change is related to #344216 because it is a type that needed both wrapped and payload.
In the long term
.wrappedshould be removed because all of its purpose can also be done viapayload.elemTypethis removes one order of complexity from themerge logic matrixThings done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.