Thursday, September 30, 2010

EclipseFP 2.0.0 released!

Hello all,

I'm proud to announce version 2.0.0 of EclipseFP, the Eclipse plugin for Haskell coding. The change in the major version number shows that some big changes have been made, even if under the hood:
- the Antlr parsing has been removed
- the JFace based syntax highlighter has been removed
We now rely solely on Scion and the GHC API to provide lexer tokens! This fixes some long standing syntax highlighting bugs while giving us more options for coloring.
Also, we now communicate to the Scion library via standard streams instead of network calls, which should solve some headaches.

There are also loads of bug fixes and small enhancements peppered a bit everywhere, either things that people asked or things that I did for myself, since EclipseFP is (of course) my IDE of choice for my Haskell coding. The release notes can be found here.

Another good news is that I'm not alone in hacking at EclipseFP, scooter has helped a lot with Helios, Cabal 1.6, GHC 6.10 and Mac OS X support, and has a few new features coming up soon!

Just point your Eclipse to the EclipseFP update site, and happy Haskell hacking!!

22 comments:

Anders said...
This comment has been removed by the author.
Anders said...

Good news! The need for an Eclipse plugin was mentioned at a birds-of-a-feather meeting at ICFP yesterday, so keep up the good work!

Unknown said...

Thats fantastic news! Many thanks for your dedication!!

BigD said...

This is very very cool. Just realized it thanks to reddit :-)

One little addition: The built-in server didn't work on my OS X 10.6 + current Haskell Plattform.

Thus I did it manually like in the release notes but had to fix the scion.cabal to turn on the "cabal_1_8" flag...

Unknown said...

BigD:

Are you using MacPorts' cabal, MacPorts' cabal-0.8.0 or the Haskell Platform? Or just a non-standard cabal executable that's not named "cabal"?

Specifically, EclipseFP looks for a program named "cabal" on PATH and a few other places (like $HOME/.cabal/bin). It parses the cabal program's version and sets the flags passed to the scion-server "cabal install" command line appropriately.

But the executable has to be named "cabal"!

The next release of EclipseFP will include a combined cabal/scion preference page that will allow more flexibility in which installed cabal is used to build the built-in scion server.

Also, if you check your Eclipse log, you should see various cabal information reported, like the cabal library version and cabal-install version. That stuff is logged intentionally and should tell you where EclipseFP is picking up cabal.

Unknown said...

The built-in scion server cannot be build. From the eclipse error log:

Install failed for scion server. Output was:C:\ghc\ghc-6.10.3\bin\ghc.exe --numeric-version
looking for package tool: ghc-pkg near compiler in C:\ghc\ghc-6.10.3\bin
found package tool in C:\ghc\ghc-6.10.3\bin\ghc-pkg.exe
C:\ghc\ghc-6.10.3\bin\ghc-pkg.exe --version
C:\ghc\ghc-6.10.3\bin\ghc.exe --supported-languages
Reading installed packages...
C:\ghc\ghc-6.10.3\bin\ghc-pkg.exe dump --global
Reading available packages...
Resolving dependencies...
selecting
cabal.exe: cannot configure scion-0.1.0.5. It requires AttoJson >=0.5.2 &&
>=0.5.2 && >=0.5.2 and ghc-syb-utils -any && -any && -any
There is no available version of AttoJson that satisfies >=0.5.2 && >=0.5.2 &&
>=0.5.2
There is no available version of ghc-syb-utils that satisfies -any && -any &&
-any

JP Moresmau said...

Exceptione, a look at http://hackage.haskell.org/package/AttoJson proves that AttoJson is now at version 0.5.8. Time to run cabal update?

Unknown said...

hey JP, I am sorry, I thought eclipsefp would configure it fully.
I updated cabal, but eclipefp has still a problem with a dependency on containers, see trace below.
Is it the the case that ghc-6.10.3 is just too old?
Maybe I should just wipe out my haskell installation and install the newest one.

TRACE:

cabal.exe: cannot configure list-tries-0.4. It requires containers ==0.3.*
For the dependency on containers ==0.3.* there are these packages:
containers-0.3.0.0. However none of them are available.
containers-0.3.0.0 was excluded because template-haskell-2.3.0.1 requires
containers ==0.2.0.1
containers-0.3.0.0 was excluded because hpc-0.5.0.3 requires containers
==0.2.0.1
containers-0.3.0.0 was excluded because containers-0.2.0.1 was selected
instead
containers-0.3.0.0 was excluded because Cabal-1.6.0.3 requires containers
==0.2.0.1
containers-0.3.0.0 was excluded because ghc-6.10.3 requires containers
==0.2.0.1


btw: I'm on win xp sp3

JP Moresmau said...

No we don't run cabal update just in case it messes up somebody install with recent libraries they didn't want... EclipseFP should work on GHC 6.10 but it looks likes there's an issue now on the version of list-tries it downloads. I have list-tries 0.2 on my machine, so first force an install of this version and try again.

cabal install list-tries-0.2

Hope this helps

Unknown said...

Hi many thanks.

I tried your suggestion, for other people with the same problem it might be of interest:

C:\WINDOWS\system32>cabal install list-tries-0.2
Resolving dependencies...
cabal: cannot configure containers-0.3.0.0. It requires base >=4.2 && <6
For the dependency on base >=4.2 && <6 there are these packages: base-4.2.0.0,
base-4.2.0.1 and base-4.2.0.2. However none of them are available.
base-4.2.0.0 was excluded because of the top level dependency base -any
base-4.2.0.1 was excluded because of the top level dependency base -any
base-4.2.0.2 was excluded because of the top level dependency base -any


-------------
Next I found this: http://osdir.com/ml/haskell-cafe@haskell.org/2010-01/msg00305.html

C:\WINDOWS\system32>cabal install --reinstall hlint
setup.exe: happy version >=1.17 is required but it could not be found.
cabal: Error: some packages failed to install:
haskell-src-exts-1.9.4 failed during the configure step. The exception was:
exit: ExitFailure 1
hlint-1.8 depends on haskell-src-exts-1.9.4 which failed to install.

---
C:\WINDOWS\system32>cabal install happy

setup.exe: perl is required but it could not be found.
cabal: Error: some packages failed to install:

---
so wtf, now perl is required to run build happy?
It seems like I cannot go further. This is turning to be a dependency hell. xD

JP Moresmau said...

Yep, not pretty. The problem is coming from containers-3.0.0, which is not compatible with GHC 6.10. I'm surprised that cabal doesn't recognize your version of base and stick to that. Maybe there are some flags we need to pass to get GHC 6.10 support.

JP Moresmau said...

so you could try to get containers-0.2.0.1 and see, but this may go on for a while...

Unknown said...

That also fails.

C:\WINDOWS\system32>cabal install containers-0.2.0.1
Resolving dependencies...
No packages to be installed. All the requested packages are already installed.
If you want to reinstall anyway then use the --reinstall flag.


C:\WINDOWS\system32>cabal install containers-0.2.0.1 --reinstall
Resolving dependencies...
Downloading containers-0.2.0.1...
Configuring containers-0.2.0.1...
Preprocessing library containers-0.2.0.1...
Building containers-0.2.0.1...

Data\IntMap.hs:182:7:
Could not find module `Data.Data':
it is a member of the hidden package `base'
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
containers-0.2.0.1 failed during the building phase. The exception was:
exit: ExitFailure 1

C:\WINDOWS\system32>cabal install containers-0.3.0.0
Resolving dependencies...
cabal: cannot configure containers-0.3.0.0. It requires base >=4.2 && <6
For the dependency on base >=4.2 && <6 there are these packages: base-4.2.0.0,
base-4.2.0.1 and base-4.2.0.2. However none of them are available.
base-4.2.0.0 was excluded because of the top level dependency base -any
base-4.2.0.1 was excluded because of the top level dependency base -any
base-4.2.0.2 was excluded because of the top level dependency base -any

---

containers-0.3.0.0 is the last one, which is in incompatible with ghc 6.10 as you said.
I wonder what flags there are that could resolve the conflicts, but if that is difficult you could also force people to upgrade of course :)

JP Moresmau said...

Well we ensured that the code in the scion library is compatible with GHC 6.10 and 6.12, and several version of Cabal as well, so it's a shame that this cabal dependency hell forces people to upgrade... I'm not sure how come you cannot recompile a package that you add.Sometimes, in my experience, it only takes the install of one package with dubious dependencies to put the whole system in a mess... http://www.haskell.org/cabal/FAQ.html is probably a good place to look, but it should be easier, I agree...

Unknown said...

exceptione:

Find where cabal has installed your user-installed packages. You might just need to clear them out and re-install required packages.

Friday is generally my "research day off", so that's the earliest I can download an earlier version of the Haskell platform and diagnose this problem.

Unknown said...

exceptione: by "clearing them out", I mean deleting the directory and its contents. cabal does not have a package removal feature, malheureusement.

JP Moresmau said...

xceptione, you may be able to use ghc-pkg. Use ghc-pkg list and look at the packages in your user package db, some may be the problem. It already happen to me before, on unrelated stuff, to start getting this same kind of errors when I started upgrading my packages a bit too eagerly. Of course, moving to GHC 6.12 with the latest version of the Haskell Platform would be a good move too...

Unknown said...

@scooter @JP Moresmau
Yeah I saw in the faq JP pointed out that user-packages could drive the system nuts.

if ghc-pkg list gives just one package.conf file, there is no extra user-installed stuff, right? So currently I assume this is not source of the problems

C:\WINDOWS\system32>ghc-pkg list
C:/ghc/ghc-6.10.3\package.conf:
Cabal-1.6.0.3, Cabal-1.8.0.6, HTTP-4000.0.9, HUnit-1.2.0.3,
HaXml-1.19.7, QuickCheck-1.2.0.0, Win32-2.2.0.0,
ansi-terminal-0.5.0, array-0.2.0.0, base-3.0.3.1, base-4.1.0.0,
bytestring-0.9.1.4, cco-0.0.4, containers-0.2.0.1, cpphs-1.11,
directory-1.0.0.3, (dph-base-0.3), (dph-par-0.3),
(dph-prim-interface-0.3), (dph-prim-par-0.3), (dph-prim-seq-0.3),
(dph-seq-0.3), extensible-exceptions-0.1.1.0, filepath-1.1.0.2,
(ghc-6.10.3), ghc-prim-0.1.0.0, haddock-2.4.2, haskell-src-1.0.1.3,
haskell98-1.0.1.0, hpc-0.5.0.3, hscolour-1.17, html-1.0.1.2,
integer-0.1.0.1, mtl-1.1.0.2, multirec-0.3, network-2.2.1,
old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
parallel-1.1.0.1, parsec-2.1.0.1, polyparse-1.2, pretty-1.0.1.0,
process-1.0.1.1, random-1.0.0.1, regex-base-0.72.0.2,
regex-compat-0.71.0.1, regex-posix-0.72.0.3, rts-1.0, stm-2.1.1.2,
syb-0.1.0.1, template-haskell-2.3.0.1, time-1.1.3, uniplate-1.5.1,
uulib-0.9.5, xhtml-3000.2.0.1, zlib-0.5.2.0

--

C:\WINDOWS\system32>ghc-pkg list --user
C:\Documents and Settings\Jan\Application Data\ghc\i386-mingw32-6.10.3\package.c
onf:

C:\WINDOWS\system32>

the user conf-file doesn't exist actually.
btw the current user is non-admin, so i do all my installs as admin.

Unknown said...

Does the build system support FFI linkage to native libraries? I'm trying to call a function in the GNU Scientific Library, but during linkage I get an "undefined reference" regarding the function in question.

Weird thing is, 'cabal build' works perfectly. And I can also run the program from 'ghci Main.hs -lgsl' without problems, only build through EclipseFP complains. Any ideas?

(I have added 'pkgconfig-depends: gsl >= 1.13' to the cabal file)

JP Moresmau said...

Claus, I have no idea. EclipseFP builds projects through the scion API via a mixture of Cabal and GHC API calls, so fundamentally it's not that much different than doing Cabal builds. Could it be path related? Paths that cabal takes into account but not when we call it through scion... Maybe ask the scion mailing list and if they have a solution we can incorporate it in EclipseFP. I'm not too familiar with FFI and I work on Windows, but I can try to reproduce.

vuce said...

Does anyone else have problems where no changes to Haskell/Scion and Cabal can be made? I tried checking the built-in scion server, and manually inserting path to the externally built scion server, but no changes would be saved...

JP Moresmau said...

Miha, you mean in the preferences page? Is there any errors in the Eclipse log file (.log in your workspace metadata folder, or in the Error Log view)?