libexpr: print value of what is attempted to be called as function#9818
Merged
roberth merged 1 commit intoNixOS:masterfrom Jan 22, 2024
Merged
Conversation
Member
|
(very minor thing, but there is a |
|
🎉 All dependencies have been resolved ! |
Low-hanging fruit in the spirit of NixOS#9753 and NixOS#9754 (means 9999years did all the hard work already). This basically prints out what was attempted to be called as function, i.e. map (import <nixpkgs> {}) [ 1 2 3 ] now gives the following error message: error: … while calling the 'map' builtin at «string»:1:1: 1| map (import <nixpkgs> {}) [ 1 2 3 ] | ^ … while evaluating the first argument passed to builtins.map error: expected a function but found a set: { _type = "pkgs"; AAAAAASomeThingsFailToEvaluate = «thunk»; AMB-plugins = «thunk»; ArchiSteamFarm = «thunk»; BeatSaberModManager = «thunk»; CHOWTapeModel = «thunk»; ChowCentaur = «thunk»; ChowKick = «thunk»; ChowPhaser = «thunk»; CoinMP = «thunk»; «18783 attributes elided»}
6d22d72 to
81499a0
Compare
Member
Author
roberth
approved these changes
Jan 22, 2024
Member
|
Thanks! |
tebowy
pushed a commit
to tebowy/nix
that referenced
this pull request
Jul 11, 2024
…type-error libexpr: print value of what is attempted to be called as function (cherry picked from commit 50e5d7b) Change-Id: I7cb6290bd8f244e83bfce3b2eed2a4c8b4f16a83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Depends on #9753
This basically prints out what was attempted to be called as function,
i.e.
map (import {}) [ 1 2 3 ]
now gives the following error message:
Remains a draft until #9753 (the parent of this PR) is merged.
Context
Low-hanging fruit in the spirit of #9753 and #9754 (means 9999years did
all the hard work already), but for
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.