Skip to content

Make --enable-documentation work for non-local packages - #4840

Closed
alexbiehl wants to merge 1 commit into
haskell:masterfrom
alexbiehl:pr/haddock
Closed

alexbiehl wants to merge 1 commit into
haskell:masterfrom
alexbiehl:pr/haddock

Conversation

@alexbiehl

@alexbiehl alexbiehl commented Oct 23, 2017 •

Copy link
Copy Markdown
Member

Before non-local packages would receive all their configuration like this:

  perpkg = maybe mempty f (Map.lookup (packageName pkg) perPackageConfig)

If there is no explicit configuration for a package the default mempty is used.

We add projectConfigNonLocalPackages :: PackageConfig field to ProjectConfig. projectConfigNonLocalPackages reflects cabals global configuration. Instead of falling back back to mempty directly we lookup up the desigured configuration in this new field.

  • Currently projectConfigNonLocalPackages is the same as projectConfigLocalPackages. We need to sort out what we want here.
  • Building with documentation: True does not work yet. But it will once we sort out cli defaults override new-build cabal.project settings #4737
  • Find a suitable verb: "Haddocking package-x.y (lib)..." sounds strange

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@alexbiehl
alexbiehl requested review from 23Skidoo and hvr October 23, 2017 05:58
@hvr hvr added cabal-install: v2-build system Affecting v2-build and related commands that use v2-architecture (aka "nix local builds"). Cabal: cmd/haddock labels Oct 23, 2017
Before this patch non-local packages would receive all their
configuration like this:

```
  perpkg = maybe mempty f (Map.lookup (packageName pkg) perPackageConfig)
```

If there is no explicit configuration for a package the default
`mempty` is used.

We add `projectConfigNonLocalPackages` field to
`ProjectConfig`. `projectConfigNonLocalPackages` reflects cabals global
configuration. Instead of falling back back to `mempty` directly we lookup up
the desigured configuration in this new field.

@23Skidoo 23Skidoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@23Skidoo

23Skidoo commented Nov 3, 2017

Copy link
Copy Markdown
Member

@alexbiehl There are some legit-looking failures, though, can you look into them?

@alexbiehl

Copy link
Copy Markdown
Member Author

This has been addressed in c094940.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked: action-required Cabal: cmd/haddock cabal-install: v2-build system Affecting v2-build and related commands that use v2-architecture (aka "nix local builds").

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants