agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

ScriptSessionLoadError: cannot satisfy -trust project-m36 #275

Closed ysangkok closed 3 years ago

ysangkok commented 3 years ago

On my GHC 8.10.3 installation with Cabal-install 3.2, I get this warning when I do cabal run project-m36-server -- --database mydbname --hostname 127.0.0.1:

Building executable 'project-m36-server' for project-m36-0.9.0..
[1 of 1] Compiling Main             ( src/bin/ProjectM36/Server/project-m36-server.hs, /home/janus/project-m36/dist-newstyle/build/x86_64-linux/ghc-8.10.3/project-m36-0.9.0/x/project-m36-server/build/project-m36-server/project-m36-server-tmp/Main.o )
Linking /home/janus/project-m36/dist-newstyle/build/x86_64-linux/ghc-8.10.3/project-m36-0.9.0/x/project-m36-server/build/project-m36-server/project-m36-server ...
Failed to load scripting engine- scripting disabled: ScriptSessionLoadError <command line>: cannot satisfy -trust project-m36
    (use -v for more information)

Is this intended?

When I do cabal run Example-SimpleClient concurrently, I get another error:

Up to date
Example-SimpleClient: ExceptionError "failed to find socket in client map\nCallStack (from HasCallStack):\n  error, called at ./src/lib/ProjectM36/Server.hs:114:16 in project-m36-0.9.0-inplace:ProjectM36.Server"
CallStack (from HasCallStack):
  error, called at ./src/lib/ProjectM36/Client.hs:305:21 in project-m36-0.9.0-inplace:ProjectM36.Client
agentm commented 3 years ago

Yes, the failure to load the scripting engine happens when project-m36 is not installed in your GHC packages with cabal install. The consequence is that the optional ability to add Haskell-scripted database functions at runtime is disabled.

I'll have to take a closer look at the second error- I haven't yet seen that but it should be quick to fix.

Thanks for the detailed reports!

agentm commented 3 years ago

It looks like the example SimpleClient connects to "mytestdb" on localhost which, of course, if one just runs the client standalone, does not exist. I'll make that clearer from the error.