hydra-java 0.17.6 → 0.17.7
raw patch · 3 files changed
+88/−7 lines, 3 filesdep ~hydra-jvmdep ~hydra-kernelPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hydra-jvm, hydra-kernel
API changes (from Hackage documentation)
- Hydra.Java.Coder: isBigNumericType :: Type -> Bool
+ Hydra.Java.Coder: isBigIntegerType :: Type -> Bool
Files
- CHANGELOG.md +82/−0
- hydra-java.cabal +3/−3
- src/main/haskell/Hydra/Java/Coder.hs +3/−4
CHANGELOG.md view
@@ -15,6 +15,88 @@ --- +## [0.17.7] - 2026-09-14++Correctness-hardening point release on the 0.17.x line, consolidating the 0.17.6 breaking batch. It+closes a family of silent cross-host correctness bugs in the equality, ordering, integer-narrowing+and string primitives, and adds the systematic test coverage that exposed them. No kernel-surface+breaking changes.++### Highlights++- **Silent-wrong primitives corrected across hosts**+ ([#745](https://github.com/CategoricalData/hydra/issues/745),+ [#742](https://github.com/CategoricalData/hydra/issues/742)): new shared cross-host fixtures+ uncovered ~a dozen primitives (`equal`/`compare` on collections, float equality, `bigintToIntN`+ narrowing, `parseUint*` bounds, astral-plane string ops) that returned wrong results on one or more+ non-Haskell hosts while appearing to pass. All are now correct and verified per-host against the+ Haskell reference oracle.+- **Systematic test-coverage hardening**+ ([#749](https://github.com/CategoricalData/hydra/issues/749)): new kernel coverage for previously+ untested primitive behavior (equality/ordering collection depth, `notEqual`, `functions.const`/`flip`),+ which drove wiring those primitives into every host's default-implementation fallback.+- **Scale-preserving decimals across every lossy-double host**+ ([#727](https://github.com/CategoricalData/hydra/issues/727),+ [#719](https://github.com/CategoricalData/hydra/issues/719)): `Literal.decimal` gains a real+ scale-preserving representation (coefficient + scale) in the Scheme, Emacs Lisp, Common Lisp and+ TypeScript runtimes and coders, and the generated `Literal.Decimal` `equals`/`compareTo` on Java,+ Python and Scala stop ignoring scale. The `scaleDistinctTestNames` skip list — which had been+ masking the gap on five hosts — is deleted, so decimal scale is now verified everywhere rather+ than excused.++### Bug fixes++- **[#745](https://github.com/CategoricalData/hydra/issues/745)** silent-wrong equality/ordering,+ `bigintToIntN` narrowing, `parseUint32/64` bounds, and astral-plane `charAt`/`splitOn`/`compare`+ across the eight non-Haskell hosts.+- **[#742](https://github.com/CategoricalData/hydra/issues/742)** structural `equal`/`compare` on+ maps, sets and nested decimals no longer falls back to scale-blind or print-based comparison+ (including a hand-inlined Scala primitive that shadowed the overlay fix).+- **[#743](https://github.com/CategoricalData/hydra/issues/743)** kernel JSON decoder now rejects an+ `Either` object carrying both `left` and `right` keys instead of silently resolving one arm.+- **[#740](https://github.com/CategoricalData/hydra/issues/740)** the recursive parametric union decoder+ now emits an explicit type application instead of an untyped lambda, so recursive parametric-union+ types generate and compile on the Java host; also fixes `update-json-kernel` reconcile to build a+ complete inference universe so drifted kernel modules re-infer.+- **[#720](https://github.com/CategoricalData/hydra/issues/720)** Python's+ `hydra.lib.equality`/`ordering` did not satisfy IEEE `totalOrder` for floats, mis-ordering `NaN`+ and signed zero.+- **[#722](https://github.com/CategoricalData/hydra/issues/722)** two `kernelDefaultCoreProfile`+ correctness defects: rule ids that referred to rules no longer present, and a stubbed+ `isValidName` that accepted every name.++### Improvements++- **[#749](https://github.com/CategoricalData/hydra/issues/749)** `notEqual`/`const`/`flip` wired+ into each host's `#609` default-implementation fallback; orphaned Avro coder test suite recovered.+- **[#730](https://github.com/CategoricalData/hydra/issues/730)** a shared `~/.stack` build slot+ (`bin/with-stack-slot.sh`) replaces the pgrep slot mechanic, serializing concurrent GHC builds+ across the fleet behind a real mutex. The wrapper is now portable to macOS: `flock(1)` is+ util-linux and absent there, so it is emulated via Perl's `flock()` where missing, and the+ GNU-only `date -Is`/`date -d` calls are replaced with portable equivalents. Its bypass path also+ no longer re-execs forever. Without these, every entry point that routes through the slot —+ `bin/sync.sh`, `bin/test.sh`, `bin/run-bootstrapping-demo.sh` and `bin/prepare-release.sh` —+ failed immediately on macOS.+- **[#600](https://github.com/CategoricalData/hydra/issues/600)** the five published TypeScript+ packages are subpath-import-only (uniform export surface).+- **[#716](https://github.com/CategoricalData/hydra/issues/716)** `hydra.paths` reshaped onto the+ term-graph model (`TermGraph`/`TypeGraph`), aligning path steps with the term and type grammars+ and adding the link view of a graph; `mapKey`/`mapValue` collapse into a single `mapEntry` step.+- **[#701](https://github.com/CategoricalData/hydra/issues/701)** module cache freshness is now a+ Merkle hash over each module's dependency closure, so a change deep in the closure correctly+ invalidates dependents.+- **[#559](https://github.com/CategoricalData/hydra/issues/559)** host-agnostic build: the+ remaining hand-coded host build logic is promoted into `hydra.build.*`, with Java as the+ definitive second host.+- **[#721](https://github.com/CategoricalData/hydra/issues/721)** `checkNestedModuleNames` packaging+ check enforces the module-namespace no-prefix rule.++### Documentation++- **[#508](https://github.com/CategoricalData/hydra/issues/508)** de-Claude-speak documentation pass:+ style-guide section added, stale paths and dead links repaired, agent-operations wiki pages moved+ into `claude/`, and a `getting-started.md` guardrail against re-adding a TypeScript root export.+ ## [0.17.6] - 2026-08-30 Point release on the 0.17.x line, and the last backward-incompatible batch before the 1.0 surface
hydra-java.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hydra-java-version: 0.17.6+version: 0.17.7 synopsis: Hydra's Java coder: emit Java source from Hydra modules description: Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". Java support for Hydra category: Data@@ -46,7 +46,7 @@ build-depends: base >=4.19.0 && <4.22 , containers >=0.6.7 && <0.8- , hydra-jvm ==0.17.6- , hydra-kernel ==0.17.6+ , hydra-jvm ==0.17.7+ , hydra-kernel ==0.17.7 , scientific >=0.3.7 && <0.4 default-language: Haskell2010
src/main/haskell/Hydra/Java/Coder.hs view
@@ -1972,7 +1972,7 @@ let fname = Core.unName (Core.fieldTypeName ft) ftype = Core.fieldTypeType ft- in (Logic.ifElse (isBinaryType ftype) (arraysEqualsClause tmpName fname) (Logic.ifElse (isBigNumericType ftype) (compareToZeroClause tmpName fname) (equalsClause tmpName fname)))+ in (Logic.ifElse (isBinaryType ftype) (arraysEqualsClause tmpName fname) (Logic.ifElse (isBigIntegerType ftype) (compareToZeroClause tmpName fname) (equalsClause tmpName fname))) equalsClause :: String -> String -> Syntax.InclusiveOrExpression equalsClause tmpName fname =@@ -2327,11 +2327,10 @@ javaSerializableType, javaComparableType] []) -isBigNumericType :: Core.Type -> Bool-isBigNumericType typ =+isBigIntegerType :: Core.Type -> Bool+isBigIntegerType typ = case (Strip.deannotateType typ) of Core.TypeLiteral v0 -> case v0 of- Core.LiteralTypeDecimal -> True Core.LiteralTypeInteger v1 -> case v1 of Core.IntegerTypeBigint -> True _ -> False