Nix expression language warnings #1364
Labels
error-messages
Confusing messages and better diagnostics
feature
Feature request or proposal
language
The Nix expression language; parser, interpreter, primops, evaluation, etc
It'd be nice if I could opt into warnings, like I can with many compilers (e.g.,
-Wall
,-Werror
, etc. in C compilers).The most obvious warning that comes to mind would look something like this:
That would indicate if you have a
with
binding in scope while also having the same binding from the outer scope. I'm sure there are a few other "likely programmer errors" we could catch this way.Another implementation could be to have a
nix lint
subcommand in the new UI, but I'm afraid of branching the expression language handling too much from the actual evaluation of the language, so it seems like it would need to be integrated intolibexpr
somehow.Related to #1361.
The text was updated successfully, but these errors were encountered: