-
Notifications
You must be signed in to change notification settings - Fork 5
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
Copying code from ghc-mod rather than depending on it is _very_ fragile #12
Comments
Great! The code duplicated from ghc-mod is only used to set ghc flags according to the project's cabal file. I don't remember exactly, but I think the main reason I had to duplicate it was to fix the issue in ghc-mod where the new binary cabal format wasn't supported. It seems like this has been fixed as of the last few weeks, so I think I'll be able to remove the duplicated code. I'll make a comment here when I know for certain what (if anything) I would need to be exposed in ghc-mod. |
On Tue, Apr 28, 2015 at 07:50:33AM -0700, Izzy Meckler wrote:
Great! The code duplicated from ghc-mod is only used to set ghc
flags according to the project's cabal file. I don't remember exactly,
but I think the main reason I had to duplicate it was to fix the issue
in ghc-mod where the new binary cabal format wasn't supported.
That's odd because when I tried mote I still got the error that was
symptomatic of the Cabal-1.22 trouble.
It
seems like this has been fixed as of the last few weeks, so I think
I'll be able to remove the duplicated code.
Yeah that's all supported now.
You copied some quite old code I have since rewritten and it's a lot
more precise now (I hope), even has native support for cabal
components without requiring user intervention.
I'll make a comment here when I know for certain what (if anything)
I would need to be exposed in ghc-mod.
Ok, cool.
|
Did you install cabalparse? This was my workaround hack to address the 1.22 problem. |
Ah right, that's probably it. |
Which version of ghc-mod should I depend on? Is it on hackage? |
Well you'll have to build against the development version until I release it if you need ghc 7.10 and cabal>1.22 support. Otherwise the one from hackage is fine. Though if you need any API additions then you'll have to build against a development version anyways. I guess the best way to solve this would be to add a flag to mote's cabal file, something like ghc-mod-devl, set that to default to true and in that flag depend on You can then use your existing module doing the ghc-mod stuff with ghc-mod-5.2.x.x and use the new stuff with the devel version by setting CPP defines when the flag is set/unset or by using some hs-source-dirs sorcery. |
BTW did you not get the E-Mail I sent you a few days ago? |
I did not. It's in this image. http://parametricity.com/images/back.jpg |
Yeah, that's where I sent it before. I sent you another one. According to my mail sever it was delivered. Maybe check spam or something? |
There must be a better way to support your use case than to outright duplicate the code. Maybe we can work together to add whatever you need to the exported API? I'm ghc-mod's maintainer so I might be able to help ;)
The text was updated successfully, but these errors were encountered: