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

State sharing breaks native SSR #35

Closed
Tracked by #10
sgammon opened this issue Jul 18, 2022 · 0 comments · Fixed by #81
Closed
Tracked by #10

State sharing breaks native SSR #35

sgammon opened this issue Jul 18, 2022 · 0 comments · Fixed by #81
Assignees
Labels
bug Something isn't working module:graalvm Modules, changes, and issues relating to GraalVM platform:jvm PRs and issues relating to JVM support.

Comments

@sgammon
Copy link
Member

sgammon commented Jul 18, 2022

See below:

➜  elide-v3 git:(v3) ✗ ./samples/fullstack/react-ssr/server/build/native/nativeCompile/server
01:03:47.245 [io.micronaut.context.DefaultBeanContext:main] INFO  sample - Reading bootstrap environment configuration
01:03:47.280 [io.micronaut.runtime.Micronaut:main] INFO  sample - Startup completed in 73ms. Server Running: http://localhost:8080
01:04:22.786 [elide.runtime.graalvm.JsRuntime:pool-7-thread-1] DEBUG sample - Setting JS VM property: 'StaticProperty(symbol=js.strict, staticValue=true)': 'true'
01:04:22.786 [elide.runtime.graalvm.JsRuntime:pool-7-thread-1] DEBUG sample - Setting JS VM property: 'RuntimeProperty(name=vm.js.ecma, symbol=js.ecmascript-version, defaultValue=2020, getter=null)': '2020'
01:04:23.061 [io.micronaut.http.server.RouteExecutor:io-executor-thread-2] ERROR sample - Unexpected error occurred: TypeError: invokeMember (state) on elide.runtime.graalvm.JsRuntime$ExecutionInputs@7eadfe1a failed due to: Unknown identifier: state
org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (state) on elide.runtime.graalvm.JsRuntime$ExecutionInputs@7eadfe1a failed due to: Unknown identifier: state
	at <js>.Companion.x(Unnamed:25192)
	at <js>.renderContent_0(Unnamed:25710)
	at <js>.renderContent(Unnamed:25707)
	at org.graalvm.polyglot.Value.execute(Value.java:841)
	at elide.runtime.graalvm.JsRuntime.evalExecuteScript$graalvm(JsRuntime.kt:698)
	at elide.runtime.graalvm.JsRuntime$executeBackground$1.invoke(JsRuntime.kt:725)
	at elide.runtime.graalvm.JsRuntime$executeBackground$1.invoke(JsRuntime.kt:724)
	at elide.runtime.graalvm.JsRuntime$ManagedContext.exec(JsRuntime.kt:385)
	at elide.runtime.graalvm.JsRuntime$Companion$VMExecution.call(JsRuntime.kt:91)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.lang.Thread.run(Thread.java:833)
	at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
	at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
@sgammon sgammon added bug Something isn't working module:graalvm Modules, changes, and issues relating to GraalVM platform:jvm PRs and issues relating to JVM support. labels Jul 18, 2022
@sgammon sgammon added this to the Release R1: Alpha 1 milestone Jul 18, 2022
@sgammon sgammon self-assigned this Jul 18, 2022
@sgammon sgammon mentioned this issue Jul 18, 2022
30 tasks
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 19, 2022
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
sgammon added a commit that referenced this issue Nov 29, 2022
![Ready for
review](https://badgen.net/badge/Status/Ready%20for%20review/green)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=elide-dev&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality later
down the road once the build flow is perfected. A number of other
important changes are also enclosed which prepare the lib for an initial
beta release.

### Related PRs
- elide-dev/plugin-gradle#74

## Changes enclosed
- [x] Cleanup all workflow configs
- [x] Add sharing of codebase-wide properties
- [x] Add ABI check validation (fixes and closes #70), + build step
- [x] Refactor convention plugins (relates to #71)
- [x] Prep version catalog and platform releases (relates to #73)
- [x] Prep for SSG compiler (relates to #65 and #76)
- [x] Fix state sharing issue (fixes and closes #35)
- [x] Continuous JMH benchmarks
- [x] Minimum JVM level -> `11`
- [x] Working initial set of compiler plugins
- [x] Invocation of SSG compiler from CLI and programmatically
- [x] SSG compiler implementation code
  - [x] Read manifest
  - [x] Generate requests
  - [x] Write to zip
  - [x] Write to tarball
  - [x] Write to directory
- [x] Final cleanup / known issues
  - [x] KotlinX add'l co-routine deps
  - [x] Fix issue with absolute archive paths
  - [x] Drop inline docs
  - [x] Drop inline protos
  - [x] Fix all Sonar warnings, etc
  - [x] Invocation of SSG compiler from Gradle plugin
  - [x] Check spawned requests for uniqueness
  - [x] Check written files for collisions
  - [x] ~~Compression for inner files?~~
  - [x] ~~JAR loading mode -- do we need a shadow JAR?~~ _note: yes_
  - [x] ~~Finish JAR loading mode~~
  - [x] TAR writing issues
  - [x] Finish implementing directory mode
  - [x] ~~Native distribution (maybe?)~~
  - [x] Curtail verbose logging before push
- [x] ~~URL rewriting issues (i.e. shut off rewriting on target app)~~
_note: kicked to issue #91_
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:graalvm Modules, changes, and issues relating to GraalVM platform:jvm PRs and issues relating to JVM support.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant