Skip to content
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

rely on function autocalling #549

Merged
merged 1 commit into from
Feb 15, 2025
Merged

Conversation

CobaltCause
Copy link
Contributor

Instead of the current behavior of always trying to call the expression as a function, or alternatively, trying to implement autocalling manually with builtins.isFunction.

Fixes #285.

Instead of the current behavior of always trying to call the expression
as a function, or alternatively, trying to implement autocalling
manually with `builtins.isFunction`.
@CobaltCause
Copy link
Contributor Author

FWIW, it looks like this chunk of code was originally added in 3cca1af and d5a5df7, the former added the --file/--expr conditional selection while expecting the expression to never be a function in the --expr case, the latter of which changed it to expect it to always be a function in the --expr case. Meanwhile, the --file case has been doing autocalling the whole time. I'm not sure why the --expr case exists in the first place though, because the --file path attr functionality has existed since at least 2.4.

@Mic92
Copy link
Member

Mic92 commented Feb 15, 2025

@mergify queue

Copy link
Contributor

mergify bot commented Feb 15, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 2e82170

@mergify mergify bot merged commit 2e82170 into nix-community:master Feb 15, 2025
7 checks passed
@CobaltCause CobaltCause deleted the autocalling branch February 15, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: attempt to call something which is not a function but a set
2 participants