我刚刚在Eclipse Eclipse中安装了EcpliseFP。操作系统是Ubuntu 13.04。 安装都很好(我必须通过cabal和apt-get安装一些软件包)。但是,当我启动Eclipse时,它显示以下错误消息:
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)
我尝试按照FAQ ant类型将以下命令输入控制台(我的用户名是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}
没有显示任何内容,如果我尝试输入“Enter”键,则会显示
incomplete data error in command:
并继续等待输入。
当我跳转到上面的长目录时,我可以看到local.db
文件存在但是大小为0.即使我存在Eclipse它仍然是0.如果我忽略上述错误并创建一个Haskell项目,当我尝试在项目树中展开“src”文件夹时,UI完全阻止。
如何解决这个问题,以便我可以开始使用它?
更新 查看错误消息时,似乎scion-browser期望一个名为“DbModule”的表但是创建的是调用“db_module”。所以它必须是版本不匹配。但是我不知道如何强制使用另一个版本的scion-browser或其他东西。
更新
我发现this discussion中有人说我需要输入scion-browser <Enter>
,然后将参数粘贴到控制台。所以我跟着它,结果是:
$ 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)
所以它基本相同。
答案 0 :(得分:1)
我在Sourceforge论坛(https://sourceforge.net/p/eclipsefp/discussion/371922/thread/026a3090/?limit=25#32bb)上回复了。基本上,试图支持持久性1.2的Scion-Browser的0.2.15版本已被打破。我在现有的数据库上尝试过它,一切正常,但创建失败了。我已经将0.2.16推到了Hackage,解决了这个问题。