-
Notifications
You must be signed in to change notification settings - Fork 327
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
Upgrading to Truffle libraries 24.2.0 #12500
base: develop
Are you sure you want to change the base?
Conversation
|
There is bunch of Postgress failures related to missing polyglot java import java.lang.StringBuilder as Java_String_Builder
main size=0 =
sb = Java_String_Builder.new
sb.append "Hello World"
if size == 0 then sb.toString else
sb.setLength size
sb.toString when invoke without any arguments, it prints sbt:enso> runEngineDistribution --run s.enso 5
Execution finished with an error: No_Such_Method.Error
at <enso> s.main<arg-2>(s.enso:7:9-25)
at <enso> s.main(s.enso:6-8)
No_Such_Method.Error with current PR. In Reproducing with Graal.jsThis is a simple reproducer which doesn't involve Enso, but uses Graal.js instead: var code = """
(function(sb, len) {
sb.setLength(len);
});
""";
var ctx = Context.create("js");
var fn = ctx.eval("js", code);
var sb = new StringBuilder("Hello World");
sb.setLength(10);
fn.execute(sb, 5);
System.out.println(sb); when this code is executed, it fails on Exception in thread "main" TypeError: invokeMember (setLength) on java.lang.StringBuilder failed due to: Unknown identifier: setLength
at <js> :anonymous(Unnamed:2:25-41)
at org.graalvm.polyglot.Value.execute(Value.java:930)
at cz.xelfi.demo.nosetlength.NoSetLength.main(NoSetLength.java:19) e.g.
|
a7c7e97
to
58a1550
Compare
$ git diff
diff --git test/Base_Tests/src/Semantic/Python_Interop_Spec.enso test/Base_Tests/src/Semantic/Python_Interop_Spec.enso
index d96a1f0e79..25c6fc9bc7 100644
--- test/Base_Tests/src/Semantic/Python_Interop_Spec.enso
+++ test/Base_Tests/src/Semantic/Python_Interop_Spec.enso
@@ -26,7 +26,7 @@ type My_Type
foreign python do_catch self = """
try:
- self.do_throw()
+ self.do_throw(self)
except: # Polyglot exceptions can only be caught with except-all.
return self.a
|
Jaroslav Tulach reports a new STANDUP for yesterday (2025-03-19): Progress: .
|
GraalPy version 24.2.0
GraalPy version 24.0.0
Consistent
|
Now there is a remaining failure when running the IDE (CCing @farmaazon, just for case):
How can this be influenced by change of Truffle libraries!? This code is executed before any Truffle code runs! Isn't this some unrelated failure? |
Jaroslav Tulach reports a new STANDUP for yesterday (2025-03-20): Progress: .
|
Jaroslav Tulach reports a new STANDUP for yesterday (2025-03-21): Progress: .
|
When I execute the Enso GUI & engine, I see the engine stops at:
|
Jaroslav Tulach reports a new STANDUP for the last Saturday (2025-03-22): Progress: .
|
The new Truffle must be confused by Enso threads that are started, but doing nothing. As far as I can guess, it tries to invoke a safepoint action, but our threads, that are not executing (just blocked on a lock) do not allow for doing that. The following patch workarounds the initialization problem: $ git diff
diff --git engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
index c688e12645..8439bd05dd 100644
--- engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
+++ engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
@@ -48,6 +48,12 @@ final class EpbContext {
* @param preInitializeLanguages comma separated list of languages to immediately initialize
*/
public void initialize(String preInitializeLanguages) {
+ for (var entry : env.getInternalLanguages().entrySet()) {
+ var l = entry.getValue();
+ if ("regex".equals(l.getId())) {
+ env.initializeLanguage(l);
+ }
+ }
if (!isInner) {
if (innerContext == null) {
innerContext =
diff --git engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java
index cbdfa11bf8..c7dc3270f0 100644
--- engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java
+++ engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java
@@ -212,6 +212,7 @@ public final class EnsoContext {
pkg -> packageRepository.registerMainProjectPackage(pkg.libraryName(), pkg));
var preinit = environment.getOptions().get(RuntimeOptions.PREINITIALIZE_KEY);
+ preinit = "regex";
if (preinit != null && preinit.length() > 0) {
var epb = environment.getInternalLanguages().get("epb");
@SuppressWarnings("unchecked") by initializing the |
Jaroslav Tulach reports a new STANDUP for yesterday (2025-03-24): Progress: .
|
Pull Request Description
New version of Truffle libraries and Graal.js and GraalPython implementations is just around corner delivering needed API enhancements like threadAccessDeniedHandler. Let's get ready for the update and check what our CI thinks about it.
Important Notes
Necessary conditions for integration:
Once we upgrade to
24.2.0
APIs we:Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,