Skip to content

Add .doc derivation to test components #1982

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

Merged
merged 4 commits into from
Jun 16, 2023

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Jun 15, 2023

This adds a .doc as it is available on <package>.components.library.doc also to test components <package>.components.tests.<test>.doc, for example https://github.com/input-output-hk/hydra/blob/77c612f2540bcca6cc43ca5c6c7094e35f0edd12/flake.nix#L53.

The output paths follow a similar pattern as cabal-install would produce (despite the fact that it puts things into completely different prefixes) and are easily combinable as also seen in the above link. For example a package with name "foo" and test suite "bar" will
have output paths:

$doc/share/doc/foo/html/index.html # library haddocks
$doc/share/doc/foo/html/bar/index.html # bar test suite haddocks

ch1bo added 3 commits June 15, 2023 23:35
Haddocks are built with --tests if we are in a test component.
Haddock will generate a <componentName>/ directory within this path
automatically. So a package with name "foo" and test suite "bar" will
have docdir paths:

$doc/share/doc/foo/html/index.html # library haddocks
$doc/share/doc/foo/html/bar/index.html # bar test suite haddocks
Makes the cleanup step search more liberally for .html files to remove
references from. This is needed because test suite haddocks are placed
in a <package-name>/html/<test suite name>/ subdirectory.
@hamishmack hamishmack merged commit 2942f93 into input-output-hk:master Jun 16, 2023
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