Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

alexbiehl
Copy link
Member

@alexbiehl alexbiehl commented Oct 23, 2017

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!

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.
Copy link
Member

@23Skidoo 23Skidoo left a comment

Choose a reason for hiding this comment

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

LGTM.

@23Skidoo
Copy link
Member

23Skidoo commented Nov 3, 2017

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

@alexbiehl
Copy link
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants