-
Notifications
You must be signed in to change notification settings - Fork 323
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
Missing foreign language generates proper Enso error. #3798
Conversation
a462842
to
41ded64
Compare
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/node/ForeignEvalNode.java
Show resolved
Hide resolved
RuntimeOptions.LANGUAGE_HOME_OVERRIDE, | ||
Paths.get("../../distribution/component").toFile().getAbsolutePath() | ||
).build(); | ||
this.ctx = Context.newBuilder("enso") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried here this.ctx = Context.newBuilder("enso", "js")
, but it appears that even with "js" as permitted language, engine does not see "js", even though I have it installed. @hubertp Do you have any suggestions how to include "js" language here? It's not that important, I just wanted to add another test that would successfully call js foreign method, but would fail on python foreign method.
41ded64
to
ac9c763
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Please improve the end-developer message to not mention Truffle, to list all installed languages, etc.
...ime-language-epb/src/main/java/org/enso/interpreter/epb/runtime/ForeignParsingException.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/test/java/org/enso/interpreter/test/ForeignMethodInvokeTest.java
Show resolved
Hide resolved
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/node/ForeignEvalNode.java
Outdated
Show resolved
Hide resolved
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/node/ForeignEvalNode.java
Show resolved
Hide resolved
ac9c763
to
0f0928e
Compare
Pull Request Description
Trying to invoke a foreign method with non-installed language (either not enabled in the Truffle
Context
, or not installed in the GraalVM distribution) results inPolyglot_Error
, rather than crashing the entire engine.Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.