-
Notifications
You must be signed in to change notification settings - Fork 137
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
Fix #404 Accommodate ${pkgroot} and tolerate GHC errors on Windows #405
base: master
Are you sure you want to change the base?
Conversation
…Windows CPP is used to tailor for Windows and GHC >= 9.0. In that case, ${pkgroot} is not expanded and the bogus prefix is stripped. Otherwise, ${pkgroot} is expanded. For compatibility with GHC < 9.0, $topdir is still stripped, if present.
-- haddock-html: ${pkgroot}/../doc/html/libraries/base-4.18.0.0 | ||
-- So, a unique approach is taken to `readGhcPkg` in that case. It assumes that | ||
-- the `*.conf` files have not been manually corrected. | ||
#if defined(mingw32_HOST_OS) && __GLASGOW_HASKELL__>=901 |
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.
This CPP should have an upper bound, it is fixed in 9.10.1.
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'm not sure it's a great idea to bake this logic about some broken bindists into hoogle, someone could build their own bindist which doesn't have this bug and it would be broken.
#else | ||
-- From GHC 9.0.1, the `haddock-html` field in `*.conf` files for GHC boot | ||
-- libraries has used `${pkgroot}`, which can be expanded in the output. | ||
let ghcPkgArgs = ["dump", "--expand-pkgroot"] |
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.
Using --expand-pkgroot
is a good fix.
I can confirm this fixes #420 on ghc-9.4.8 (gentoo linux) |
CPP is used (sorry) to tailor for Windows and GHC >= 9.0. In that case, ${pkgroot} is not expanded and the bogus prefix is stripped.
Otherwise, ${pkgroot} is expanded. For compatibility with GHC < 9.0, $topdir is still stripped, if present.
I confirm I am licensing my contribution under all licenses that apply to this project (see LICENSE) and that I have no patents covering my contribution.