我刚刚在 Flash Eclipse 中安装了 EcpiseFP。操作系统为 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)
我尝试按照常见问题解答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 项目,当我尝试展开时 UI 完全阻塞项目树中的“src”文件夹。
如何解决此问题以便我可以开始使用它?
更新 当查看错误消息时,似乎 scion-browser 需要一个名为“DbModule”的表,但创建的是名为“db_module”的表。所以一定是版本不匹配。但是我不知道如何强制使用另一个版本的 scion-browser 或其他东西。
更新
我发现在这个讨论中有人说我需要输入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)
所以基本上是一样的。