Skip to content

PackageInfo::queryOutputs should not trip up on placeholders #11885

@Ericson2314

Description

@Ericson2314

Is your feature request related to a problem? Please describe.

Currently when we try to get outputs (based on a bool parameter which perhaps we can get rid of with this), we get:

 error: derivation 'caDependingOnCA' does not have valid outputs:
 error: while evaluating the output path of a derivation at <nix/derivation-internal.nix>:19:9:

   18|       value = commonAttrs // {
   19|         outPath = builtins.getAttr outputName strict;\n
     |         ^
   20|         drvPath = strict.drvPath;
error: path '/0rmq7bvk2raajd310spvd416f2jajrabcg6ar706gjbd6b8nmvks' is not in the Nix store

or so.

This is because that is a placeholder, not a read store path.

Describe the solution you'd like

We should first check if it is a placeholder, and then the path to be std::nullopt accordingly.

Describe alternatives you've considered

Arguably this whole function is a misguided mess considering #6507 though.

Additional context

Currently breaking NixOS/hydra#1421

CC @Mic92

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions