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.
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.