EclipseFP rebuild local database error

Help
2013-05-09
2013-05-11
  • Earth Engine
    Earth Engine
    2013-05-09

    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)
    

    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.

    version of scion-browser: 0.2.15

     
  • JP Moresmau
    JP Moresmau
    2013-05-09

    Oh dear. I had tested that scion-browser worked with persistent 1.2, but not recreated the database, and I used the wrong method to persist. Try 0.2.16, should fix it!

     
    • Earth Engine
      Earth Engine
      2013-05-11

      The version of GHC, cabal and cabal-install (see discussion in StackOverflow http://stackoverflow.com/questions/16461118/eclipsefp-rebuild-local-database-error/16464257?noredirect=1#comment23675031_16464257) is such a case: the GHC and initial cabal-install are installed through apt-get, but I never updated them since Ubuntu didn't provide any upgrade for them. So the GHC is 7.6.2, and cabal-install is 1.14.0. In addition to it, cabal install cabal-install and cabal install cabal were run in user mode.

      My guess is that the Ubuntu's version of cabal-install is compiled in GHC 7.4, so it causes problems.