Wednesday, December 01, 2010

EclipseFP 2.0.2 released

I am pleased to announce another release of EclipseFP. Version 2.0.2 should make installation of Scion easier, improve stability and performance of the parsing and building operations, and provide a few new functionalities. You can now configure where the "Open Definition" action will look for definitions (these can be in Haskell source code or Haddock pages): by default it will look in the dependent projects, in your GHC install doc folder, and on Hackage, but you can add more locations in the preferences. You can also generate source distribution via a project export command (that calls cabal sdist).


The release notes are here. To install or upgrade, just point your Eclipse to http://eclipsefp.sf.net/updates. Be sure to configure both the GHC path and the Cabal path in the preferences.


Happy Haskell hacking!

10 comments:

torrent said...

Hi,

First of all, thanks for the good work!

Here is a log of the building failure of an internal scion server:


[15 of 21] Compiling Scion.Cabal ( lib\Scion\Cabal.hs, dist\build\scion-server\scion-server-tmp\Scion\Cabal.o )

lib\Scion\Cabal.hs:482:9:
Warning: orphan instance:
instance [incoherent] (Data a) => JSON (ParseResult a)
[16 of 21] Compiling Scion.Server.Protocol ( server\Scion\Server\Protocol.hs, dist\build\scion-server\scion-server-tmp\Scion\Server\Protocol.o )
[17 of 21] Compiling Scion.Server.Commands ( server\Scion\Server\Commands.hs, dist\build\scion-server\scion-server-tmp\Scion\Server\Commands.o )

server\Scion\Server\Commands.hs:508:4:
No instance for (JSON (Maybe String))
arising from a use of `Cmd'
at server\Scion\Server\Commands.hs:508:4-23
Possible fix: add an instance declaration for (JSON (Maybe String))
In the first argument of `($)', namely `Cmd "thing-at-point"'
In the expression:
Cmd "thing-at-point"
$ reqArg "file"
<&> reqArg "line"
<&> reqArg "column"
<&> optArg' "qualify" False decodeBool
<&>
optArg' "typed" True decodeBool
$ cmd
In the definition of `cmdThingAtPoint':
cmdThingAtPoint = Cmd "thing-at-point"
$ reqArg "file"
<&> reqArg "line"
<&> reqArg "column"
<&> optArg' "qualify" False decodeBool
<&>
optArg' "typed" True decodeBool
$ cmd
where
cmd fname line col qual typed
= do { let ...;
.... }
doThingAtPointTyped ::
(Search Id a) =>
a -> SrcSpan -> Bool -> TypecheckedModule -> ScionM String
doThingAtPointTyped src loc qual tcm
= do { let ...;
.... }
doThingAtPointUntyped ::
(Search id a, OutputableBndr id) =>
a -> SrcSpan -> Bool -> TypecheckedModule -> ScionM String
....

server\Scion\Server\Commands.hs:631:22:
No instance for (JSON (Maybe Component))
arising from a use of `Cmd'
at server\Scion\Server\Commands.hs:631:22-44
Possible fix:
add an instance declaration for (JSON (Maybe Component))
In the first argument of `($)', namely `Cmd "current-component"'
In the expression:
Cmd "current-component" $ noArgs $ getActiveComponent
In the definition of `cmdCurrentComponent':
cmdCurrentComponent = Cmd "current-component"
$ noArgs $ getActiveComponent
Loading package ffi-1.0 ... linking ... done.
cabal.exe: Error: some packages failed to install:
scion-0.1.0.6 failed during the building phase. The exception was:
ExitFailure 1

JP Moresmau said...

Upgrade your AttoJSON package. We must now rely on their Maybe instances for JSON, but I forgot to bump the dependency version in the cabal file.

torrent said...

Fixed, thanks!

torrent said...

Building doesn't seem to work.
Eclipse Version: Helios Service Release 1.

"Build Project" does nothing.

JP Moresmau said...

You can look in the console for the scion output for your project is something happens. And check the error log. Building should, ahem, build the exe or library in in the .dist-scion folder in your project.

Frodo said...

Hi,

I'm using ghc 6.10.4 and have been able to work around the cabal dependency mess by installing some 6.10 compatible packages by hand:
- cabal install list-tries-0.1
- cabal install attoparsec-0.8.1.0 (to allow AttoJSON to build)
- cabal install multiset-0.2
- cabal install derive-2.3.0

This solves all the dependencies. However, now scion 0.1.0.6 does not build.
- First problem is that ghc 6.10 does not know the -fno-warn-unused-do-bind flag. That's easily fixed.
- Second problem is in Find.hs:

lib/Scion/Inspect/Find.hs:270:13:
Couldn't match expected type `RenamedSource'
against inferred type `(a, b, c, d)'
In the pattern: (b, _, _, _)
In the definition of `search':
search p s (b, _, _, _) = search p s b
In the instance declaration for `Search Name RenamedSource'

- Commenting that out gives in Inspect.hs:

lib/Scion/Inspect.hs:255:87: Not in scope: `pm_parsed_source'

- and in Command.hs:

server/Scion/Server/Commands.hs:516:86:
No instance for (Search
id
(HsGroup Name,
[LImportDecl Name],
Maybe [LIE Name],
Maybe (HsDoc Name),
HaddockModInfo Name))
arising from a use of `doThingAtPointUntyped'
at server/Scion/Server/Commands.hs:516:86-106

Is this something that is fixable for 6.10?
Thanks in advance,

Ken

JP Moresmau said...

Frodo, it appears that you're right, some of the latest code changes make scion 6.12 compatible only. We will try to install 6.10 on a test machine and gain back compatibility, but it will take a while, with the holiday season and everything. Sorry!

-scooter- said...

@Frodo: Are you using MacPorts? If so, you might seriously want to consider uninstalling the entirety of the haskell-platform package and instaling the haskell.org Haskell Platform with the 6.12 compiler.

I've re-installed 6.10 on my Mac and tried to resolve your issues. Unfortunately, many of the packages upon which scion-server relies will no longer compile with 6.10. I couldn't get past compiling the dependencies -- in particular, multiset uses a renamed function, mkNoRepType, that used to be called mkNorepType in the 6.10 base libraries.

If you can't install the Haskell Platform from haskell.org, I'd suggest whining at the MacPorts maintainer. Personally, I like MacPorts, but some of the maintainers can be slow to refresh or update the ports.

Frodo said...

I'm using Haskell platform 2009.2, which includes ghc 6.10.4. I need 6.10.4 to keep wxhaskell working under ghci, although with ghc7 on the horizon, i'm considering taking that loss. If you install the cabal dependencies as in the order I described above, it is possible to compile scion 0.1.0.4. I guess later changes also require a new multiset etc.

Btw, I also tried EclipseFP with ghc 6.12, which correctly builds. However, I'm unable to use the eclipse debugger. I can't set breakpoints. If I set them in the console, it does break at the breakpoint, but stepping is a bit unreliable. Is this a known issue?

Thanks for the help

EvgenijM86 said...

I've managed to set it all up and built scion from sources, but it cannot find my ~/.cabal/bin directory.

searching for c2hs in path.
Cannot find c2hs on the path
searching for cpphs in path.
Cannot find cpphs on the path
searching for ffihugs in path.
Cannot find ffihugs on the path
searching for gcc in path.
found gcc at /usr/bin/gcc
("/usr/bin/gcc",["-dumpversion"])
/usr/bin/gcc is version 4.4.5
searching for greencard in path.
Cannot find greencard on the path
searching for haddock in path.
Cannot find haddock on the path
searching for happy in path.
Cannot find happy on the path
searching for hmake in path.
Cannot find hmake on the path
searching for hsc2hs in path.
Cannot find hsc2hs on the path
searching for HsColour in path.

and so on..

but most of them are in my ~/.cabal/bin. How do I specify this to scion-server which (I built it from source)? If I copy them to /usr/bin he suddenly can see them.

I already added ~/.cabal/bin to my $PATH in /etc/bash.bashrc file and it's contents are perfectly visible from any console window.