-
Notifications
You must be signed in to change notification settings - Fork 710
Issue 5086 #5087
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
Issue 5086 #5087
Conversation
Solves haskell#5087 Related to haskell#5003 Note: `buildable: ` field has `All` semantics. `scope: ` has `AnyPrivate` semantics. Both might be surprising, but are "logical". https://hackage.haskell.org/package/Cabal-2.0.1.1/docs/src/Distribution.PackageDescription.Parse.html#line-248
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo some comments.
checkLib l = mn `elem` exposedModules l && checkExts (l ^. L.defaultExtensions) | ||
|
||
checkBI :: BuildInfo -> Bool | ||
checkBI bi = mn `elem` otherModules bi && checkExts (bi ^. L.defaultExtensions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check autogen-modules
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can
@@ -369,22 +369,15 @@ withForeignLib pkg_descr f = | |||
-- dependencies. | |||
allBuildInfo :: PackageDescription -> [BuildInfo] | |||
allBuildInfo pkg_descr = [ bi | lib <- allLibraries pkg_descr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a mention in the changelog that the semantics of this function changed. Also the Haddock comment should be updated.
/cc @mgsloan |
Looks like the test needs to be fixed. |
I have to use |
There's still a test failure on AppVeyor. |
-- all buildable executables, test suites and benchmarks. Useful for gathering | ||
-- dependencies. | ||
-- | All 'BuildInfo' in the 'PackageDescription': | ||
-- libraries, executables, test-suites and benchmarks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot foreign libraries :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libraries
I hardcoded |
Still seems to fail, plus there's now a merge conflict. I'm not force-pushing to your branch because the PR gets closed when a maintainer does that. |
51c8292
to
5cd449d
Compare
the problem with
EDIT and now as I fixed that, I cannot get it to fail locally. |
Fixes haskell#5086 The haskell#5054 links to commercialhaskell/stack#3789 which says - `Ensure you have OverloadedStrings and RebindableSyntax extensions enabled.` So we warn only in that case. Only `OverloadeStrings` (or `OverloadedLists`) or `RebindableSyntax` seems to be ok. Also make `allBuildInfos` return all (not only buildable) build infos, removing FIXME. `allBuildInfos` is used only in D.PD.Check.
Closing in favour of #5097. |
Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!