-
Notifications
You must be signed in to change notification settings - Fork 698
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
Look for install includes in buildpref as well #4866
Conversation
When installing a lirbary, we should look for it's headers in it's 'build' preference first, then relative to the current path.
Alright, so ideally we'd look into the relative directories from the cabal file. This will work when the CWD is the folder containing the cabal file. However if it is not, and the generic package description in passed in, we have no handle on the location of the cabal file. Or do we? However, Looking for the include headers in the build directory, prior to trying to locate them relative to the current path seems like a sensible change to me. |
863cdba
to
a7db062
Compare
Cabal/changelog
Outdated
@@ -1,6 +1,8 @@ | |||
-*-change-log-*- | |||
|
|||
2.2.0.0 (current development version) | |||
* `copyCompoment` and `installIncludeFiles` will look for include | |||
headers in the build preference as well. |
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 say what the default build preference dir is, i.e.:
... will look for include headers in the build preference dir ('dist/build/...' by default) as well.
That's because custom setup scripts can put stuff there? OK, makes sense. /cc @dcoutts |
Can you explain the motivation and/or the problem this solving? |
scratch that. |
Alright, so you end up "generating" your headers. And they end up in the build directory, however your cabal file does addresses them relative. |
To clarify why I called this "build preference". This is due wo the variable naming of |
@angerman To the users it's either |
Oh I see; one thing though, for I think we should have the corresponding facility also for installed headers, so we can have cabal warn at |
@23Skidoo I'll update the change log to reflect that better. |
To better understand where I'm coming from. I'm currently trying to roll |
Merged, thanks! |
When installing a lirbary, we should look for it's headers in it's 'build' preference first, then relative to the current path.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!