Skip to content

Conversation

@facundominguez
Copy link
Member

Updates bazel and stack configurations.

Updates linear-base to 0.5.0.

Updates text dependency which changed from using Word16 to using Word8.

Fixes a few warnings.

Updates the inline-java plugin to use the latest GHC API.

@facundominguez facundominguez requested a review from Copilot July 13, 2025 20:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 on ghc; 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.packCStringLen but Data.ByteString is not imported as BS. Add import qualified Data.ByteString as BS (and any required Foreign imports) to bring BS.packCStringLen into scope.
              BS.packCStringLen (castPtrWord16 ptr, fromIntegral n * 2)

Comment on lines +88 to +93
CStub
( text bctable_header
$$ dotClasses dcs
$$ cConstructors
)
[] []
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@facundominguez facundominguez merged commit 5737080 into master Jul 14, 2025
4 of 7 checks passed
@facundominguez facundominguez deleted the fd/ghc-9.10.2 branch July 14, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants