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

Publish fails to evaluate flake attributes #178

Open
ipetkov opened this issue Nov 30, 2024 · 2 comments
Open

Publish fails to evaluate flake attributes #178

ipetkov opened this issue Nov 30, 2024 · 2 comments

Comments

@ipetkov
Copy link

ipetkov commented Nov 30, 2024

Error

https://github.com/ipetkov/crane/actions/runs/12098492773/job/33735063127

Error: 
   0: failed to evaluate all system attrs of the flake
   1: Failed to execute command `nix flake show --all-systems --json --no-write-lock-file /nix/store/sbcvc2f9ys9j92nvxvscb6wqmghs0511-source` with status 1 
      stdout: 
      stderr: evaluating ''...
      unpacking 'https://github.com/NixOS/nixpkgs/archive/5083ec887760adfe12af64830a66807423a859a7.tar.gz' into the Git cache...
      unpacking 'https://github.com/oxalica/rust-overlay/archive/0be641045af6d8666c11c2c40e45ffc9667839b5.tar.gz' into the Git cache...
      evaluating 'checks'...
      evaluating 'checks.aarch64-darwin'...
      evaluating 'checks.aarch64-darwin.bzip2Sys'...
      evaluating 'checks.aarch64-darwin.cargoAuditTests'...
      evaluating 'checks.aarch64-darwin.cargoClippyThenBuild'...
      evaluating 'checks.aarch64-darwin.cargoDenyTests'...
      evaluating 'checks.aarch64-darwin.cargoFmt'...
      evaluating 'checks.aarch64-darwin.cargoFmtThenClippy'...
      evaluating 'checks.aarch64-darwin.cargoLlvmCov'...
      evaluating 'checks.aarch64-darwin.cargoLockOverride'...
      evaluating 'checks.aarch64-darwin.chainedMultiple'...
      evaluating 'checks.aarch64-darwin.cleanCargoTomlTests'...
      evaluating 'checks.aarch64-darwin.clippy'...
      evaluating 'checks.aarch64-darwin.codesign'...
      evaluating 'checks.aarch64-darwin.compilesFreshOverlappingTargets'...
      evaluating 'checks.aarch64-darwin.compilesFreshSimple'...
      evaluating 'checks.aarch64-darwin.compilesFreshSimpleBuildPackage'...
      evaluating 'checks.aarch64-darwin.compilesFreshWithBuildScript'...
      evaluating 'checks.aarch64-darwin.compilesFreshWithBuildScriptCustom'...
      evaluating 'checks.aarch64-darwin.compilesFreshWithCustomTargetDir'...
      evaluating 'checks.aarch64-darwin.compilesFreshWorkspace'...
      evaluating 'checks.aarch64-darwin.craneUtilsChecks'...
      evaluating 'checks.aarch64-darwin.cratePatching'...
      evaluating 'checks.aarch64-darwin.customCargoTargetDirectory'...
      evaluating 'checks.aarch64-darwin.customDummy'...
      error:
             … while evaluating a branch condition
               at /nix/store/n1g84klfb0h3bpwyvc59lcy5ca58h36w-source/lib/strings.nix:2627:3:
               2626|   # First detect the common case of already valid strings, to speed those up
               2627|   if stringLength string <= 207 && okRegex string != null
                   |   ^
               2628|   then unsafeDiscardStringContext string

             … in the left operand of the AND (&&) operator
               at /nix/store/n1g84klfb0h3bpwyvc59lcy5ca58h36w-source/lib/strings.nix:2627:33:
               2626|   # First detect the common case of already valid strings, to speed those up
               2627|   if stringLength string <= 207 && okRegex string != null
                   |                                 ^
               2628|   then unsafeDiscardStringContext string

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

             error: cannot build '/nix/store/vkavpsq0x1jsd4wbadpb8rkl8yf79amz-custom-dummy-0.0.0.drv^out' during evaluation because the option 'allow-import-from-derivation' is disabled


Metadata

key value
version 0.1.0
os linux
arch x86_64
2024-11-30T18:16:06.7878535Z
@simonzkl
Copy link

Sounds like IFD is not allowed on FlakeHub (#69). Was IFD added somewhere since the last successful action run?

@ipetkov
Copy link
Author

ipetkov commented Jan 14, 2025

Probably, though if that's the case the UX around this type of error is sorely lacking. Flakes enable IFD by default, I shouldn't have to dig through a huge error trace and then this here issue log to find out that's the case (perhaps the publish should gracefully fallback to not populating the flake's outputs)

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