Repository navigation
Commit fdaff4e
committed
feat(java): drive the analyzer through the codeanalyzer-java wheel and drop the bundled jar and JDK download
The Java backend now gets both the analyzer and the JVM it runs on from the
codeanalyzer-java PyPI wheel, pinned at 3.0.2 behind a new optional `java`
extra. 3.0.2 reads its primordial scope from `jrt:/` in the running JVM, so
nothing needs `JAVA_HOME` or a `jmods/` directory any more:
* `JCodeanalyzer._get_codeanalyzer_exec` returns `codeanalyzer_java.command()`.
The import is lazy, so `import cldk` and `import cldk.analysis.java` work
without the extra; running the backend without it raises
CodeanalyzerExecutionException naming the distribution and
`pip install "cldk[java]"`.
* Deleted `cldk/analysis/java/codeanalyzer/_jdk.py` (`ensure_jdk`, the pinned
Temurin download, the ~200 MB per-project JDK cache), the checked-in
`codeanalyzer-2.4.1.jar` and its directory, the `[tool.hatch.build]`
force-include, the root `.gitignore` `*.jar` rule and the
`CLDK_CODEANALYZER_JAVA_JAR` seam the e2e grew while the tree's jar was stale.
* release.yml no longer downloads the pinned jar from the codeanalyzer-java
GitHub release and no longer verifies a jar is bundled in the wheel and
sdist. This retires the mechanism #284, #336 and #337 patched: the wheel pin
is now the single source of the analyzer version, and nothing is fetched at
build time.
* Extras take the thin-base shape 2.0 is heading for: `neo4j`, `java`, and
`all = ["cldk[java]", "cldk[neo4j]"]`. codeanalyzer-python and
codeanalyzer-typescript stay hard dependencies until #340.
* Fixtures regenerated at 3.0.2 with the command lines the v2 README records;
the only content delta against the 3.0.1 pair is `analyzer.version` (verified
by recursive parsed-JSON compare: one differing leaf per file).
Verified: the wheel path with `JAVA_HOME` unset and no JDK on PATH returns the
identical daytrader8 `-a 4` call-graph edge set the 3.0.1 jar returned on the
provisioned Temurin -- 1862 edges, 1378 `declared+rta` / 375 `rta` / 109
`declared`, symmetric difference 0 after normalising the app name. A wheel built
from this tree contains no `.jar`, and neither does the sdist.
Closes #3391 parent 122eccf commit fdaff4e
21 files changed
Lines changed: 174 additions & 370 deletions
File tree
- .github/workflows
- cldk
- analysis/java/codeanalyzer
- jar
- tests
- analysis/java
- models/java
- resources/java/analysis_json/v2
- a1
- a4
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 68 | | |
83 | 69 | | |
84 | 70 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 71 | | |
119 | 72 | | |
120 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
69 | 112 | | |
70 | 113 | | |
71 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 23 | | |
This file was deleted.
0 commit comments