NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.06k forks source link

python3Packages.zope-configuration causes nixpkgs-review to fail on master #271738

Closed ShamrockLee closed 11 months ago

ShamrockLee commented 11 months ago

Describe the bug

A few hours ago, nixpkgs-review suddenly start to fall into the same error not related to my current work. I have it run against commits on the master branch e. g. 2580b79 (which should be known-good), and the error persists. (See the error message below.)

As zope-configuration is the only non-trivial name inside the error message, and that #266888 got merged around the time the issue happens, I suspect that it could be the cause of the nixpkgs-review failure. A later-merged issue #266970 might also be related.

Steps To Reproduce

Steps to reproduce the behavior:

  1. cd path/to/nixpkgs
  2. git switch -d 2580b79
  3. nix run github:NixOS/nixpkgs/nixos-unstable#nixpkgs-review rev HEAD
  4. See error.

Expected behavior

nixpkgs-review runs without error on the master branch.

Screenshots

Screenshot_20231203_040054

Additional context

Here's the error message:

nixpkgs (2580b79) [$]
❯ nix run nixpkgs-local-unstable#nixpkgs-review rev HEAD
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 32 (delta 22), reused 22 (delta 22), pack-reused 4
Unpacking objects: 100% (32/32), 85.44 KiB | 616.00 KiB/s, done.
From https://github.com/NixOS/nixpkgs
   2580b79ca42c..044109cfd464  master     -> refs/nixpkgs-review/0
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log
Automatic cleanup will not be performed until the file is removed.

fatal: unable to read 1586f2d274e8a3566f073a8afb49f92fb5bade77
fatal: failed to run repack

$ git worktree add /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs 044109cfd464a6c520f861917d9ceaf87012a4c8
Preparing worktree (detached HEAD 044109cfd464)
Updating files: 100% (38280/38280), done.
HEAD is now at 044109cfd464 Merge pull request #269242 from teto/add-luasnip
$ nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f <nixpkgs> --nix-path nixpkgs=/home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs nixpkgs-overlays=/tmp/tmpkj751u4x -qaP --xml --out-path --show-trace --no-allow-import-from-derivation
error:
       … while calling 'func'

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/pkgs/development/interpreters/python/passthrufun.nix:26:20:

           25|       valid = value: pythonPackages.hasPythonModule value || providesSetupHook value || lib.elem value exceptions;
           26|       func = name: value:
             |                    ^
           27|         if lib.isDerivation value then

       … from call site

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/pkgs/development/interpreters/python/passthrufun.nix:27:12:

           26|       func = name: value:
           27|         if lib.isDerivation value then
             |            ^
           28|           lib.extendDerivation (valid value || throw "${name} should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.") {} value

       … while calling 'isDerivation'

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/lib/attrsets.nix:684:5:

          683|     # Value to check.
          684|     value: value.type or null == "derivation";
             |     ^
          685|

       … from call site

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/pkgs/top-level/python-packages.nix:16192:24:

        16191|
        16192|   zope-configuration = callPackage ../development/python-modules/zope-configuration { };
             |                        ^
        16193|

       … while calling 'callPackageWith'

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/lib/customisation.nix:152:35:

          151|   */
          152|   callPackageWith = autoArgs: fn: args:
             |                                   ^
          153|     let

       … from call site

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/lib/customisation.nix:201:15:

          200|       # Only show the error for the first missing argument
          201|       error = errorForArg missingArgs.${head (attrNames missingArgs)};
             |               ^
          202|

       … while calling 'errorForArg'

         at /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs/lib/customisation.nix:188:21:

          187|
          188|       errorForArg = arg:
             |                     ^
          189|         let

       error: cannot coerce a Boolean to a string
$ git worktree remove -f /home/shamrock/.cache/nixpkgs-review/rev-2580b79ca42c46225339ad80d4d29894659e31ed/nixpkgs
Traceback (most recent call last):
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/bin/.nixpkgs-review-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/__init__.py", line 10, in main
    cli.main(command, args)
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/cli/__init__.py", line 334, in main
    return cast(str, args.func(args))
                     ^^^^^^^^^^^^^^^
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/cli/rev.py", line 14, in rev_command
    return review_local_revision(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/review.py", line 582, in review_local_revision
    review.review_commit(builddir.path, args.branch, commit, staged, print_result)
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/review.py", line 310, in review_commit
    self.build_commit(branch_rev, reviewed_commit, staged),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/review.py", line 161, in build_commit
    base_packages = list_packages(
                    ^^^^^^^^^^^^^^
  File "/nix/store/ppzlk1sd8f284jfpwja84ffv7zz03kik-nixpkgs-review-2.10.3/lib/python3.11/site-packages/nixpkgs_review/review.py", line 398, in list_packages
    raise NixpkgsReviewError(
nixpkgs_review.errors.NixpkgsReviewError: Failed to list packages: nix-env failed with exit code 1

Notify maintainers

@natsukium

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.55, NixOS, 23.05 (Stoat), 23.05.20231007.5a237ae`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.2`
 - nixpkgs: `/nix/store/hwqz0b3d0wcyjvb4fda1wf8lhj4vaa4m-source`

Priorities

Add a :+1: reaction to issues you find important.

ShamrockLee commented 11 months ago

271724 seems to fix this issue. Now nixpkgs-review works fine. :tada:

natsukium commented 11 months ago

Sorry for the breakage.