threatgrid / asami

A graph store for Clojure and ClojureScript
Eclipse Public License 1.0
634 stars 29 forks source link

Undefined when native asami command line -e is missing #179

Open Jacob-Kroeze opened 3 years ago

Jacob-Kroeze commented 3 years ago

What should the native image command line do if -e is missing? $> asami asami:mem://db-store -f db.edn for me throws Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No matching method put found taking 2 args for class java.nio.DirectLongBufferS

noprompt commented 3 years ago

What should the native image command line do if -e is missing?

For me, using what is currently on main, it hangs waiting on STDIN.

Are you able to provide any more details such that I can attempt to reproduce this issue?

quoll commented 2 years ago

This is very unexpected. Right now, running that same command line against an EDN file will have it waiting on stdin without prompting you (if you type in a query it will respond). This is so queries can be piped into the program. Using the --interactive flag will prompt you.

The exception that you show is the unexpected part. Asami code does use buffers from java.nio but that only occurs when the database is in the asami:local: scheme, which is not what you specified.

There have been a couple of updates to the asami CLI since this bug was filed. Are you still seeing the issue?