-
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
Using latest GraalVM bits in Enso #8885
Conversation
@@ -1432,6 +1434,7 @@ lazy val frgaalJavaCompilerSetting = | |||
customFrgaalJavaCompilerSettings(targetJavaVersion) | |||
|
|||
def customFrgaalJavaCompilerSettings(targetJdk: String) = Seq( | |||
resolvers += Resolver.mavenLocal, |
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.
This enables usage of JARs from ~/.m2/repository
. To install them update GraalVM to: oracle/graal#8266 in particular commit 853702c407c8fb31116decfefddef87a71203154 and do:
graal/sdk$ mx maven-deploy
graal/truffle$ mx maven-deploy
these two commands install all Truffle & SDK JARs into local repository with version 24.1.0-SNAPSHOT
. The sbt
build can then find them.
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.
As of 253ded5 I am able to execute:
enso$ sbt
sbt> project runtime
sbt:runtime> testOnly *ForeignMethodInvokeTest -- -z org.enso.interpreter.test.ForeignMethodInvokeTest.testParallelInteropWithJavaScript
and that is enough for testing oracle/graal#8266
@@ -2592,6 +2599,7 @@ lazy val `std-base` = project | |||
`base-polyglot-root` / "std-base.jar", | |||
libraryDependencies ++= Seq( | |||
"org.graalvm.polyglot" % "polyglot" % graalMavenPackagesVersion, | |||
"org.graalvm.sdk" % "collections" % graalMavenPackagesVersion, |
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.
Collections are now separated into its own JAR. As the group ID suggests (org.graalvm.sdk
) they are not part of the org.graalvm.polyglot
ecosystem. We should probably stop using them and not expose their classes to libraries. CCing @radeusgd
var counter = new long[1]; | ||
var b = | ||
defaultContextBuilder("enso", "js") | ||
.onDeniedThreadAccess( |
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.
With onDeniedThreadAccess
as proposed by oracle/graal#8266 we have a way to act like an Ethernet on collision and successfully orchestrate the two threads accessing the same context to run into completion.
More info on Ethernet collision detection and behavior - most important "Calculate and wait the random backoff".
Pull Request Description
Using oracle/graal#8266 in Enso. This is an exploratory work using manually built SNAPSHOT bits of GraalVM that will be released as version
24.1
in middle of the year.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.