-
Notifications
You must be signed in to change notification settings - Fork 16
Add back cabal files for jni, jvm, and inline-java #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a standalone Cabal manifest for the JNI bindings and syncs Bazel rules via gazelle_cabal to restore jni.cabal support.
- Introduce
jni.cabalwith library, executable, and test-suite configurations - Replace the sed-based genrule with a Haskell
cat-tokenspreprocessor tool - Update BUILD rules across tests,
jvm,jvm-types, and top-level projects to wire in the new plugin and tool paths
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/BUILD.bazel | Adjust haskell_test to include size, plugin, tools, deps |
| shell.nix | Refine host_platform instruction message |
| shell-stack.nix | Add Nix shell definition for Stack-based development |
| nixpkgs.nix | Update fetchTarball invocation to use sha256 record |
| jvm/tests/BUILD.bazel | Reorder haskell_test fields for consistency |
| jvm/benchmarks/BUILD.bazel | Reorder haskell_binary fields for consistency |
| jvm/BUILD.bazel | Normalize glob quoting and move visibility earlier |
| jvm-types/src/test/haskell/BUILD.bazel | Update test rule with size and extra_srcs |
| jvm-types/BUILD.bazel | Reorder deps, plugins, and visibility |
| jni/tests/Spec.hs | Adjust HSPEC_DISCOVER preprocessor invocation |
| jni/tests/BUILD.bazel | Remove legacy jni tests BUILD file |
| jni/src/linear-types/Foreign/JNI/Safe.hs | Add GHC OPTIONS for cat-tokens preprocessor |
| jni/src/common/Foreign/JNI/Unsafe/Internal.hs | Add GHC OPTIONS for cat-tokens preprocessor |
| jni/jni.cabal | New Cabal file declaring library, tool, and test-suite |
| jni/cat-tokens/Main.hs | Implement Haskell-based token concatenator |
| jni/cat-tokens | Remove old shell-based concatenator |
| jni/Setup.hs | Add minimal Setup.hs for Cabal support |
| jni/BUILD.bazel | Regenerate Bazel rules for jni.cabal via gazelle_cabal |
| WORKSPACE | Add gazelle_cabal, stackage-exe, and related deps |
| BUILD.bazel | Configure Gazelle integration and update inline-java rule |
| .github/workflows/build.yml | Run bazel gazelle in CI and update job naming |
Comments suppressed due to low confidence (3)
jni/src/linear-types/Foreign/JNI/Safe.hs:66
- [nitpick] This comment references
cat-tokens/Main.hs, but other modules refer tojni/cat-tokens/Main.hs. Please standardize the path so readers can locate the script consistently.
-- a portable way. See cat-tokens/Main.hs.
jni/src/common/Foreign/JNI/Unsafe/Internal.hs:16
- [nitpick] The path in this comment differs from the one in
Safe.hs. Consider unifying the reference to thecat-tokens/Main.hstool location for clarity.
-- a portable way. See note cat-tokens in jni/cat-tokens/Main.hs.
jni/jni.cabal:72
- In the
test-suite specstanza, thetypefield is split across two lines. Cabal expects a single-line scalar (type: exitcode-stdio-1.0), so this should be collapsed to one line.
type:
4f11463 to
9806b24
Compare
4c17f2d to
47526f6
Compare
Addresses #198
This PR configures gazelle_cabal to generate build rules from cabal files.
I had to make
cat-tokens.sha Haskell binary so gazelle_cabal can generate bazel rules that expose it to ghc.