Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't infer engine by filename/extension #795

Closed
Tracked by #792
sgammon opened this issue Apr 18, 2024 · 0 comments · Fixed by #792
Closed
Tracked by #792

Can't infer engine by filename/extension #795

sgammon opened this issue Apr 18, 2024 · 0 comments · Fixed by #792
Labels
bug Something isn't working module:cli CLI module issues and features P0

Comments

@sgammon
Copy link
Member

sgammon commented Apr 18, 2024

Issue description

When running elide.debug ./.../hello.js:

➜  framework git:(release/alpha8) ✗ ./packages/cli/build/native/nativeCompile/elide.debug run ./tools/scripts/hello.js
elide 23:17:58.977 WARN  Python/Ruby do not support embedded or hybrid VFS yet; falling back to host I/O
elide 23:17:59.014 DEBUG Hello, JS!
Exiting session. Have a great day! 👋

elide.debug ./.../hello.py:

elide 23:18:19.844 WARN  Python/Ruby do not support embedded or hybrid VFS yet; falling back to host I/O
elide 23:18:19.877 ERROR Uncaught exception within VM context. Please catch and handle all VM execution exceptions. java.lang.NullPointerException
java.lang.NullPointerException
	at elide.tool.control.AbstractScriptEngineFactory.getEngineName(AbstractScriptEngineFactory.kt:36)
	at java.base@22.0.1/java.util.Comparator.lambda$comparing$ea9a8b3a$1(Comparator.java:440)
	at java.base@22.0.1/java.util.TreeMap.put(TreeMap.java:830)
	at java.base@22.0.1/java.util.TreeMap.put(TreeMap.java:569)
	at java.base@22.0.1/java.util.TreeSet.add(TreeSet.java:259)
	at java.scripting@22.0.1/javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java:106)
	at java.scripting@22.0.1/javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:76)
	at elide.tool.cli.cmd.repl.ToolShellCommand.scriptEngineManager_delegate$lambda$0(ToolShellCommand.kt:542)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at elide.tool.cli.cmd.repl.ToolShellCommand.getScriptEngineManager(ToolShellCommand.kt:541)
	at elide.tool.cli.cmd.repl.ToolShellCommand.primaryFromFile(ToolShellCommand.kt:1447)
	at elide.tool.cli.cmd.repl.ToolShellCommand.resolvePrimaryLanguage-mGOj7VY(ToolShellCommand.kt:1465)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke$lambda$43(ToolShellCommand.kt:1622)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke$lambda$50(ToolShellCommand.kt:1693)
	at elide.tool.cli.AbstractSubcommand.withContext(AbstractSubcommand.kt:543)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke(ToolShellCommand.kt:1641)
	at elide.tool.cli.cmd.repl.ToolShellCommand$invoke$1.invokeSuspend(ToolShellCommand.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at elide.tool.cli.AbstractToolCommand.execute(AbstractToolCommand.kt:129)
	at elide.tool.cli.AbstractToolCommand.call(AbstractToolCommand.kt:153)
	at elide.tool.cli.AbstractToolCommand.run(AbstractToolCommand.kt:164)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at elide.tool.cli.ElideTool$Companion.exec$cli(ElideTool.kt:168)
	at elide.tool.cli.ElideTool$Companion.main$lambda$3(ElideTool.kt:138)
	at elide.tool.cli.ElideTool$Companion.installStatics$lambda$2(ElideTool.kt:123)
	at elide.tool.cli.ElideTool$Companion.installStatics(ElideTool.kt:131)
	at elide.tool.cli.ElideTool$Companion.main(ElideTool.kt:137)
	at elide.tool.cli.ElideTool.main(ElideTool.kt)
elide 23:18:19.877 ERROR Exiting with code -1 due to uncaught java.lang.NullPointerException
Exiting session. Have a great day! 👋

elide.debug ./.../hello.rb:

elide 23:19:29.850 WARN  Python/Ruby do not support embedded or hybrid VFS yet; falling back to host I/O
elide 23:19:29.887 ERROR Uncaught exception within VM context. Please catch and handle all VM execution exceptions. java.lang.NullPointerException
java.lang.NullPointerException
	at elide.tool.control.AbstractScriptEngineFactory.getEngineName(AbstractScriptEngineFactory.kt:36)
	at java.base@22.0.1/java.util.Comparator.lambda$comparing$ea9a8b3a$1(Comparator.java:440)
	at java.base@22.0.1/java.util.TreeMap.put(TreeMap.java:830)
	at java.base@22.0.1/java.util.TreeMap.put(TreeMap.java:569)
	at java.base@22.0.1/java.util.TreeSet.add(TreeSet.java:259)
	at java.scripting@22.0.1/javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java:106)
	at java.scripting@22.0.1/javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:76)
	at elide.tool.cli.cmd.repl.ToolShellCommand.scriptEngineManager_delegate$lambda$0(ToolShellCommand.kt:542)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at elide.tool.cli.cmd.repl.ToolShellCommand.getScriptEngineManager(ToolShellCommand.kt:541)
	at elide.tool.cli.cmd.repl.ToolShellCommand.primaryFromFile(ToolShellCommand.kt:1447)
	at elide.tool.cli.cmd.repl.ToolShellCommand.resolvePrimaryLanguage-mGOj7VY(ToolShellCommand.kt:1465)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke$lambda$43(ToolShellCommand.kt:1622)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke$lambda$50(ToolShellCommand.kt:1693)
	at elide.tool.cli.AbstractSubcommand.withContext(AbstractSubcommand.kt:543)
	at elide.tool.cli.cmd.repl.ToolShellCommand.invoke(ToolShellCommand.kt:1641)
	at elide.tool.cli.cmd.repl.ToolShellCommand$invoke$1.invokeSuspend(ToolShellCommand.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at elide.tool.cli.AbstractToolCommand.execute(AbstractToolCommand.kt:129)
	at elide.tool.cli.AbstractToolCommand.call(AbstractToolCommand.kt:153)
	at elide.tool.cli.AbstractToolCommand.run(AbstractToolCommand.kt:164)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at elide.tool.cli.ElideTool$Companion.exec$cli(ElideTool.kt:168)
	at elide.tool.cli.ElideTool$Companion.main$lambda$3(ElideTool.kt:138)
	at elide.tool.cli.ElideTool$Companion.installStatics$lambda$2(ElideTool.kt:123)
	at elide.tool.cli.ElideTool$Companion.installStatics(ElideTool.kt:131)
	at elide.tool.cli.ElideTool$Companion.main(ElideTool.kt:137)
	at elide.tool.cli.ElideTool.main(ElideTool.kt)
elide 23:19:29.888 ERROR Exiting with code -1 due to uncaught java.lang.NullPointerException
Exiting session. Have a great day! 👋

Meanwhile, via:

➜  framework git:(release/alpha8) ✗ ./packages/cli/build/native/nativeCompile/elide.debug run --language=PYTHON ./tools/scripts/hello.py
elide 23:20:10.403 WARN  Python/Ruby do not support embedded or hybrid VFS yet; falling back to host I/O
elide 23:20:10.525 WARN  Caution: Support for Python considered experimental.
Hello, Python!
Exiting session. Have a great day! 👋

And Ruby:

➜  framework git:(release/alpha8) ✗ ./packages/cli/build/native/nativeCompile/elide.debug run --language=RUBY ./tools/scripts/hello.rb
elide 23:20:38.928 WARN  Python/Ruby do not support embedded or hybrid VFS yet; falling back to host I/O
elide 23:20:39.043 WARN  Caution: Support for Ruby considered experimental.
Hello, Ruby!
Exiting session. Have a great day! 👋
@sgammon sgammon added bug Something isn't working module:cli CLI module issues and features P0 labels Apr 18, 2024
@sgammon sgammon added this to the Release R4: Alpha 8 milestone Apr 18, 2024
@sgammon sgammon mentioned this issue Apr 18, 2024
13 tasks
@sgammon sgammon linked a pull request Apr 25, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:cli CLI module issues and features P0
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant