Repository navigation
feat: bin wrappers for java and csharp - #47
Open
jgrodziski wants to merge 1 commit into
Open
jgrodziski wants to merge 1 commit into
jgrodziski wants to merge 1 commit into
Conversation
build.sh builds the Java jar and the C# binary, but bin/ had no command for either, and docs/metrics.md already told clone users to run ./bin/codegraph-java. - bin/codegraph-java runs extractors/java/target/codegraph-java.jar on the first Java at or above pom.xml's maven.compiler.release, searched in JAVA_HOME, on PATH, under ~/.sdkman, then macOS's java_home. - bin/codegraph-csharp runs extractors/csharp/dist/<host rid>/, with the .exe fallback the ruby and metrics wrappers use. - test.sh: a new gate runs the jar through bin/codegraph-java against fixtures/java (same root rewrite as the native gate); the published C# gate now runs through bin/codegraph-csharp, like elixir and ruby. - ci.yml csharp-smoke downloaded its artifact into bin/, which would overwrite the committed wrapper; it now lands in extractors/csharp/dist/<rid>/, where build.sh publishes it. - CLAUDE.md, build.sh header, extractor READMEs and docs, and the site's install and reference pages name the two commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVh1pKrt8Z17Ln1pEEkq
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codegraph | f32c62d | Commit Preview URL Branch Preview URL |
Nov 05 2026, 11:54 AM |
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.
Why
build.shbuilds every extractor, and five of them already have abin/command: committed wrapper scripts that run their build output, resolved relative to themselves. The Java jar and the C# binary had none, yetdocs/metrics.mdtells clone users to run./bin/codegraph-java, which failed with "no such file".What
bin/codegraph-javarunsextractors/java/target/codegraph-java.jaron the first Java at or abovepom.xml'smaven.compiler.release(17), looking inJAVA_HOME, onPATH, under~/.sdkman, then macOS'sjava_home. A JRE is enough, since ECJ only needs the JVM's class library. Non-interactive shells never source sdkman, so no export is needed. The floor is read from the pom, not hard-coded.bin/codegraph-csharprunsextractors/csharp/dist/<host rid>/codegraph-csharp, with the.exefallback the ruby and metrics wrappers use.test.sh: a new gate runs the jar through./bin/codegraph-javaand must reproducefixtures/java/expected/model.jsonl, with the samerootrewrite as the native gate. The published-C# gate now goes through./bin/codegraph-csharp, as the Elixir and Ruby gates already do with their wrappers.ci.ymlcsharp-smokedownloaded its artifact intobin/. On the four Unix runners that would overwrite the committedbin/codegraph-csharpwrapper. The download now lands inextractors/csharp/dist/<rid>/, wherebuild.shpublishes it, and the job still runs the binary directly.CLAUDE.md, thebuild.shheader,extractors/java/README.md,docs/cli.md,docs/csharp-extractor.mdand the site's install and Java/C# reference pages now name the two commands.Verification
./test.sh --java: green. That covers 220 Maven tests, the jar viabin/codegraph-javamatching the snapshot, and the native binary matching it../test.sh --csharp: green. That covers 84 tests and the published binary viabin/codegraph-csharp, byte for byte../build.sh --…hint and exits 1.JAVA_HOMEis skipped in favor of sdkman's Java 25, which extracts the fixture.JAVA_HOME=21takes precedence.1.8.0_392→8,21→21,17-ea→17,21+35→21.csharp-smokechange runs only in CI on five runners, so this PR is its test.Noticed, not changed
scripts/lib.sh's_java_majormatches onlyN.Nversions, so a JDK printing a bareopenjdk version "21"(an initial GA release) is silently skipped bybuild.shandtest.sh. The new wrapper's parser handles that case.🤖 Generated with Claude Code
https://claude.ai/code/session_01PKCVh1pKrt8Z17Ln1pEEkq