Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
356 stars 59 forks source link

error: attribute missing #266

Open hmenke opened 2 years ago

hmenke commented 2 years ago

When I tried to review a PR using nix-shell -p nixpkgs-review --run "nixpkgs-review pr 169058" I received an error about a missing attribute:

$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs release-21.11:refs/nixpkgs-review/0 pull/169058/head:refs/nixpkgs-review/1
$ git worktree add /home/henri/.cache/nixpkgs-review/pr-169058-1/nixpkgs c093b038d8df8bfcec81d62219b093440adf3e53
Preparing worktree (detached HEAD c093b038d8d)
Updating files: 100% (29052/29052), done.
HEAD is now at c093b038d8d Merge pull request #168903 from NixOS/backport-168855-to-release-21.11
$ git merge --no-commit --no-ff 6bee0550531bf20a7e291393ded04402c3808b30
Automatic merge went well; stopped before committing as requested
$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/henri/.cache/nixpkgs-review/pr-169058-1/build.nix
error: attribute 'bijiben' missing

       at /home/henri/.cache/nixpkgs-review/pr-169058-1/build.nix:71:9:

           70|         gnome-recipes
           71|         gnome."bijiben"
             |         ^
           72|         gnome."cheese"
(use '--show-trace' to show detailed location information)

What is weird, however, is that when I take the command before the error and paste it into the spawned shell it runs through without problems.

nixpkgs-review version: https://github.com/NixOS/nixpkgs/blob/faad370edcb37162401be50d45526f52bb16a713/pkgs/tools/package-management/nixpkgs-review/default.nix

SuperSandro2000 commented 2 years ago

That is a bug in ofborg or a stale ofborg result. Try nix-shell -p nixpkgs-review --run "nixpkgs-review pr --eval local 169058"

Mic92 commented 2 years ago

This might also resolve it: rm -r /home/henri/.cache/nixpkgs-review

hmenke commented 2 years ago

Thank you, this works really well! Would it be possible to print a more helpful error message in these cases or automatically attempt a local evaluation?

SuperSandro2000 commented 2 years ago

Yeah, we should display a better error message but I am against trying another eval because it uses a lot of RAM.