Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,6 +65,25 @@ jobs:
- name: Build Package
run: uv build

- name: Verify the codeanalyzer JAR is bundled
# Guard against the hatchling/.gitignore regression (issue #284): a jarless wheel
# installs fine but fails at runtime with "codeanalyzer jar not found". Fail the
# release here rather than publish a broken artifact to PyPI.
run: |
set -euo pipefail
jar_re='codeanalyzer/jar/codeanalyzer-[0-9][^/]*\.jar$'
ok=1
for f in dist/*.whl; do
unzip -l "$f" | grep -qE "$jar_re" || { echo "::error::$f is missing the codeanalyzer JAR"; ok=0; }
done
for f in dist/*.tar.gz; do
tar tzf "$f" | grep -qE "$jar_re" || { echo "::error::$f is missing the codeanalyzer JAR"; ok=0; }
done
if [ "$ok" -ne 1 ]; then
echo "Refusing to publish a jarless release."; exit 1
fi
echo "codeanalyzer JAR present in wheel and sdist ✓"

- name: Read Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- **Published wheels bundle the `codeanalyzer-java` JAR again.** Every hatchling-built wheel/sdist
since v1.2.0 shipped without the JAR, so `pip install cldk` + `CLDK.java(...)` raised
`CodeanalyzerExecutionException: codeanalyzer jar not found`. The root `.gitignore` `*.jar` rule
was applied at build time while the nested `!codeanalyzer-*.jar` negation (which keeps the JAR in
git) was not honored, silently dropping the JAR from any build run inside a git repo — i.e. CI. A
`[tool.hatch.build] artifacts` rule force-includes it, and the release workflow now fails if a
built artifact is missing the JAR. (#284)

## [v1.4.3] - 2026-07-14

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,6 +74,13 @@ test = [
requires = ["hatchling"]
build-backend = "hatchling.build"

# The codeanalyzer-java JAR is force-included here: it lives under a `*.jar` .gitignore
# (re-included for git via a nested `!codeanalyzer-*.jar`), but hatchling honors the root
# ignore and not the nested negation, so without this it is silently dropped from every
# wheel/sdist built inside a git repo (i.e. in CI). See issue #284.
[tool.hatch.build]
artifacts = ["cldk/analysis/java/codeanalyzer/jar/*.jar"]

[tool.hatch.build.targets.wheel]
packages = ["cldk"]

Expand Down