Skip to content

Commit ef97417

Browse files
dfa1claude
andcommitted
build(zstd): single zstd-platform dependency (0.3)
Bump io.github.dfa1.zstd to 0.3 and collapse the three OS-activated zstd-native-<platform> profiles into one dependency on the zstd-platform marker jar, which transitively brings the zstd binding plus the native libzstd for every supported platform. Declared optional/runtime at the parent level (mirroring the zstd binding's opt-in nature) so it is not forced on downstream consumers, and added to the BOM + dependencyManagement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 70d6c89 commit ef97417

3 files changed

Lines changed: 26 additions & 58 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
### Changed
1616

17-
- The `vortex.zstd` encoding now compresses and decompresses through `io.github.dfa1.zstd:zstd` (FFM bindings to the native `libzstd`) instead of `io.airlift:aircompressor-v3`. Consumers of `vortex.zstd` must declare the `zstd` dependency plus the `zstd-native-<platform>` artifact for their platform (e.g. `zstd-native-osx-aarch64`, `zstd-native-linux-x86_64`).
17+
- The `vortex.zstd` encoding now compresses and decompresses through `io.github.dfa1.zstd:zstd` (FFM bindings to the native `libzstd`) instead of `io.airlift:aircompressor-v3`. Consumers of `vortex.zstd` declare a single dependency, `io.github.dfa1.zstd:zstd-platform`, which transitively brings the `zstd` binding plus the native `libzstd` for every supported platform (replacing the former per-platform `zstd-native-<platform>` artifacts).
1818

1919
### Fixed
2020

bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
<artifactId>zstd</artifactId>
2525
<version>${zstd.version}</version>
2626
</dependency>
27+
<dependency>
28+
<!-- Marker jar bundling zstd plus native libzstd for all platforms. -->
29+
<groupId>io.github.dfa1.zstd</groupId>
30+
<artifactId>zstd-platform</artifactId>
31+
<version>${zstd.version}</version>
32+
</dependency>
2733
<dependency>
2834
<groupId>io.github.dfa1.vortex</groupId>
2935
<artifactId>vortex-core</artifactId>

pom.xml

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<maven.compiler.release>25</maven.compiler.release>
5959
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6060
<!-- production -->
61-
<zstd.version>0.2</zstd.version>
61+
<zstd.version>0.3</zstd.version>
6262

6363

6464
<fastcsv.version>4.3.0</fastcsv.version>
@@ -195,6 +195,14 @@
195195
<artifactId>zstd</artifactId>
196196
<version>${zstd.version}</version>
197197
</dependency>
198+
<dependency>
199+
<!-- Marker jar that transitively pulls zstd plus the native libzstd for every
200+
supported platform; the zstd FFM loader picks the one matching the runtime
201+
platform. Replaces the former per-platform zstd-native-<platform> artifacts. -->
202+
<groupId>io.github.dfa1.zstd</groupId>
203+
<artifactId>zstd-platform</artifactId>
204+
<version>${zstd.version}</version>
205+
</dependency>
198206
<dependency>
199207
<groupId>com.github.luben</groupId>
200208
<artifactId>zstd-jni</artifactId>
@@ -285,6 +293,16 @@
285293
<version>${bytebuddy.version}</version>
286294
<scope>test</scope>
287295
</dependency>
296+
<!-- Native libzstd for every supported platform, bundled by the zstd-platform marker
297+
jar; provides the runtime library the zstd FFM bindings load during our own build
298+
and tests. Optional like the zstd binding itself: not forced on downstream consumers,
299+
who add zstd-platform themselves (version pinned by the BOM). No per-OS profile. -->
300+
<dependency>
301+
<groupId>io.github.dfa1.zstd</groupId>
302+
<artifactId>zstd-platform</artifactId>
303+
<scope>runtime</scope>
304+
<optional>true</optional>
305+
</dependency>
288306
</dependencies>
289307

290308
<build>
@@ -436,62 +454,6 @@
436454
</build>
437455

438456
<profiles>
439-
<profile>
440-
<!-- io.github.dfa1.zstd:zstd ships no bundled native; its FFM loader reads
441-
libzstd from a /native/<platform>/ classpath resource carried by a separate
442-
zstd-native-<platform> artifact. Pull in the one matching the build host.
443-
Add more platforms as needed. -->
444-
<id>zstd-native-osx-aarch64</id>
445-
<activation>
446-
<os>
447-
<family>mac</family>
448-
<arch>aarch64</arch>
449-
</os>
450-
</activation>
451-
<dependencies>
452-
<dependency>
453-
<groupId>io.github.dfa1.zstd</groupId>
454-
<artifactId>zstd-native-osx-aarch64</artifactId>
455-
<version>${zstd.version}</version>
456-
<scope>runtime</scope>
457-
</dependency>
458-
</dependencies>
459-
</profile>
460-
<profile>
461-
<id>zstd-native-linux-x86_64</id>
462-
<activation>
463-
<os>
464-
<family>unix</family>
465-
<name>linux</name>
466-
<arch>amd64</arch>
467-
</os>
468-
</activation>
469-
<dependencies>
470-
<dependency>
471-
<groupId>io.github.dfa1.zstd</groupId>
472-
<artifactId>zstd-native-linux-x86_64</artifactId>
473-
<version>${zstd.version}</version>
474-
<scope>runtime</scope>
475-
</dependency>
476-
</dependencies>
477-
</profile>
478-
<profile>
479-
<id>zstd-native-windows-x86_64</id>
480-
<activation>
481-
<os>
482-
<family>windows</family>
483-
<arch>amd64</arch>
484-
</os>
485-
</activation>
486-
<dependencies>
487-
<dependency>
488-
<groupId>io.github.dfa1.zstd</groupId>
489-
<artifactId>zstd-native-windows-x86_64</artifactId>
490-
<version>${zstd.version}</version>
491-
<scope>runtime</scope>
492-
</dependency>
493-
</dependencies>
494-
</profile>
495457
<profile>
496458
<!-- Activated in CI: ./mvnw verify -P coverage -->
497459
<!-- Attaches the JaCoCo agent to surefire/failsafe and writes one

0 commit comments

Comments
 (0)