Skip to content

directlySelectedComponents sometimes contains values without a name attribute causing hard to troubleshoot error messages  #1717

Open
@MangoIV

Description

@MangoIV

Hi, I have a flake that uses the stackProject' function that, when trying to nix develop .#ghc90, errs with:

error: attribute 'name' missing

       at /nix/store/y0ms7njp08lwimby8wf6dbwv0m3ax4x7-source/lib/default.nix:136:37:

          135|     let
          136|       makePairs = map (p: rec { key=val.name; val=(p.components.library or p); });
             |                                     ^
          137|       closure = builtins.genericClosure {

I think the issues is caused by flatLibDepends being called by a depends = directlySelectedComponents that has attributes that don't have a name attribute, i.e. components hsPkgs is either incorrect or hsPkgs doesn't contain the right thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions