Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Fix build dependencies #48

Merged
merged 4 commits into from
Oct 4, 2014
Merged

Fix build dependencies #48

merged 4 commits into from
Oct 4, 2014

Conversation

elfenlaid
Copy link
Contributor

So, current state of plugin emits a bunch of errors on "Connecting.." stage:

Resolving dependencies...
Configuring light-haskell-0.2.6...
cabal: At least the following dependencies are missing:
aeson ==0.7.,
base ==4.6.
,
ghc-mod ==3.1.,
network ==2.4.
,
process ==1.1.,
stylish-haskell ==0.5.
,
text ==1.1.*

My configs:
MAC OS X 10.9.4
The Glorious Glasgow Haskell Compilation System, version 7.8.2
cabal-install version 1.20.0.3

I'm definitely not a specialist in either haskell or light table but it seems to solve issue :)

@cblp
Copy link

cblp commented Oct 2, 2014

@elfenlaid Have you managed to make it work? With this version, I only got "Connecting...", and not a single other message from LT.

My config dffers from yours slightly:
MAC OS X 10.9.5
The Glorious Glasgow Haskell Compilation System, version 7.8.3

@elfenlaid
Copy link
Contributor Author

@cblp yeah, totally what I get before fix, there might be some sort of a hint in console
Console can be found at View -> Console
May you past it here?

@cblp
Copy link

cblp commented Oct 2, 2014

@elfenlaid Before your patch I had got some errors about base==4.6 from cabal sandbox. Now I have cleanly updated via git the plugin directory. When I press Cmd+Enter at any line, all I can see in console is "Connecting...", and no errors.

CPU fan hinted me that something is happening. In the process top there was some ghc's munching my CPU. When I killed one of them, I got in LT console:

haskell_compiled.js[5076]:  
Process errored:  cabal: Error: some packages failed to install:
aeson-0.7.0.6 depends on attoparsec-0.12.1.2 which failed to install.
attoparsec-0.12.1.2 failed during the building phase. The exception was:
ExitFailure 1
ghc-mod-5.1.0.2 depends on haskell-src-exts-1.16.0 which failed to install.
haskell-src-exts-1.16.0 failed duri
haskell_compiled.js[5079]:  
Process exited:  1
haskell_compiled.js[5076]:  
Process errored:  ng the configure step. The exception was:
ExitFailure 1
hlint-1.9.6 depends on haskell-src-exts-1.16.0 which failed to install.
stylish-haskell-0.5.11.0 depends on attoparsec-0.12.1.2 which failed to
install.
yaml-0.8.9.2 depends on attoparsec-0.12.1.2 which failed to install.

@cblp
Copy link

cblp commented Oct 2, 2014

It seems that cabal is compiling the world in a sandbox.

@elfenlaid
Copy link
Contributor Author

@cblp Actually you can manually launch cabal in light-haskell directory via cabal install --only-dependencies and get a bit more detailed log

I haven't encountered any build errors aaand
attoparsec-0.12.1.2 failed during the building phase. The exception was: ExitFailure 1
this log wasn't so much helpful :(

@bkirwi
Copy link
Contributor

bkirwi commented Oct 2, 2014

Patch seems sensible, and compiles for me on 7.8.

I'm pretty sure this will break things for people who are still on 7.6, though. It might be that we can relax the constraints, but I worry that ghc-mod will cause issues. Anybody with a working 7.6 install want to give it a shot?

@cblp
Copy link

cblp commented Oct 2, 2014

You can use CPP to compile with different compilers.

@bkirwi
Copy link
Contributor

bkirwi commented Oct 2, 2014

I'm hoping we can avoid preprocessor directives, but it really depends on whether there's a version of ghc-mod that provides a consistent interface across GHC versions.

I can't test any of this at the moment, since my systems have been purged of 7.6, and even CPP is not powerful enough to install another compiler on my computer -- but if none of the other devs have the old version, I'll try and give it a go later.

@elfenlaid
Copy link
Contributor Author

So sorry for == sign in base dependency, I would be more careful next time.

ghc-mod constrains might support 7.6, can I somehow change code right in pull request?

@cblp
Copy link

cblp commented Oct 2, 2014

@elfenlaid just commit and push in this branch, pull request will be updated automatically.

@elfenlaid
Copy link
Contributor Author

Well, but it's still unknown could 7.6 ghc build it or not

@heyLu heyLu mentioned this pull request Oct 3, 2014
@heyLu
Copy link
Contributor

heyLu commented Oct 3, 2014

Hi, thanks for working on this!

I've tried building on GHC 7.6 using travis, here's the log for the (failing) build with the changes from this branch applied.

However, the travis build also fails with GHC 7.8, even though I can build it fine locally.

If you want pull request to my repo with travis set up, I can give you those. I'll also try and get travis support merged (#49) into the main repo so we can test changes more easily.

@heyLu
Copy link
Contributor

heyLu commented Oct 3, 2014

You can now test this using travis yourself:

  • merge/rebase that latest changes in master (travis support)
  • enable travis for your fork on your travis profile page

@elfenlaid
Copy link
Contributor Author

Turns out that's happy, who was responsible for build error at travis, so I'm updated travis config (actually "borrowed" one from lenses) with happy fix.
Also it's possible to build ghc-mod for both 7.6 and 7.8 ghc, hurray

heyLu added a commit that referenced this pull request Oct 4, 2014
@heyLu heyLu merged commit 8e53b7e into jetaggart:master Oct 4, 2014
@heyLu
Copy link
Contributor

heyLu commented Oct 4, 2014

Awesome! ✨ Thanks for this.

I've released 0.2.7 which now supports ghc 7.6 & 7.8 thanks to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants