Skip to content
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

Running pr 187960 causes undefined variable 'kdialog' on buildable PR. #278

Open
soupglasses opened this issue Oct 3, 2022 · 6 comments

Comments

@soupglasses
Copy link

When running nixpkgs-review pr 187960 for NixOS/nixpkgs/pull/187960 it fails with an error:

Log output
…/nixpkgs master *1 % nixpkgs-review pr 187960
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/187960/head:refs/nixpkgs-review/1
remote: Enumerating objects: 67841, done.
remote: Counting objects: 100% (44650/44650), done.
remote: Compressing objects: 100% (14262/14262), done.
remote: Total 37516 (delta 25458), reused 32032 (delta 20708), pack-reused 0
Receiving objects: 100% (37516/37516), 19.62 MiB | 7.69 MiB/s, done.
Resolving deltas: 100% (25458/25458), completed with 1016 local objects.
From https://github.com/NixOS/nixpkgs
   3b104056ffa..960e4e772bf  master                -> refs/nixpkgs-review/0
   3fcf17c3484..1abe038db93  refs/pull/187960/head -> refs/nixpkgs-review/1
$ git worktree add /home/sofi/.cache/nixpkgs-review/pr-187960/nixpkgs 960e4e772bff4c1900e5730df1d1da9016c17aa5
Preparing worktree (detached HEAD 960e4e772bf)
Updating files: 100% (32107/32107), done.
HEAD is now at 960e4e772bf input-remapper: 1.4.2 -> 1.5.0 (#191967)
$ git merge --no-commit --no-ff 1abe038db935f54db3669d705ebb3cd05a4651fd
Auto-merging pkgs/top-level/all-packages.nix
Automatic merge went well; stopped before committing as requested
error: undefined variable 'kdialog'

       at /home/sofi/.cache/nixpkgs-review/pr-187960/nixpkgs/pkgs/games/heroic/fhsenv.nix:18:5:

           17|     gnome.zenity
           18|     kdialog
             |     ^
           19|     mangohud
(use '--show-trace' to show detailed location information)
nix --experimental-features nix-command --system x86_64-linux eval --json --impure --expr (import /nix/store/77glclqj7xxhk5x8iw25xy859h4p4a6j-nixpkgs-review-2.7.0/lib/python3.10/site-packages/nixpkgs_review/nix/evalAttrs.nix { allowAliases = false; attr-json = /tmp/tmppxi692hg; }) failed to run, /tmp/tmppxi692hg was stored inspection
https://github.com/NixOS/nixpkgs/pull/187960 failed to build
$ git worktree prune

But if you pull the same git hash 1abe038db935f54db3669d705ebb3cd05a4651fd manually and run nix build .#heroic. It builds correctly without error.

@soupglasses
Copy link
Author

Likely related: #200

This is a specific issue with logs and a git hash however. This issue also seems to happen between multiple commits as well. 3a03707a34db94fbf8f32d097523fdea2561e714 also showed the same behaviour.

@vcunat
Copy link

vcunat commented Oct 12, 2022

That's bug in the PR and not in the tool. kdialog is a deprecated top-level alias and nixpkgs is strict about this. Right now that's blocking the nixos-unstable channel via https://hydra.nixos.org/build/195122787

@vcunat
Copy link

vcunat commented Oct 12, 2022

NixOS/nixpkgs#195628

@soupglasses
Copy link
Author

This might be an issue to put elsewhere, but what confuses me is how it was buildable on seemingly all systems without error, but nixpkgs-review complained about the exact same git hash.

Guessing it has to do with the evalAttrs.nix { allowAliases = false; ... } in nixpkgs-review. Maybe there should be some specification to the error message similar to undefined variable x (might be an alias?) to help debugging?

@vcunat
Copy link

vcunat commented Oct 12, 2022

I can't see how to do such a message, I'm afraid.

@vcunat
Copy link

vcunat commented Oct 12, 2022

Maybe this one will help in future: NixOS/rfcs#127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants