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

Fix failures with pkgs/top-level/release-attrpaths-superset.nix #319220

Merged
merged 3 commits into from
Jun 30, 2024

Conversation

RossComputerGuy
Copy link
Member

@RossComputerGuy RossComputerGuy commented Jun 12, 2024

Description of changes

Fixes #319147

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@RossComputerGuy RossComputerGuy changed the title pkgs/top-level/release-attrpaths-superset.nix: add attributes to skipt o prevent #319147 pkgs/top-level/release-attrpaths-superset.nix: add attributes to skipt to prevent #319147 Jun 12, 2024
@RossComputerGuy RossComputerGuy changed the title pkgs/top-level/release-attrpaths-superset.nix: add attributes to skipt to prevent #319147 Fix failures with pkgs/top-level/release-attrpaths-superset.nix Jun 13, 2024
@RossComputerGuy RossComputerGuy marked this pull request as ready for review June 13, 2024 17:41
@tomberek
Copy link
Contributor

Adding optionalAttrs and protection from non-existent attribute.

@tomberek tomberek requested a review from lheckemann June 15, 2024 01:45
Copy link
Contributor

@tomberek tomberek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better. Requesting @lheckemann as well, if available.

@philiptaron philiptaron requested a review from lf- June 29, 2024 15:53
Copy link
Member

@lf- lf- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly lgtm but I'm not super stoked we're turning off an entire suite of which a lot looks applicable

@@ -99,6 +99,8 @@ let
in

{
__attrsFailEvaluation = stdenv.isDarwin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the most pleased this entire suite is turned off on Darwin. It's ok if necessary but it's a little unfortunate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it had a funky error without it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be an issue, idk why it's a problem. I kinda didn't feel like diving into figuring out why this was happening so the easiest solution was to just disable on Darwin. Linux targets work so this is a Darwin only issue. If this isn't a blocker and we can't find a solution before this PR is merged, a follow up PR to properly fix it should be fine.

error:
       … while calling the 'map' builtin

         at /home/ross/ExpidusOS/nixpkgs/pkgs/top-level/release-attrpaths-superset.nix:193:5:

          192|   names =
          193|     map (path: (lib.concatStringsSep "." path)) paths;
             |     ^
          194|

       … while evaluating a branch condition

         at /home/ross/ExpidusOS/nixpkgs/pkgs/top-level/release-attrpaths-superset.nix:162:9:

          161|       result =
          162|         if tried.success
             |         ^
          163|         then tried.value

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute '__bootPackages' missing

       at /home/ross/ExpidusOS/nixpkgs/pkgs/test/stdenv/default.nix:13:17:

           12|   earlyPkgs = stdenv.__bootPackages.stdenv.__bootPackages;
           13|   earlierPkgs = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages;
             |                 ^
           14|   # use a early stdenv so when hacking on stdenv this test can be run quickly

Copy link
Member

@lf- lf- Jun 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's got to be a way to fix this better because __bootPackages is certainly not the only attr that is broken in the entirety of nixpkgs, right?? oh i see, this test seems to be making a bunch of pretty linuxy assumptions about the stdenv bootstrap structure.

but can you add a FIXME above that disabling, if you do want to defer it; with that change this is lgtm without figuring this out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also cc @reckenrode as a darwin maintainer noting that this was deferred.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but can you add a FIXME above that disabling, if you do want to defer it; with that change this is lgtm without figuring this out.

Will do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the note.

@lf- lf- merged commit b8946c1 into NixOS:master Jun 30, 2024
21 checks passed
@RossComputerGuy RossComputerGuy deleted the fix/test-infinite-recurse branch June 30, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nixpkgs-lib test pkgs/top-level/release-attrpaths-superset.nix infinite recurses on eval-system=aarch64-darwin
5 participants