-
Notifications
You must be signed in to change notification settings - Fork 30
Make libdir a mandatory parameter to 'applyRefactorings' #134
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
Conversation
Binary distributions of programs depending on apply-refact are otherwise impossible, since the distributed package will contain a hard-coded path to a libdir to a GHC installation on the host system.
@@ -87,7 +88,7 @@ runPipe Options {..} file = do | |||
"Invalid extensions: " ++ intercalate ", " invalidExts | |||
m <- | |||
either (onError "runPipe") applyFixities | |||
=<< parseModuleWithArgs (enabledExts, disabledExts) file | |||
=<< parseModuleWithArgs GHC.Paths.libdir (enabledExts, disabledExts) file |
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.
Sorry, I don't understand how this fixes it. We're still using GHC.Paths.libdir here? It seems the invocation just moved.
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.
Yeah but thats the executable. The library of apply refract doesn't use it anymore. This allows the binary of apply refact to continue to work without a major overhaul
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.
So we're assuming no one wants to ship the apply-refact binary?
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.
Yeah. Doing that right now would require to migrate apply-refact to use hie-bios (or cli argument), which I am happy to do, but for HLS, this is the important bit and apply-refact can't have a binary distribution right now either.
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.
Why not write what you just said as a comment in the code here?
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 did note something similar for end users in https://github.com/mpickering/apply-refact/pull/134/files#diff-7f889a0125943a04146509ea2a668d4a40d7839f4bbd6cd1b5a8159c482d3d12R20
I will create an issue for migrating to hie-bios, however, since HLS depends on implicit-hie
, the behaviour wouldn't be uniform with hls...
LGTM, thanks for the fix. This is long overdue. |
0.12.0.0 published on Hackage. |
Binary distributions of programs depending on apply-refact are otherwise impossible, since the distributed package will contain a hard-coded path to a libdir to a GHC installation on the host system.
Fixes #133