Skip to content

Commit

Permalink
Fix error with evicted ClassLoader in tools (Maven/Gradle)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsilaev committed Sep 13, 2022
1 parent ee0abd3 commit 6edb743
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 29 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.4/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.4) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.5/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.5) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
# Why async-await?
Asynchronous programming has long been a useful way to perform operations that don’t necessarily need to hold up the flow or responsiveness of an application. Generally, these are either compute-bound operations or I/O bound operations. Compute-bound operations are those where computations can be done on a separate thread, leaving the main thread to continue its own processing, while I/O bound operations involve work that takes place externally and may not need to block a thread while such work takes place. Common examples of I/O bound operations are file and network operations.

Expand All @@ -18,7 +18,7 @@ First, add Maven dependency to the library runtime:
<dependency>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.runtime</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
</dependency>
```
Second, add the following build plugins in the specified order:
Expand All @@ -29,7 +29,7 @@ Second, add the following build plugins in the specified order:
<plugin>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.tools.maven</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<executions>
<execution>
<id>tascalate-async-enhance-main-classes</id>
Expand Down Expand Up @@ -85,7 +85,7 @@ buildscript {
}
dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.4'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
/* other plugins */
}
Expand All @@ -101,7 +101,7 @@ repositories {
}
dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.4'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
/* other dependencies */
}
```
Expand All @@ -113,7 +113,7 @@ buildscript {
}
dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.4'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
/* other plugins */
}
Expand All @@ -129,20 +129,20 @@ repositories {
}
dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.4'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
/* Async/Await Extras */
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.4'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.5'
/* Promise<T> implementation */
/* Necessary because net.tascalate.async.extras uses it as an */
/* 'optional' dependency to avoid concrete version lock-in. */
implementation 'net.tascalate:net.tascalate.concurrent:0.9.6'
/* Necessary only for different providers */
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.4'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.5'
/*
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.4'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.5'
*/
Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
12 changes: 6 additions & 6 deletions net.tascalate.async.examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.4'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
}
}
Expand All @@ -19,12 +19,12 @@ repositories {
}

dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.4'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.4'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.5'

/* Necessary only for different providers */
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.4'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.4'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.5'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.5'

/* Promise<T> implementation */
/* Necessary because net.tascalate.async.extras uses it as an */
Expand All @@ -44,7 +44,7 @@ dependencies {
}

group = 'net.tascalate.async.examples'
version = '1.2.4'
version = '1.2.5'
description = 'Tascalate Async/Await - Simple Examples'
java.sourceCompatibility = JavaVersion.VERSION_1_9

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.extras/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.propagated/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.provided/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.scoped/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.swing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public static AsyncAwaitClassFileGenerator createGenerator(List<URL> classPath)
ClassLoader effectiveClassLoader = loadAdditionalClassPath(classPath);
return new AsyncAwaitClassFileGenerator(
new ClasspathResourceLoader(effectiveClassLoader)
);
) {
@SuppressWarnings("unused")
private final Object hardRef = effectiveClassLoader;
};
}

private static ClassLoader loadAdditionalClassPath(List<URL> classPath) {
Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.gradle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<packaging>pom</packaging>

<name>Tascalate Async/Await</name>
Expand Down

0 comments on commit 6edb743

Please sign in to comment.