Commit 513c677
feat: add a JPMS module descriptor (#25)
* feat: add a JPMS module descriptor (io.github.dfa1.zstd)
- module-info.java exports the single public package. Lets modular
consumers `requires io.github.dfa1.zstd` and scope native access with
`--enable-native-access=io.github.dfa1.zstd` instead of ALL-UNNAMED.
- Suppress the module-name lint: the `dfa1` component ends in a digit
(flagged as possibly version-like), but it mirrors the verified
io.github.dfa1 namespace and the package, so keep it.
- NativeLibrary now loads the bundled library through the class loader
(no leading slash) rather than Class#getResourceAsStream: the library
lives in a separate zstd-native-<classifier> module and a named module
only finds resources in itself. The classifier directory has a dash, so
it is not a package and the resource is not module-encapsulated — the
class loader reads it across modules and on the classpath alike.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: changelog + reference.md for the JPMS module descriptor; accept ADR 0011
CHANGELOG.md — 0.8 Added entry for the module-info.java change.
docs/reference.md — spell out the module-path native-access flag
(--enable-native-access=io.github.dfa1.zstd) and add a Module path
section describing the export surface and classpath fallback.
adr/0011-jpms-module-descriptor.md, adr/ADR.md — flip status
Proposed -> Accepted now that the descriptor is implemented.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 657e5c1 commit 513c677
6 files changed
Lines changed: 43 additions & 6 deletions
File tree
- adr
- docs
- zstd/src/main/java
- io/github/dfa1/zstd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | | - | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments