Commit 28dc9e6
committed
Remove the lib.name documentation lie + dead LlamaSystemProperties.getLibName()
Deep forensic comparison against kherud/java-llama.cpp (the upstream)
showed that net.ladenthin.llama.lib.name has been a documentation-only
ghost since 2023:
Upstream history of "lib.name":
c8f57f7 (initial JNI commit) - Javadoc mention AND real code consumer:
String nativeLibName = System.getProperty("de.kherud.llama.lib.name");
if (nativeLibName == null) { ... }
7a852d1 - README documents it (-Dde.kherud.llama.lib.name=myname.so)
6bb63e1 ("add ggml shared library to binding") - CODE CONSUMER DELETED.
The loader was extended to load multiple shared libraries (ggml and
jllama as separate files); the single-name-override model became
incompatible. Javadoc + README mentions were left behind.
6d0c4af - README mention removed.
The Javadoc lie in LlamaLoader.java survives upstream to this day.
Bernard's fork inherited the Javadoc lie verbatim and later added a
LlamaSystemProperties.getLibName() getter for "completeness" (every
documented property gets a registry getter) - but the loader code still
hardcodes "jllama" and ignores the override.
Why delete rather than re-wire:
- Upstream deliberately removed the consumer to support multi-library
loading. Re-wiring would either reintroduce the same single-name
limitation upstream removed, or need a new design covering both
libraries.
- This fork has added even more dimensions (CPU / CUDA /
OpenCL-Adreno classifiers); the "one override filename" idea is
even less applicable now than in upstream's day.
- No caller has ever asked for it; the README will be more honest
with one fewer documented-but-broken row.
Changes:
- LlamaSystemProperties.getLibName() deleted (~5 lines).
- LlamaLoader.java Javadoc fixed: lib.name removed from the "set these
properties" sentence; replaced with a multi-paragraph history note
citing upstream commit 6bb63e1 so future readers understand the
property's lifecycle and don't try to "re-add" it.
- README System Properties Reference: lib.name row dropped (was 9 rows,
now 8).
- CLAUDE.md: the registry-cleanup TODO is closed for both subitems
(lib.name DELETED here; osinfo.architecture FIXED in 3ae6c81 by
routing OSInfo.getArchName() through the registry getter).
Tests: OSInfoTest 16/16 + LlamaLoaderTest 21/21 = 37/37 pass.
mvn compile clean.1 parent 3ae6c81 commit 28dc9e6
4 files changed
Lines changed: 16 additions & 16 deletions
File tree
- src/main/java/net/ladenthin/llama
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | 257 | | |
259 | 258 | | |
260 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
Lines changed: 0 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 34 | | |
44 | 35 | | |
45 | 36 | | |
| |||
0 commit comments