1

I have just installed EcpliseFP in a flash Eclipse. The operation system is Ubuntu 13.04. The installation is all good (I have to install some packages through cabal and apt-get). However when I start Eclipse it shows the following error messages:

Error loading local database
Migrating: CREATE TABLE "db_package"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT     NULL,"version" VARCHAR NOT NULL,"doc" VARCHAR NULL,CONSTRAINT "unique_version" UNIQUE     ("name","version"))
Migrating: CREATE TABLE "db_module"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"doc" VARCHAR NULL,"package_id" INTEGER NOT NULL REFERENCES "db_package")
Migrating: CREATE TABLE "db_decl"("id" INTEGER PRIMARY KEY,"decl_type" VARCHAR NOT NULL,"name" VARCHAR NOT NULL,"doc" VARCHAR NULL,"kind" VARCHAR NULL,"signature" VARCHAR NULL,"equals" VARCHAR NULL,"module_id" INTEGER NOT NULL REFERENCES "db_module")
Migrating: CREATE TABLE "db_ty_var"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_fun_dep"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_context"("id" INTEGER PRIMARY KEY,"shown" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_constructor"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"signature" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
scion-browser: user error (SQLite3 returned ErrorError while attempting to perform prepare "create index if not exists module_pkgid_name on DbModule (packageId,name)": no such table: main.DbModule)

I have tried to follow the FAQ ant type the following command into a console (my user name is joe):

$ scion-browser {"filepath":"/home/joe/workspace/.metadata/.plugins/net.sf.eclipsefp.haskell.browser/scion-browser-0.2-dbs/local.db","command":"load-local-db","rebuild":true}

Nothing shows and if I try to type "Enter" key it shows

incomplete data error in command: 

and keep waiting for input.

When I jump into the long directory above, I can see the local.db file exists but with size 0. Even I exists Eclipse it is still 0. If I ignore the above error and create a Haskell project, the UI blocks completely when I try to expand the "src" folder in the project tree.

How to fix this problem so that I can start use it?

UPDATE When look at the error message, it seems that scion-browser expecting a table named "DbModule" but what has been created is call "db_module". So it must be a version mismatch. However I dont't know how to force another version of scion-browser or something else.

UPDATE

I found somebody in this discussion says I need to enter scion-browser <Enter> and then paste the parameter to the console. So I followed that and the result is:

$ scion-browser
{"filepath":"/home/joe/workspace/.metadata/.plugins/net.sf.eclipsefp.haskell.browser/scion-browser-0.2-dbs/local.db","command":"load-local-db","rebuild":true}

Migrating: CREATE TABLE "db_package"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"version" VARCHAR NOT NULL,"doc" VARCHAR NULL,CONSTRAINT "unique_version" UNIQUE ("name","version"))
Migrating: CREATE TABLE "db_module"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"doc" VARCHAR NULL,"package_id" INTEGER NOT NULL REFERENCES "db_package")
Migrating: CREATE TABLE "db_decl"("id" INTEGER PRIMARY KEY,"decl_type" VARCHAR NOT NULL,"name" VARCHAR NOT NULL,"doc" VARCHAR NULL,"kind" VARCHAR NULL,"signature" VARCHAR NULL,"equals" VARCHAR NULL,"module_id" INTEGER NOT NULL REFERENCES "db_module")
Migrating: CREATE TABLE "db_ty_var"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_fun_dep"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_context"("id" INTEGER PRIMARY KEY,"shown" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
Migrating: CREATE TABLE "db_constructor"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"signature" VARCHAR NOT NULL,"decl_id" INTEGER NOT NULL REFERENCES "db_decl")
scion-browser: user error (SQLite3 returned ErrorError while attempting to perform prepare "create index if not exists module_pkgid_name on DbModule (packageId,name)": no such table: main.DbModule)

SO it is basically the same.

Earth Engine
  • 10,048
  • 5
  • 48
  • 78

1 Answers1

1

I have replied on the Sourceforge forum (https://sourceforge.net/p/eclipsefp/discussion/371922/thread/026a3090/?limit=25#32bb). Basically the 0.2.15 version of Scion-Browser, which tried to support persistent 1.2, is broken. I had tried it on an existing db and everything was ok, but the creation fails. I have pushed 0.2.16 to Hackage which solves the problem.

JP Moresmau
  • 7,388
  • 17
  • 31
  • Thans for your response, I will try it tonight. – Earth Engine May 09 '13 at 23:59
  • Hi, I can now solve that problem. However, when I created a Haskell project the console keep showing the following message: `buildwrapper: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.14.0, now Cabal-1.16.0). Additionally the compiler is different (was ghc-7.4, now ghc-7.6) which is probably the cause of the problem.)` – Earth Engine May 10 '13 at 10:18
  • running `buildwrapper configure` shows `buildwrapper: : canonicalizePath: does not exist (No such file or directory)` – Earth Engine May 10 '13 at 10:21
  • The FAQ http://eclipsefp.github.io/faq.html covers the first issue you have. Basically you need to have the GHC library, the Cabal library, the Cabal install exec and BuildWrapper all in sync. The 'configure' referenced here is in fact the configure of your project. – JP Moresmau May 10 '13 at 11:03
  • I though they should all been updated but they didn't. Ubuntu installs `cabal-install` package version 1.14.0 (as `/usr/bin/cabal`), but cabal itself installed a version of 1.16.0 (as `/home/joe/.cabal/bin/cabal`). I have removed the Ubuntu one because it is an old version, trying again. – Earth Engine May 10 '13 at 11:19
  • A strange thing is that `which cabal` shows `/home/joe/.cabal/bin/cabal` (because I have a customised $PATH which puts the user directory first) but `cabal --version` is 1.14.0. This makes me confused for a while. Once I `apt-get remove cabal-install` running `cabal --version` returns 1.16.0. – Earth Engine May 10 '13 at 11:22
  • Following that FAQ is turned out very very hard. It says "You may need to go back to the older instance of cabal" but it is actually NO way to go back: installing cabal-1.14.0 requires unix-2.3.2.0, but it NOT possible to build versions lower than 2.4.0 according to http://www.haskell.org/pipermail/libraries/2010-April/013406.html – Earth Engine May 10 '13 at 12:37
  • Actually can you simply ignore the version difference in the last bit? now it says "was Cabal-1.16.0, now Cabal-1.16.0.3" – Earth Engine May 10 '13 at 12:42
  • Another interesting message: after I do `cabal install cabal-1.16.0.2` and `ghc-pkg unregister --force Cabal-1.16.0.3`, deleteing Eclipse workspace, and start eclipse, a message shows "The version of helper executable scion-browser at /home/joe/.cabal/scion-browser is 0.2.16, but at least version 0.2.12 is required." What? 0.2.16 is less than 0.2.12 ? – Earth Engine May 10 '13 at 12:57
  • It is finally solved by forcing cabal-install and cabal to `1.16.0`. Apparently there are a couple of bugs observed. Once I get familiar to Haskell I will try to contribute to EclipseFP itself, since it takes me so many time to just make it working. – Earth Engine May 10 '13 at 13:09
  • You should have started a new subject instead of just commenting on an unrelated issue. When you say "Actually can you simply ignore the version difference in the last bit?" you seem to imply the message comes from the BuildWrapper code, it doesn't, it comes from Cabal, because the configure-generated files in cabal require exact version match. So there's nothing we can do for it. – JP Moresmau May 11 '13 at 07:36
  • The note in the FAQ to go back to a previous version makes sense in case somebody installed a new version of Cabal more or less by mistake. In your case you seem to have updated GHC as well, so as long as the version of the GHC library uses the proper version of Cabal, you should be good to go. I'll check the code doing the version number comparison... – JP Moresmau May 11 '13 at 07:41
  • The code doing the version comparison is fine, but sometimes the version retrieval would fail the first time, but succeed when it came to display it... The code to retrieve the version was enhanced recently, and I've ensure the same version is used in the error message to avoid confusion. You seem to have a knack for spotting bugs, can I enroll you as the official EclipseFP tester (-: ? – JP Moresmau May 11 '13 at 13:31
  • OK I realised this is not a good place to discuss further bugs. So I moved to your forum and posted some more bugs. Actually I still have several bugs in hand to report; only the most obvious bugs has been reported so far, because I am not so sure the rest of them is a bug or just some configuration mistake and in this stage I can live with them. Being an official tester means I will have to learn how to keep the Eclipse plugin update to date, but yes it is OK if you tell me where to start. – Earth Engine May 11 '13 at 14:25