Skip to content

tests: fix getOutput on stubs#4050

Merged
rycee merged 1 commit intonix-community:masterfrom
ncfavier:stubs-outputs
Jun 4, 2023
Merged

tests: fix getOutput on stubs#4050
rycee merged 1 commit intonix-community:masterfrom
ncfavier:stubs-outputs

Conversation

@ncfavier
Copy link
Copy Markdown
Member

@ncfavier ncfavier commented Jun 2, 2023

Currently, stub packages can't be used with getExe, see #3291 (comment).

Setting outputSpecified prevents getOutput from descending into outputs, which don't have an overridden outPath.

Alternatives:

  • removing all outputs makes things fail
  • also overriding outPath in outputs is more code

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

@ncfavier ncfavier mentioned this pull request Jun 2, 2023
7 tasks
@ncfavier
Copy link
Copy Markdown
Member Author

ncfavier commented Jun 2, 2023

Another fix was necessary on top of that because the i3 tests have a stub for i3 but still expect it to be used in a derivation here. This used to work by accident because out was different from the base derivation.

@ncfavier ncfavier requested a review from rycee June 3, 2023 10:06
Setting `outputSpecified` prevents `getOutput` from descending into
outputs, which don't have an overridden `outPath`.

Additionally, use `__spliced` to permit derivations to use the dummy as
an input.
@rycee rycee merged commit 221056c into nix-community:master Jun 4, 2023
@rycee
Copy link
Copy Markdown
Member

rycee commented Jun 4, 2023

Looks good to me! Merged to master now.

@ncfavier ncfavier deleted the stubs-outputs branch June 4, 2023 08:33
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

Successfully merging this pull request may close these issues.

2 participants