diff --git a/.github/workflows/functionGraphDemo.yml b/.github/workflows/functionGraphDemo.yml index 8cb718b8a..7739f6386 100644 --- a/.github/workflows/functionGraphDemo.yml +++ b/.github/workflows/functionGraphDemo.yml @@ -1,12 +1,12 @@ -name: functionGraphDemo +name: archive/functionGraphDemo on: push: paths: - - 'functionGraphDemo/**' + - 'archive/functionGraphDemo/**' - '.github/workflows/functionGraphDemo.yml' pull_request: paths: - - 'functionGraphDemo/**' + - 'archive/functionGraphDemo/**' - '.github/workflows/functionGraphDemo.yml' schedule: - cron: "0 0 1 * *" # run every month @@ -28,7 +28,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Run 'functionGraphDemo' run: | - cd functionGraphDemo + cd archive/functionGraphDemo npm install $GRAALVM_HOME/bin/node --version $GRAALVM_HOME/bin/node --jvm --polyglot server.js & diff --git a/.github/workflows/polyglot-chat-app.yml b/.github/workflows/polyglot-chat-app.yml index 4829ba1cf..a12dc4e27 100644 --- a/.github/workflows/polyglot-chat-app.yml +++ b/.github/workflows/polyglot-chat-app.yml @@ -1,12 +1,12 @@ -name: polyglot-chat-app +name: archive/polyglot-chat-app on: push: paths: - - 'polyglot-chat-app/**' + - 'archive/polyglot-chat-app/**' - '.github/workflows/polyglot-chat-app.yml' pull_request: paths: - - 'polyglot-chat-app/**' + - 'archive/polyglot-chat-app/**' - '.github/workflows/polyglot-chat-app.yml' schedule: - cron: "0 0 1 * *" # run every month @@ -28,7 +28,7 @@ jobs: cache: 'gradle' - name: Run 'polyglot-chat-app' run: | - cd polyglot-chat-app + cd archive/polyglot-chat-app ./gradlew build # pre-build application ./gradlew run & sleep 10 diff --git a/.github/workflows/polyglot-debug.yml b/.github/workflows/polyglot-debug.yml index 46cccc10d..1625a1177 100644 --- a/.github/workflows/polyglot-debug.yml +++ b/.github/workflows/polyglot-debug.yml @@ -1,12 +1,12 @@ -name: polyglot-debug +name: archive/polyglot-debug on: push: paths: - - 'polyglot-debug/**' + - 'archive/polyglot-debug/**' - '.github/workflows/polyglot-debug.yml' pull_request: paths: - - 'polyglot-debug/**' + - 'archive/polyglot-debug/**' - '.github/workflows/polyglot-debug.yml' schedule: - cron: "0 0 1 * *" # run every month @@ -28,6 +28,6 @@ jobs: cache: 'maven' - name: Run 'polyglot-debug' run: | - cd polyglot-debug + cd archive/polyglot-debug mvn --no-transfer-progress clean package mvn exec:exec \ No newline at end of file diff --git a/functionGraphDemo/README.md b/archive/functionGraphDemo/README.md similarity index 97% rename from functionGraphDemo/README.md rename to archive/functionGraphDemo/README.md index 60cc4e385..1ec508c63 100644 --- a/functionGraphDemo/README.md +++ b/archive/functionGraphDemo/README.md @@ -24,7 +24,7 @@ This is a multi-language application mixing JavaScript, Java, and R to demonstra git clone https://github.com/graalvm/graalvm-demos ``` ```bash - cd graalvm-demos/functionGraphDemo + cd graalvm-demos/archive/functionGraphDemo ``` 3. Build the application by running `npm install`. @@ -48,4 +48,4 @@ Restart the application to see what else can you do with the mix of JavaScript, ## Debugging Polyglot Applications -GraalVM supports [debugging polyglot applications](https://www.graalvm.org/22.3/tools/chrome-debugger/) too, add the `--inspect` parameter to the command line, open the URL the application prints at the startup in Chrome browser. You can debug, set breakpoints, evaluate expressions in this app in the JavaScript and R code alike. +GraalVM supports [debugging polyglot applications](https://www.graalvm.org/22.3/tools/chrome-debugger/) too, add the `--inspect` parameter to the command line, open the URL the application prints at the startup in Chrome browser. You can debug, set breakpoints, evaluate expressions in this app in the JavaScript and R code alike. \ No newline at end of file diff --git a/functionGraphDemo/functionGraph.r b/archive/functionGraphDemo/functionGraph.r similarity index 100% rename from functionGraphDemo/functionGraph.r rename to archive/functionGraphDemo/functionGraph.r diff --git a/functionGraphDemo/package-lock.json b/archive/functionGraphDemo/package-lock.json similarity index 100% rename from functionGraphDemo/package-lock.json rename to archive/functionGraphDemo/package-lock.json diff --git a/functionGraphDemo/package.json b/archive/functionGraphDemo/package.json similarity index 100% rename from functionGraphDemo/package.json rename to archive/functionGraphDemo/package.json diff --git a/functionGraphDemo/public/index.html b/archive/functionGraphDemo/public/index.html similarity index 100% rename from functionGraphDemo/public/index.html rename to archive/functionGraphDemo/public/index.html diff --git a/functionGraphDemo/public/script.js b/archive/functionGraphDemo/public/script.js similarity index 100% rename from functionGraphDemo/public/script.js rename to archive/functionGraphDemo/public/script.js diff --git a/functionGraphDemo/server.js b/archive/functionGraphDemo/server.js similarity index 100% rename from functionGraphDemo/server.js rename to archive/functionGraphDemo/server.js diff --git a/functionGraphDemo/validator.rb b/archive/functionGraphDemo/validator.rb similarity index 100% rename from functionGraphDemo/validator.rb rename to archive/functionGraphDemo/validator.rb diff --git a/galaaz-ggplot/README.md b/archive/galaaz-ggplot/README.md similarity index 100% rename from galaaz-ggplot/README.md rename to archive/galaaz-ggplot/README.md diff --git a/polyglot-chat-app/.gitignore b/archive/polyglot-chat-app/.gitignore similarity index 100% rename from polyglot-chat-app/.gitignore rename to archive/polyglot-chat-app/.gitignore diff --git a/polyglot-chat-app/README.md b/archive/polyglot-chat-app/README.md similarity index 97% rename from polyglot-chat-app/README.md rename to archive/polyglot-chat-app/README.md index a322464bc..78d4cf12e 100644 --- a/polyglot-chat-app/README.md +++ b/archive/polyglot-chat-app/README.md @@ -66,4 +66,4 @@ The Python code has to be shipped in a _resources_ directory that is kept next t ### Learn More -Learn more about GraalVM polyglot capabilities [here](https://www.graalvm.org/latest/reference-manual/polyglot-programming/). +Learn more about GraalVM polyglot capabilities [here](https://www.graalvm.org/reference-manual/embed-languages/). \ No newline at end of file diff --git a/polyglot-chat-app/build.gradle b/archive/polyglot-chat-app/build.gradle similarity index 100% rename from polyglot-chat-app/build.gradle rename to archive/polyglot-chat-app/build.gradle diff --git a/polyglot-chat-app/gradle.properties b/archive/polyglot-chat-app/gradle.properties similarity index 100% rename from polyglot-chat-app/gradle.properties rename to archive/polyglot-chat-app/gradle.properties diff --git a/polyglot-chat-app/gradle/wrapper/gradle-wrapper.jar b/archive/polyglot-chat-app/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from polyglot-chat-app/gradle/wrapper/gradle-wrapper.jar rename to archive/polyglot-chat-app/gradle/wrapper/gradle-wrapper.jar diff --git a/polyglot-chat-app/gradle/wrapper/gradle-wrapper.properties b/archive/polyglot-chat-app/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from polyglot-chat-app/gradle/wrapper/gradle-wrapper.properties rename to archive/polyglot-chat-app/gradle/wrapper/gradle-wrapper.properties diff --git a/polyglot-chat-app/gradlew b/archive/polyglot-chat-app/gradlew similarity index 100% rename from polyglot-chat-app/gradlew rename to archive/polyglot-chat-app/gradlew diff --git a/polyglot-chat-app/gradlew.bat b/archive/polyglot-chat-app/gradlew.bat similarity index 100% rename from polyglot-chat-app/gradlew.bat rename to archive/polyglot-chat-app/gradlew.bat diff --git a/polyglot-chat-app/micronaut-cli.yml b/archive/polyglot-chat-app/micronaut-cli.yml similarity index 100% rename from polyglot-chat-app/micronaut-cli.yml rename to archive/polyglot-chat-app/micronaut-cli.yml diff --git a/polyglot-chat-app/settings.gradle b/archive/polyglot-chat-app/settings.gradle similarity index 100% rename from polyglot-chat-app/settings.gradle rename to archive/polyglot-chat-app/settings.gradle diff --git a/polyglot-chat-app/src/main/java/websocket/chat/Application.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/Application.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/Application.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/Application.java diff --git a/polyglot-chat-app/src/main/java/websocket/chat/ChatWebSocket.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/ChatWebSocket.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/ChatWebSocket.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/ChatWebSocket.java diff --git a/polyglot-chat-app/src/main/java/websocket/chat/MessageHandler.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/MessageHandler.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/MessageHandler.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/MessageHandler.java diff --git a/polyglot-chat-app/src/main/java/websocket/chat/PolyglotContextFactories.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/PolyglotContextFactories.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/PolyglotContextFactories.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/PolyglotContextFactories.java diff --git a/polyglot-chat-app/src/main/java/websocket/chat/PolyglotMessageHandlerFactory.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/PolyglotMessageHandlerFactory.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/PolyglotMessageHandlerFactory.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/PolyglotMessageHandlerFactory.java diff --git a/polyglot-chat-app/src/main/java/websocket/chat/ScriptsConfig.java b/archive/polyglot-chat-app/src/main/java/websocket/chat/ScriptsConfig.java similarity index 100% rename from polyglot-chat-app/src/main/java/websocket/chat/ScriptsConfig.java rename to archive/polyglot-chat-app/src/main/java/websocket/chat/ScriptsConfig.java diff --git a/polyglot-chat-app/src/main/resources/application.yml b/archive/polyglot-chat-app/src/main/resources/application.yml similarity index 100% rename from polyglot-chat-app/src/main/resources/application.yml rename to archive/polyglot-chat-app/src/main/resources/application.yml diff --git a/polyglot-chat-app/src/main/resources/logback.xml b/archive/polyglot-chat-app/src/main/resources/logback.xml similarity index 100% rename from polyglot-chat-app/src/main/resources/logback.xml rename to archive/polyglot-chat-app/src/main/resources/logback.xml diff --git a/polyglot-chat-app/src/main/resources/public/index.html b/archive/polyglot-chat-app/src/main/resources/public/index.html similarity index 100% rename from polyglot-chat-app/src/main/resources/public/index.html rename to archive/polyglot-chat-app/src/main/resources/public/index.html diff --git a/polyglot-chat-app/src/main/resources/public/style.css b/archive/polyglot-chat-app/src/main/resources/public/style.css similarity index 100% rename from polyglot-chat-app/src/main/resources/public/style.css rename to archive/polyglot-chat-app/src/main/resources/public/style.css diff --git a/polyglot-chat-app/src/main/resources/public/websocketDemo.js b/archive/polyglot-chat-app/src/main/resources/public/websocketDemo.js similarity index 100% rename from polyglot-chat-app/src/main/resources/public/websocketDemo.js rename to archive/polyglot-chat-app/src/main/resources/public/websocketDemo.js diff --git a/polyglot-chat-app/src/main/resources/scripts/init.py b/archive/polyglot-chat-app/src/main/resources/scripts/init.py similarity index 100% rename from polyglot-chat-app/src/main/resources/scripts/init.py rename to archive/polyglot-chat-app/src/main/resources/scripts/init.py diff --git a/polyglot-chat-app/src/main/resources/scripts/nltk.py b/archive/polyglot-chat-app/src/main/resources/scripts/nltk.py similarity index 100% rename from polyglot-chat-app/src/main/resources/scripts/nltk.py rename to archive/polyglot-chat-app/src/main/resources/scripts/nltk.py diff --git a/archive/polyglot-debug/README.MD b/archive/polyglot-debug/README.MD new file mode 100644 index 000000000..be0dec35c --- /dev/null +++ b/archive/polyglot-debug/README.MD @@ -0,0 +1,33 @@ +# Debugging a Java with JavaScript Embedding Application + +GraalVM supports debugging of [polyglot applications](https://www.graalvm.org/latest/reference-manual/polyglot-programming/). +You can attach compatible debuggers such as Chrome Developer Tools to a process running on GraalVM. +To debug guest language applications, pass the `--inspect` option to the command line launcher. + +## Prerequisites + +Download and install the GraalVM JDK using [SDKMAN!](https://sdkman.io/). +```bash +sdk install java 21.0.1-graal +``` +For other installation options, visit the [Downloads page](https://www.graalvm.org/downloads/). + +## Build and Run the Application + +2. Clone the repository and navigate into the `polyglot-debug` directory: + ```bash + git clone https://github.com/graalvm/graalvm-demos + ``` + ```bash + cd graalvm-demos/archive/polyglot-debug + ``` +3. Build the application using Maven: + ```bash + mvn clean package + ``` +4. Run this application with the following command: + ```bash + mvn exec:exec + ``` + +Learn more about [debugging with Chrome Debugger](https://www.graalvm.org/latest/tools/chrome-debugger/) at the website. \ No newline at end of file diff --git a/polyglot-debug/pom.xml b/archive/polyglot-debug/pom.xml similarity index 100% rename from polyglot-debug/pom.xml rename to archive/polyglot-debug/pom.xml diff --git a/polyglot-debug/src/main/java/module-info.java b/archive/polyglot-debug/src/main/java/module-info.java similarity index 100% rename from polyglot-debug/src/main/java/module-info.java rename to archive/polyglot-debug/src/main/java/module-info.java diff --git a/polyglot-debug/src/main/java/org/graalvm/demos/PolyglotDebug.java b/archive/polyglot-debug/src/main/java/org/graalvm/demos/PolyglotDebug.java similarity index 100% rename from polyglot-debug/src/main/java/org/graalvm/demos/PolyglotDebug.java rename to archive/polyglot-debug/src/main/java/org/graalvm/demos/PolyglotDebug.java diff --git a/polyglot-debug/src/main/resources/org/graalvm/demos/fib.js b/archive/polyglot-debug/src/main/resources/org/graalvm/demos/fib.js similarity index 100% rename from polyglot-debug/src/main/resources/org/graalvm/demos/fib.js rename to archive/polyglot-debug/src/main/resources/org/graalvm/demos/fib.js diff --git a/polyglot-chat-app/src/main/resources/venv/pyvenv.cfg b/polyglot-chat-app/src/main/resources/venv/pyvenv.cfg deleted file mode 100644 index 14935482b..000000000 --- a/polyglot-chat-app/src/main/resources/venv/pyvenv.cfg +++ /dev/null @@ -1,2 +0,0 @@ -include-system-site-packages = false -version = 3.10.8 diff --git a/polyglot-debug/README.MD b/polyglot-debug/README.MD deleted file mode 100644 index 3a648464e..000000000 --- a/polyglot-debug/README.MD +++ /dev/null @@ -1,43 +0,0 @@ -# Debugging a Java with JavaScript Embedding Application - -This sample code helps to demonstrate simplicity of debugging and developing GraalVM polyglot applications using Visual Studio (VS) Code extensions. - -## Prerequisites - -1. Install VS Code and launch it. -2. Then go to VS Code Extensions activity panel and search for _GraalVM Extension Pack_, install it. The GraalVM Extension Pack will install all required extensions. -2. Open Visual Studio Code, navigate to Extensions activity panel in the left-hand side Activity Bar. Search for “GraalVM” in the search field. Find [GraalVM Tools for Java](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm), press Install. Reload if required. -3. [Install GraalVM in VS Code](https://www.graalvm.org/latest/tools/vscode/graalvm-extension/#graalvm-installation-wizard): Navigate to Gr activity panel in VS Code and install the latest Oracle GraalVM version available from the list. -4. Confirm to set this as _Active GraalVM_ for VS Code. - -## Build and Run the Application - -1. Open VS Code Terminal. -2. Clone the repository and navigate into the `polyglot-debug` directory: - ```bash - git clone https://github.com/graalvm/graalvm-demos - ``` - ```bash - cd graalvm-demos/polyglot-debug - ``` - -3. Build the application using Maven: - ```bash - mvn clean package - ``` -4. Run this application with the following command: - ```bash - mvn exec:exec - ``` - -## Debug the Application - -Debugging a polyglot application should work out of the box in VS Code with the GraalVM extension. - -1. Place breakpoints in _PolyglotDebug.java_. - -2. To debug the project, go to __Run and Debug__ activity or simply press F5. - -3. Choose **Launch Java 8+** as this is the Polyglot debugger provided by the GraalVM extension. - -That is, the sample is running using the GraalVM debugger.