Open tazjin opened 1 year ago
very good find, thanks for the report!
For context, I came across this earlier after somebody linked me statix and I looked into how to implement some of these lints as compiler warnings in Tvix (a modern rewrite of Nix, including a compatible language evaluator).
I don't know how invested you are in Nix and a project like this, but I think there's some potential for joining forces as our compiler has much deeper understanding of Nix code than just lexical analysis but we're not anywhere near the full potential for emitting warnings and other types of lints.
btw, I have a few more issues like this which I found, I can report them all but they start sounding very nitpicky eventually :sweat_smile:
i would love to pitch in where i can, i've been following tvix since i saw an announcement on lobste.rs a few months ago!
Cool! If you're a chat kind of person, you can join us via IRC on irc.hackint.org
in #tvl
, we also have a public-inbox for email.
Could give you some pointers for how our current warnings/lints infrastructure works and such (I actually made some changes to that today inspired by statix).
sounds perfect, ill check in on irc first thing tomorrow!
This reduction can only be applied if the inner
let
does not shadow any bindings, consider:statix
wants to collapse this toWhich no longer evaluates.