Skip to content

Commit 8187bd8

Browse files
committed
Merge branch 'release/0.5.0'
2 parents eb45bed + 8ba2a1c commit 8187bd8

File tree

162 files changed

+12425
-4779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+12425
-4779
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-java@v3
1414
with:
15-
java-version: 19
15+
java-version: 20
1616
distribution: 'zulu'
1717
cache: 'maven'
1818
- name: Setup fuse
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v3
3636
- uses: actions/setup-java@v3
3737
with:
38-
java-version: 19
38+
java-version: 20
3939
distribution: 'zulu'
4040
cache: 'maven'
4141
- name: Setup fuse
@@ -59,11 +59,11 @@ jobs:
5959
- uses: actions/checkout@v3
6060
- uses: actions/setup-java@v3
6161
with:
62-
java-version: 19
62+
java-version: 20
6363
distribution: 'zulu'
6464
cache: 'maven'
6565
- name: Setup fuse
66-
run: choco install winfsp --version 1.11.22176 -y
66+
run: choco install winfsp --version 1.12.22339 -y
6767
- name: Maven build
6868
shell: bash # surprise, running maven in pwsh is crappy, see https://stackoverflow.com/q/6347985/4014509
6969
run: mvn -B verify -Dfuse.lib.path="C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll"
@@ -83,7 +83,7 @@ jobs:
8383
fetch-depth: 0
8484
- uses: actions/setup-java@v3
8585
with:
86-
java-version: 19
86+
java-version: 20
8787
distribution: 'zulu'
8888
cache: 'maven'
8989
- name: Cache SonarCloud packages

.github/workflows/publish-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
1616
- uses: actions/setup-java@v3
1717
with:
18-
java-version: 19
18+
java-version: 20
1919
distribution: 'zulu'
2020
cache: 'maven'
2121
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml

.github/workflows/publish-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111
- uses: actions/setup-java@v3
1212
with:
13-
java-version: 19
13+
java-version: 20
1414
distribution: 'zulu'
1515
cache: 'maven'
1616
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/HelloWorldFileSystem.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/HelloWorldFileSystem__Windows_.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
# jFUSE
88

9-
Zero-Dependency Java bindings for FUSE using [JEP 424](https://openjdk.org/jeps/424).
9+
Zero-Dependency Java bindings for FUSE using [JEP 434](https://openjdk.org/jeps/434).
1010

1111
## Status
1212

13-
This is currently an experimental library requiring JDK 19. As long as the [Foreign Function & Memory API](https://openjdk.org/jeps/424) is incubating, the required JDK will increase.
13+
This is currently an experimental library requiring JDK 20. As long as the [Foreign Function & Memory API](https://openjdk.org/jeps/434) is incubating, the required JDK will increase.
14+
Older JDK versions are *not supported*. Please refer to an older version of this lib, if you are interested in using it with an older JDK. Older versions will not receive patches or any kind of support, though!
1415

1516
We attempt to support libfuse 3.x on Linux and Windows while also remaining compatible with libfuse 2.x on macOS, leading to some compromises in the API.
1617

jfuse-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>jfuse-parent</artifactId>
8-
<version>0.4.2</version>
8+
<version>0.5.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>jfuse-api</artifactId>

jfuse-api/src/main/java/org/cryptomator/jfuse/api/Fuse.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import org.jetbrains.annotations.VisibleForTesting;
88

99
import java.io.IOException;
10+
import java.lang.foreign.Arena;
1011
import java.lang.foreign.MemorySegment;
11-
import java.lang.foreign.MemorySession;
1212
import java.lang.foreign.SegmentAllocator;
1313
import java.nio.file.Files;
1414
import java.nio.file.Path;
@@ -43,7 +43,7 @@ public abstract class Fuse implements AutoCloseable {
4343
/**
4444
* The memory session associated with the lifecycle of this Fuse instance.
4545
*/
46-
protected final MemorySession fuseScope = MemorySession.openShared();
46+
protected final Arena fuseArena = Arena.openShared();
4747

4848
/**
4949
* The file system operations invoked by this FUSE file system.
@@ -66,7 +66,7 @@ public abstract class Fuse implements AutoCloseable {
6666
*/
6767
protected Fuse(FuseOperations fuseOperations, Function<SegmentAllocator, MemorySegment> structAllocator) {
6868
this.fuseOperations = new MountProbeObserver(fuseOperations, mountProbeSucceeded::countDown);
69-
this.fuseOperationsStruct = structAllocator.apply(fuseScope);
69+
this.fuseOperationsStruct = structAllocator.apply(fuseArena);
7070
fuseOperations.supportedOperations().forEach(this::bind);
7171
}
7272

@@ -108,7 +108,7 @@ public static FuseBuilder builder() {
108108
@Blocking
109109
@MustBeInvokedByOverriders
110110
public synchronized void mount(String progName, Path mountPoint, String... flags) throws FuseMountFailedException, IllegalArgumentException {
111-
if (!fuseScope.isAlive()) {
111+
if (!fuseArena.scope().isAlive()) {
112112
throw new IllegalStateException("Already closed"); //TODO: throw specialized exception
113113
}
114114

@@ -156,8 +156,9 @@ void waitForMountingToComplete(Path mountPoint, Future<Integer> fuseLoop) throws
156156
@Blocking
157157
private int fuseLoop(FuseMount mount) {
158158
AtomicInteger result = new AtomicInteger();
159-
fuseScope.whileAlive(() -> {
160-
result.set(mount.loop());
159+
fuseArena.scope().whileAlive(() -> {
160+
int r = mount.loop();
161+
result.set(r);
161162
});
162163
return result.get();
163164
}
@@ -184,7 +185,7 @@ private int fuseLoop(FuseMount mount) {
184185
@Blocking
185186
@MustBeInvokedByOverriders
186187
public synchronized void close() throws TimeoutException {
187-
if (!fuseScope.isAlive()) {
188+
if (!fuseArena.scope().isAlive()) {
188189
return; // already closed
189190
}
190191
try {
@@ -199,13 +200,13 @@ public synchronized void close() throws TimeoutException {
199200
} catch (InterruptedException e) {
200201
Thread.currentThread().interrupt();
201202
} finally {
202-
fuseScope.close();
203+
fuseArena.close();
203204
}
204205
}
205206

206207
/**
207208
* Decorates the {@link FuseOperations#getattr(String, Stat, FileInfo) getattr} call of a FuseOperations object
208-
* in order to detect accesses to {@value MOUNT_PROBE} system during {@link #waitForMountingToComplete(Path)}.
209+
* in order to detect accesses to {@value MOUNT_PROBE} system during {@link #waitForMountingToComplete(Path, Future)}}.
209210
*
210211
* @param delegate The original FuseOperations object
211212
* @param onObserve Handler to invoke as soon as the desired call is detected

jfuse-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>jfuse-parent</artifactId>
8-
<version>0.4.2</version>
8+
<version>0.5.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>jfuse-examples</artifactId>

0 commit comments

Comments
 (0)