-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
haskell modules: Make 17.09 forwards compatible #34557
haskell modules: Make 17.09 forwards compatible #34557
Conversation
Uh shouldn't this be against 17.09? |
Also please add a comment on each ellipsis saying why. Otherwise looks good, thanks. |
@Ericson2314 I think the point here is to make sure that you can use |
@dhess yeah but to do that we need to allow passing the extra argument for both, and just have it be unused on, 17.09, so the extra unused parameter or ellipses (I actually prefer extra parameter, come to think of it, too) goes on 17.09. |
@Ericson2314 OK, thanks for the clarification. (I am not the author but am eagerly awaiting the fix ;) |
NP. I'd do it myself but I'm on my phone. |
@@ -6,6 +6,7 @@ | |||
, initialPackages ? import ./initial-packages.nix | |||
, configurationCommon ? import ./configuration-common.nix | |||
, configurationNix ? import ./configuration-nix.nix | |||
, ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not add ellipsis here. I don't want these functions to accept any random argument without an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll use makePackgeSet
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry, but that is not what I meant. Please don't accept ...
arguments at all. I don't want any of these functions to take random arguments without an error.
I added the comments. and addressed @peti remark Ellipsis is added to create (some kind of) backward compatibility. With ellipsis, when argument list is extended in master, we can still support both master and release just by passing extra arguments. |
Yeah could you do |
But it is a required argument, it should never be null. What's wrong with the ellipsis? |
@4e6 you missed me saying this PR should point at |
I went ahead and changed the branch for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please accept specific arguments rather than using ...
.
You also need to rebase your PR relative to the current release-17.09
branch.
1363ee5
to
df8e9d0
Compare
I didn't get that we are talking about merging into |
Looks great now. Thanks! |
Oops meant to squash, but it didn't do it. Oh well. |
Motivation for this change
Recent commit 8155312 introduced new
buildHaskellPackages
argument and broke compatibility with 17.09Now if we call
makePackageSet
in 17.09 with the new argument it fails withcalled with unexpected argument ‘buildHaskellPackages’
.This PR adds an ellipsis
(...)
to preventcalled with unexpected argument
errors in the future:cc @Ericson2314
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)