From 337b3d445a609b7e307db480343927fdcaa34112 Mon Sep 17 00:00:00 2001 From: stan0x Date: Wed, 25 Mar 2026 14:54:31 +0100 Subject: [PATCH 1/4] Update Copilot instructions and .gitignore for Maven setup --- .github/copilot-instructions.md | 19 +++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 22 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 2a5c816..ec3075b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,24 @@ # Copilot Instructions +## Prerequisites + +Requires **Java 21+** and **Apache Maven 3.9+**. + +If Maven is not installed, download and extract it (no admin required): + +```powershell +# Download Maven 3.9.8 +Invoke-WebRequest -Uri "https://archive.apache.org/dist/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.zip" -OutFile "$env:TEMP\maven.zip" -UseBasicParsing + +# Extract to .tools/ inside the repo (gitignored) +Expand-Archive -Path "$env:TEMP\maven.zip" -DestinationPath ".tools" -Force + +# Add to PATH for the current session +$env:PATH = "$PWD\.tools\apache-maven-3.9.8\bin;$env:PATH" +``` + +Verify with `mvn -version`. + ## Build & Test ```bash diff --git a/.gitignore b/.gitignore index 86276a4..123f2a3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ target/ .settings/ dependency-reduced-pom.xml +# Local tool installs (Maven, etc.) +.tools/ + # IDE *.iml .idea/ From d75056de1c303fe0104af973591b3561e10be41a Mon Sep 17 00:00:00 2001 From: stan0x Date: Wed, 25 Mar 2026 15:10:50 +0100 Subject: [PATCH 2/4] Add Maven configuration and update Copilot instructions for Java 22+ compatibility --- .github/copilot-instructions.md | 8 ++++++++ .mvn/jvm.config | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 .mvn/jvm.config diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ec3075b..c654ff3 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -19,6 +19,14 @@ $env:PATH = "$PWD\.tools\apache-maven-3.9.8\bin;$env:PATH" Verify with `mvn -version`. +Note: `.mvn/jvm.config` includes `--enable-native-access=ALL-UNNAMED` to suppress Java 22+ warnings from Maven's internal libraries. Remaining guava/sisu warnings are harmless and will be resolved in Maven 4.0. + +When running Maven in PowerShell, pipe through `Out-Host` to avoid stderr warnings showing as red errors: + +```powershell +mvn package -DskipTests 2>&1 | Out-Host +``` + ## Build & Test ```bash diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 0000000..beda4b2 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,4 @@ +--enable-native-access=ALL-UNNAMED +--sun-misc-unsafe-memory-access=allow +--add-opens=java.base/java.lang.reflect=ALL-UNNAMED +--enable-final-field-mutation=ALL-UNNAMED From bf50cb10f68580af7be5c9b3b06f550796f5e4ed Mon Sep 17 00:00:00 2001 From: stan0x Date: Wed, 25 Mar 2026 15:26:17 +0100 Subject: [PATCH 3/4] Refactor sync method to use flatMap for better handling of Observables --- src/main/java/org/quetoo/installer/Manager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/quetoo/installer/Manager.java b/src/main/java/org/quetoo/installer/Manager.java index 8c32431..2914180 100644 --- a/src/main/java/org/quetoo/installer/Manager.java +++ b/src/main/java/org/quetoo/installer/Manager.java @@ -70,7 +70,7 @@ public Observable delta(final Observable indices) { * @return An Observable yielding the synchronized files. */ public Observable sync(final Observable deltas) { - return deltas.concatMap(delta -> delta.getIndex().getSync().sync(delta)) + return deltas.flatMap(delta -> delta.getIndex().getSync().sync(delta)) .doOnNext(file -> { if (file.getParentFile().equals(config.getBin())) { file.setExecutable(true); From 2c6108be37cef3e354e61f4f12a0bd8673a615e6 Mon Sep 17 00:00:00 2001 From: stan0x Date: Wed, 25 Mar 2026 15:51:58 +0100 Subject: [PATCH 4/4] Update Copilot instructions and jvm.config to suppress Java 22+ warnings --- .github/copilot-instructions.md | 2 +- .mvn/jvm.config | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index c654ff3..00c3b43 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -19,7 +19,7 @@ $env:PATH = "$PWD\.tools\apache-maven-3.9.8\bin;$env:PATH" Verify with `mvn -version`. -Note: `.mvn/jvm.config` includes `--enable-native-access=ALL-UNNAMED` to suppress Java 22+ warnings from Maven's internal libraries. Remaining guava/sisu warnings are harmless and will be resolved in Maven 4.0. +Note: `.mvn/jvm.config` includes `--add-opens` to suppress Maven reflection warnings. On Java 22+, additional harmless warnings from Maven's jansi/guava/sisu libraries may appear — these will be resolved in Maven 4.0. When running Maven in PowerShell, pipe through `Out-Host` to avoid stderr warnings showing as red errors: diff --git a/.mvn/jvm.config b/.mvn/jvm.config index beda4b2..e52faa7 100644 --- a/.mvn/jvm.config +++ b/.mvn/jvm.config @@ -1,4 +1 @@ ---enable-native-access=ALL-UNNAMED ---sun-misc-unsafe-memory-access=allow --add-opens=java.base/java.lang.reflect=ALL-UNNAMED ---enable-final-field-mutation=ALL-UNNAMED