Skip to content

Commit

Permalink
Merging with origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jtulach committed Feb 24, 2024
2 parents 4570088 + b810530 commit 372da96
Show file tree
Hide file tree
Showing 4,104 changed files with 39,249 additions and 52,133 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/netbeans_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body:
multiple: false
options:
- "Apache NetBeans 20"
# - "Apache NetBeans 21 release candidate"
- "Apache NetBeans 21 release candidate"
- "Apache NetBeans latest daily build"
validations:
required: true
Expand Down Expand Up @@ -73,13 +73,11 @@ body:
multiple: false
options:
- "No / Don't know"
- "Apache NetBeans 20"
- "Apache NetBeans 19"
- "Apache NetBeans 18"
- "Apache NetBeans 17"
- "Apache NetBeans 16"
- "Apache NetBeans 15"
- "Apache NetBeans 14"
- "Apache NetBeans 13 or earlier"
- "Apache NetBeans 16 or earlier"
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ changelog:
labels:
- 'VSCode Extension'

- title: 'Maintanance'
- title: 'Maintenance'
labels:
- 'Code cleanup'
- 'Upgrade Library'
Expand Down
24 changes: 19 additions & 5 deletions .github/scripts/BinariesListUpdates.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.LongAdder;
import java.util.stream.Stream;
import org.apache.maven.search.api.Record;
import org.apache.maven.search.api.SearchRequest;
import org.apache.maven.search.backend.smo.SmoSearchBackend;
import org.apache.maven.search.backend.smo.SmoSearchBackendFactory;
import org.apache.maven.artifact.versioning.ComparableVersion;

import static java.util.FormatProcessor.FMT;
import static org.apache.maven.search.api.MAVEN.ARTIFACT_ID;
Expand All @@ -45,6 +45,10 @@
*/
public class BinariesListUpdates {

private static final LongAdder updates = new LongAdder();
private static final LongAdder checks = new LongAdder();
private static final LongAdder skips = new LongAdder();

// java --enable-preview --source 22 --class-path "lib/*" BinariesListUpdates.java /path/to/netbeans/project
public static void main(String[] args) throws IOException, InterruptedException {

Expand All @@ -63,6 +67,8 @@ public static void main(String[] args) throws IOException, InterruptedException
}
});
}

System.out.println(STR."checked \{checks.sum()} dependencies, found \{updates.sum()} updates, skipped \{skips.sum()}." );
}

private static void checkDependencies(Path path, SmoSearchBackend backend) throws IOException, InterruptedException {
Expand Down Expand Up @@ -91,15 +97,18 @@ private static void checkDependencies(Path path, SmoSearchBackend backend) throw
latest = queryLatestVersion(backend, gid, aid, classifier.split("@")[0]);
gac = String.join(":", gid, aid, classifier);
}
if (!version.equals(latest)) {
if (latest != null && !version.equals(latest)) {
System.out.println(FMT." %-50s\{gac} \{version} -> \{latest}");
updates.increment();
}
} catch (IOException | InterruptedException ex) {
throw new RuntimeException(ex);
}
} else {
System.out.println(" skip: '"+l+"'");
skips.increment();
}
checks.increment();
});
}
System.out.println();
Expand All @@ -119,8 +128,13 @@ private static String queryLatestVersion(SmoSearchBackend backend, String gid, S
private static String queryLatestVersion(SmoSearchBackend backend, SearchRequest request) throws IOException, InterruptedException {
requests.acquire();
try {
List<Record> result = backend.search(request).getPage();
return !result.isEmpty() ? result.getFirst().getValue(VERSION) : null;
return backend.search(request).getPage().stream()
.map(r -> r.getValue(VERSION))
.filter(v -> !v.contains("alpha") && !v.contains("beta"))
.filter(v -> !v.contains("M") && !v.contains("m") && !v.contains("B") && !v.contains("b") && !v.contains("ea"))
.limit(5)
.max((v1, v2) -> new ComparableVersion(v1).compareTo(new ComparableVersion(v2)))
.orElse(null);
} finally {
requests.release();
}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/dependency-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ jobs:
timeout-minutes: 20
steps:

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '22-ea'
distribution: 'zulu'

- name: Checkout ${{ github.ref }} ( ${{ github.sha }} )
uses: actions/checkout@v4
with:
Expand All @@ -54,11 +48,11 @@ jobs:

- name: Check Dependencies
run: |
mvn -q dependency:get -Dartifact=org.apache.maven.indexer:search-backend-smo:7.1.1
mvn -q dependency:copy -Dartifact=org.apache.maven.indexer:search-backend-smo:7.1.1 -DoutputDirectory=./lib
mvn -q dependency:copy -Dartifact=org.apache.maven.indexer:search-api:7.1.1 -DoutputDirectory=./lib
mvn -q dependency:copy -Dartifact=com.google.code.gson:gson:2.10.1 -DoutputDirectory=./lib
mvn -q dependency:copy -Dartifact=org.apache.maven:maven-artifact:3.9.6 -DoutputDirectory=./lib
echo "<pre>" >> $GITHUB_STEP_SUMMARY
java --enable-preview --source 22 -cp "lib/*" .github/scripts/BinariesListUpdates.java ./ | tee -a $GITHUB_STEP_SUMMARY
$JAVA_HOME_21_X64/bin/java --enable-preview --source 21 -cp "lib/*" .github/scripts/BinariesListUpdates.java ./ | tee -a $GITHUB_STEP_SUMMARY
echo "</pre>" >> $GITHUB_STEP_SUMMARY
rm -Rf lib
Loading

0 comments on commit 372da96

Please sign in to comment.