Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the project to GHC 9.10.2 and its associated tooling, bumps key dependencies (notably linear-base to 0.5.0 and adjusts the text usage from Word16 to Word8), and refactors parts of the Inline Java plugin to work with the latest GHC API.
- Bump GHC version and resolver in Bazel, Nix, Stack, and Cabal files.
- Update
linear-base,singletons-base, and upper bounds onghc; remove outdated snapshot. - Adjust
text-related code paths (UTF-16 → UTF-8/Word8) and fix minor warnings in plugin and JNI helpers.
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Language/Java/Inline/Safe.hs | Introduce flipLinearApp helper for linear application updates. |
| src/Language/Java/Inline/Plugin.hs | Refactor plugin to use Reduction and fromMaybe; wrap stubs in CStub. |
| src/Language/Java/Inline/Internal/QQMarker/Safe.hs | Add TypeOperators pragma for updated type-syntax use. |
| src/Language/Java/Inline/Internal/QQMarker.hs | Add TypeOperators pragma for updated type-syntax use. |
| src/GhcPlugins/Extras.hs | Import GHC.Core.Reduction, adjust findTHName and failWith to new API. |
| snapshot-9.10.2.yaml | Add new resolver nightly-2025-07-12 with linear-base-0.5.0. |
| snapshot-9.0.2.yaml | Remove outdated stack snapshot. |
| shell-stack.nix | Default Nix ghcAttr updated to ghc9102. |
| jvm/src/common/Language/Java/Unsafe.hs | Add CChar vector instances to match Word8-based text usage. |
| jvm/src/common/Language/Java/Internal.hs | Add TypeOperators pragma for updated type-syntax use. |
| jvm/jvm.cabal | Bump linear-base constraint to >=0.5 && <0.6. |
| jvm-batching/src/main/haskell/Language/Java/Batching.hs | Rewrite batch Text reify/reflect to use UTF-16LE via Word8. |
| jni/src/common/Foreign/JNI/Unsafe/Internal.hs | Simplify JNIError reporting by extracting location string. |
| jni/jni.cabal | Bump linear-base and singletons-base constraints. |
| inline-java.cabal | Extend GHC upper bound to <9.11> and update linear-base bound. |
| benchmarks/wizzardo-http/src/main/haskell/Language/Java/Function.hs | Parameterize StablePtrHandle over Type for modern GHC generics. |
| WORKSPACE | Point to new local snapshot, update ghc attribute and flags. |
Comments suppressed due to low confidence (1)
jvm-batching/src/main/haskell/Language/Java/Batching.hs:616
- The code uses
BS.packCStringLenbutData.ByteStringis not imported asBS. Addimport qualified Data.ByteString as BS(and any requiredForeignimports) to bringBS.packCStringLeninto scope.
BS.packCStringLen (castPtrWord16 ptr, fromIntegral n * 2)
facundominguez
commented
Jul 13, 2025
Comment on lines
+88
to
+93
| CStub | ||
| ( text bctable_header | ||
| $$ dotClasses dcs | ||
| $$ cConstructors | ||
| ) | ||
| [] [] |
Member
Author
There was a problem hiding this comment.
This is the most uncertain part of the change. It seems to work, but the documentation of CStub doesn't promise any support for constructor functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates bazel and stack configurations.
Updates
linear-baseto 0.5.0.Updates
textdependency which changed from usingWord16to usingWord8.Fixes a few warnings.
Updates the
inline-javaplugin to use the latest GHC API.