SOMns icon indicating copy to clipboard operation
SOMns copied to clipboard

SOMns command-line interface without launcher script (som-native)

Open smarr opened this issue 4 years ago • 0 comments

When not using the launcher script som, we seem to have a few issues.

  • ./som-native errors with a NPE
  • having som-native in another folder gives a cryptic error

@sophie-kaleba you have any other issues?

NPE

./som-native
VM arguments, need to come before any application arguments:

  --platform file-name   SOM Platform module to be loaded
                         file-name defaults to 'core-lib/Platform.ns'
  --kernel file-name     SOM Kernel module to be loaded
                         file-name defaults to 'core-lib/Kernel.ns'

  --debug                Run in Truffle Debugger/REPL
  --web-debug            Start web debugger

  --profile              Enable the TruffleProfiler
  --dynamic-metrics      Enable the DynamicMetrics tool
  --si-candidates        Enable the Super-instruction candidate tool
  --coveralls REPO_TOKEN Enable the Coverage tool and reporting to Coveralls.io
Exception in thread "main" org.graalvm.polyglot.PolyglotException: java.lang.NullPointerException
	at som.interpreter.SomLanguage$ShutdownContext.execute(SomLanguage.java:265)
	at <SOMns> null(Unknown)
	at org.graalvm.polyglot.Context.eval(Context.java:344)
	at som.Launcher.main(Launcher.java:46)
Original Internal Error:
java.lang.NullPointerException
	at som.interpreter.SomLanguage$ShutdownContext.execute(SomLanguage.java:265)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:476)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:451)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:421)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:135)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:339)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:329)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:821)
	at org.graalvm.polyglot.Context.eval(Context.java:344)
	at som.Launcher.main(Launcher.java:46)
Caused by: Attached Guest Language Frames (1)

Cryptic Error

cp som-native core-lib
cd core-lib
./som-native TestSuite/TestRunner.ns
Exception in thread "main" org.graalvm.polyglot.PolyglotException: java.lang.RuntimeException: java.io.FileNotFoundException: core-lib/Platform.ns

smarr avatar Jan 22 '20 21:01 smarr