Upgrade issues (and how I solved them)

Help
Jarno
2010-11-29
2012-12-06
  • Jarno
    Jarno
    2010-11-29

    I upgraded my Eclipse to Helios and at the same time updated all the plugins I had installed, including EclipseFP (I can't remember which version of EclipseFP I had before, but not very old I think). This is on OS X (Snow Leopard). After the upgrade Eclipse didn't show any outline or syntax highlighting for Haskell files, so I reckoned EclipseFP couldn't talk to scion.

    First I tried to reconfigure Haskell settings in Eclipse, but there was some weird behavior, settings not getting saved etc. I did rm -r .metadata/.plugins/net.sf.eclipsefp.haskell.* and restarted Eclipse but it didn't help.

    Then I noticed some errors in the error log:

    Install failed for scion server. Output was:/usr/bin/ghc -numeric-version
    looking for package tool: ghc-pkg near compiler in /usr/bin
    found package tool in /usr/bin/ghc-pkg
    /usr/bin/ghc-pkg -version
    /usr/bin/ghc -supported-languages
    Reading installed packages…
    /usr/bin/ghc-pkg dump -global
    /usr/bin/ghc-pkg dump -user
    /usr/bin/ghc -print-libdir
    Reading available packages…
    Resolving dependencies…
    selecting scion-0.1.0.5 (hackage) and discarding AttoJson-0.5, 0.5.1,
    Cabal-1.1.6, 1.2.1, 1.2.2.0, 1.2.3.0, 1.2.4.0, 1.4.0.0, 1.4.0.1, 1.4.0.2,
    1.8.0.2, 1.8.0.4, 1.8.0.6, 1.9.0, 1.10.0.0, QuickCheck-1.0, 1.1.0.0, 1.2.0.0,
    1.2.0.1, array-0.1.0.0, binary-0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1,
    0.4.4, containers-0.1.0.0, 0.1.0.1, 0.4.0.0, directory-1.1.0.0, filepath-1.0,
    1.2.0.0, hslogger-1.1.0, network-2.0, 2.3, time-1.0, 1.2, 1.2.0.1, 1.2.0.2,
    1.2.0.3, utf8-string-0.1 and 0.2
    selecting
    cabal: dependencies conflict: ghc-6.12.1 requires Cabal ==1.8.0.2 however
    Cabal-1.8.0.2 was excluded because scion-0.1.0.5 requires Cabal ==1.6.*

    I tried to upgrade some of the modules mentioned in the error message with no luck. Finally I cd'd to .metadata/.plugins/net.sf.eclipsefp.haskell.scion.client/scion-0.1.0.5 and took a look at the scion.cabal file. I found that it has a flag for cabal 1.8 support, so I did cabal install -f cabal_1_8. It failed a couple of times for missing dependencies (happy and QuickCheck 2) but after I did cabal install for those manually the build finally succeeded.

    One more restart of Eclipse and it opened up with syntax highlighting and outline working as they should.

    I don't know if there is something EclipseFP could do differently to avoid this particular issue, but I wanted to at least record this in case someone else runs into the same problem.

    Keep up the good work; as an old Java developer and a long-time Eclipse user I really love using Eclipse for Haskell (and all the other) development.

    BR,
    Jarno

     
  • JP Moresmau
    JP Moresmau
    2010-11-29

    Thank you!! I think there were issues, yes, relating to building scion and versions of Cabal. The version of EclipseFP that will be released soon will hopefully fix them by detecting which version of cabal you have, and building scion accordingly.
    Thanks for the kind words!