-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib.types.defaultTypeMerge: refactor functor.{payload,wrapped} merging #350906
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: https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/72 |
Refactors
defaultTypeMerge
payload
andwrapped
at 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.elemType
together with binOp.See the existing types that use
functor.payload
for 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
.wrapped
should be removed because all of its purpose can also be done viapayload.elemType
this removes one order of complexity from themerge logic matrix
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.