nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.52k stars 74 forks source link

Remove Unnecessary Uses of `rec` #390

Closed sivizius closed 4 months ago

sivizius commented 5 months ago

This PR removes unnecessary usage of rec. This is not about rec sometimes considered an anti-pattern, this is about code, where this keyword can simply be removed. Because linters like statix complain, they have to configured to ignore sources.nix, which is somewhat annoying. This PR should fix that.

nmattia commented 5 months ago

EDIT: done

There's a test failure because Niv keeps track of the hashes of the different sources.nix versions:

 sources.nix
    has latest version:                   FAIL
      src/Niv/Sources/Test.hs:13:
      expected: "26ed55356db7673935329210a4f8c4a5"
       but got: "a8751de841ac5e0a60f4c2db7e8bbade"

if you want to have a go at it you can add a V29 in src/Niv/Sources.hs with hash "a87...", otherwise I'll have a look this evening!

sivizius commented 4 months ago

I do not understand the test failure or how this is related to my and your changes. Is there something I could do to finish this PR?

nmattia commented 4 months ago

It's unrelated. Thanks for the PR!