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

feat: refactor for jpms support #342

Merged
merged 11 commits into from
Jul 30, 2023
Merged

feat: refactor for jpms support #342

merged 11 commits into from
Jul 30, 2023

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Jul 30, 2023

Ready for review

Summary

  • feat: introduce module configurations for most packages
  • chore: refactor split-package modules (breaking)
  • chore: update all use-sites for Polyglot etc
  • chore: remove stray pnpm lock in tools/scripts

Caution: This commit was restored and needs to be reviewed with care before merging.

Changelog

Coming soon.

@sgammon sgammon added java Pull requests that update Java code feature Large PRs or issues with full-blown features 🚧 WIP Works-in-progress. Blocks merge labels Jul 30, 2023
@sgammon sgammon added this to the Release R2: Alpha 4 milestone Jul 30, 2023
@sgammon sgammon self-assigned this Jul 30, 2023
@github-actions github-actions bot added module:server Modules, changes, and issues relating to Elide for servers module:base Changes and issues relating to the Elide `base` module module:model Modules, changes, and issues relating to the Elide model layer platform:jvm PRs and issues relating to JVM support. tools Issues and PRs related to tooling platform:browser PRs and issues relating to browser support. labels Jul 30, 2023
@sgammon sgammon added module:graalvm Modules, changes, and issues relating to GraalVM module:rpc Modules, changes, and issues relating to the Elide RPC layer module:core Changes and issues relating to the Elide `core` module module:cli CLI module issues and features labels Jul 30, 2023
@@ -1,4 +1,4 @@
registry=https://npm.pkg.st/
#registry=https://npm.pkg.st/
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.21.4":
version "7.21.4"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39"
integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

@@ -0,0 +1,22 @@
package elide.annotations.base
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking: these annotations are moving to avoid split packages

Comment on lines -170 to +168
)
//configureJava9ModuleInfo(project)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix or remove

@@ -1,4 +1,4 @@
package elide.annotations.core
package elide.vm.annotations
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking: the Polyglot annotation is moving. again, to avoid split packages

Comment on lines +193 to +201
// Unused dependencies:
// implementation(libs.lmax.disruptor.proxy)
// implementation(libs.brotli)
// implementation(libs.micronaut.inject.java)
// implementation(libs.micronaut.cache.core)
// implementation(libs.micronaut.cache.caffeine)
// implementation(libs.lz4)
// implementation(libs.flatbuffers.java.core)
// implementation(libs.kotlinx.coroutines.slf4j)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all unused. junit was making it in somehow too.

@@ -1,9 +1,9 @@
package elide.annotations
package elide.core.annotations
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are moving to avoid split packages but are largely unused outside of core library code


/**
* Annotate a member or function as inlined.
*
* This annotation is currently stubbed directly to Kotlin's `JvmInline` annotation, but may be expanded or replaced in
* the future.
*/
public actual typealias Inline = JvmInline
public expect annotation class Inline()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm... ?

@@ -125,32 +125,39 @@ import org.graalvm.polyglot.Engine as VMEngine
description = ["Specify language by name. Options: \${COMPLETION-CANDIDATES}."],
defaultValue = "JS",
)
internal var language: GuestLanguage = GuestLanguage.JS
internal var language: EnumSet<GuestLanguage> = EnumSet.of(GuestLanguage.JS)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear if this works

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropping bundler support (temp)

@@ -129,7 +128,6 @@ public final class elide/runtime/gvm/InvocationMode : java/lang/Enum {
public static final field ASYNC Lelide/runtime/gvm/InvocationMode;
public static final field STREAMING Lelide/runtime/gvm/InvocationMode;
public static final field SYNC Lelide/runtime/gvm/InvocationMode;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really sure why these are getting removed

- feat: introduce module configurations for most packages
- chore: refactor split-package modules (breaking)
- chore: update all use-sites for `Polyglot` etc
- chore: remove stray pnpm lock in `tools/scripts`

Caution: This commit was restored and needs to be reviewed with
care before merging.

Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
- fix: don't link against graalvm modules (use runtime)
- chore: general cleanup of warnings in js runtime

Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
@sgammon sgammon marked this pull request as ready for review July 30, 2023 10:14
@sgammon
Copy link
Member Author

sgammon commented Jul 30, 2023

merging because test failure will be fixed by next pr, and because jpms is working

@sgammon sgammon merged commit 57dad5e into release/alpha4 Jul 30, 2023
19 of 20 checks passed
@sgammon sgammon deleted the feat/jpms branch July 30, 2023 10:16
@sgammon sgammon mentioned this pull request Jul 30, 2023
37 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large PRs or issues with full-blown features java Pull requests that update Java code module:base Changes and issues relating to the Elide `base` module module:cli CLI module issues and features module:core Changes and issues relating to the Elide `core` module module:graalvm Modules, changes, and issues relating to GraalVM module:model Modules, changes, and issues relating to the Elide model layer module:rpc Modules, changes, and issues relating to the Elide RPC layer module:server Modules, changes, and issues relating to Elide for servers platform:browser PRs and issues relating to browser support. platform:jvm PRs and issues relating to JVM support. tools Issues and PRs related to tooling 🚧 WIP Works-in-progress. Blocks merge
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant