-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong unused binding #148
Comments
|
You can evaluate this expression without |
Either way Point remains, |
The problem here is: In libnixf we treat See the image below: Case 1:
That's the reason why Footnotes
|
I do agree that this might be or not an issue depending on how we define "using"... |
In I do see, that the use of the unused binding in the pattern slightly improves the error message in case of calling the function wrong, I also see the benefits in using Vipers original example and how it enables the usage of Still, I consider the warning "unused binding" correct, as the binding itself remains unused. I would prefer an explicit "
As seen above, its not about how we define "unused", it is about the object it describes. |
Is it unused binding? Yes. But if you remove it doesn't eval properly. I found a couple of cases in nixpkgs in the rocm section. EDIT: specifically rocfft |
Can you please point out exact sources in nixpks where removal of an unused pattern would break an otherwise working expression? As said, I see that there might be an improved error reporting in the case of existence of the binding in the pattern if its not being passed in. Though technically this binding remains unused. |
|
@lucasew again, unused, after removing it and fixing the callsite, the result is still the same…
diff --git a/pkgs/development/rocm-modules/5/default.nix b/pkgs/development/rocm-modules/5/default.nix
index c1ffd01c8061..7f9a9bbe9338 100644
--- a/pkgs/development/rocm-modules/5/default.nix
+++ b/pkgs/development/rocm-modules/5/default.nix
@@ -156,7 +156,7 @@ in rec {
hiprand = rocrand; # rocrand includes hiprand
rocfft = callPackage ./rocfft {
- inherit rocmUpdateScript rocm-cmake rocrand rocfft clr;
+ inherit rocmUpdateScript rocm-cmake rocrand clr;
inherit (llvm) openmp;
stdenv = llvm.rocmClangStdenv;
};
diff --git a/pkgs/development/rocm-modules/5/rocfft/default.nix b/pkgs/development/rocm-modules/5/rocfft/default.nix
index d7a0d0e81ba8..43183da77baa 100644
--- a/pkgs/development/rocm-modules/5/rocfft/default.nix
+++ b/pkgs/development/rocm-modules/5/rocfft/default.nix
@@ -1,5 +1,4 @@
{
- rocfft,
lib,
stdenv,
fetchFromGitHub,
So the binding is indeed unused and does not have any effect on the returned derivation. |
Try to run that parallel eval workflow that CI uses. |
Which are you talking about? Again, the bindings are obviously unused, and as we do not have an And even when evaluated in parallel, I don't see any reason why the drv-path should change, as the drv is unchanged. |
https://github.com/NixOS/nixpkgs/actions/runs/12679250046/job/35338568046?pr=372224 |
Please review my diff carefully and fix your "proof of concept", I even wrote "after fixing the call site". |
nil reports an
unused_binding
onhello
, while it is not the case.The text was updated successfully, but these errors were encountered: