tweag / rules_haskell

Haskell rules for Bazel.
https://haskell.build
Apache License 2.0
266 stars 80 forks source link

buildifier-fix broken On NixOS #616

Closed gdeest closed 5 years ago

gdeest commented 5 years ago

buildifier-fix is currently broken for me on master:

[huginn@frigg:~/code/rules_haskell]$ git rev-parse HEAD
f7b355a9c5da4e0b81fc60bc963cd78f0dc4fe0b

[huginn@frigg:~/code/rules_haskell]$ nix-shell --pure

[nix-shell:~/code/rules_haskell]$ bazel run //:buildifier-fix
INFO: Invocation ID: 8358a809-d09f-4a46-9398-2628f8615597
ERROR: /home/huginn/.cache/bazel/_bazel_huginn/ef11f29d626b5c3fd8622d2529b44540/external/go_sdk/BUILD.bazel:36:12: in libs attribute of go_sdk rule @go_sdk//:go_sdk: '@go_sdk//:libs' does not produce any go_sdk libs files (expected .a)
ERROR: /home/huginn/.cache/bazel/_bazel_huginn/ef11f29d626b5c3fd8622d2529b44540/external/go_sdk/BUILD.bazel:37:15: in headers attribute of go_sdk rule @go_sdk//:go_sdk: '@go_sdk//:headers' does not produce any go_sdk headers files (expected .h)
ERROR: Analysis of target '//:buildifier-fix' failed; build aborted: Analysis of target '@go_sdk//:go_sdk' failed; build aborted
INFO: Elapsed time: 4.525s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (6 packages loaded, 8 targets configured)
FAILED: Build did NOT complete successfully (6 packages loaded, 8 targets configured)

[nix-shell:~/code/rules_haskell]$ uname -a
Linux frigg 4.14.82 #1-NixOS SMP Wed Nov 21 08:24:18 UTC 2018 x86_64 GNU/Linux

cc @nmattia

mboes commented 5 years ago

Cannot reproduce. You're in a nix-shell, and I'm trying the exact same commit as you. That's worrying... I know this should not be a solution, but try bazel clean --expunge? If that works then it's a bug, but likely a bug upstream in rules_go (hence would need to file a ticket there). I really don't see how this kind of hermeticity issue would creep in, however.

gdeest commented 5 years ago

Indeed, clean --expunge seems to have solved it. Might be hard to reproduce …