Fix java 25 - #1
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe change replaces Minecraft-version Java lookup with a Mojang-backed cached resolver and context-aware provider calls, updates Java 25 CLI guidance, expands server-type documentation, and changes CI to use standard Go builds with vet and tests. ChangesJava resolution flow
CI validation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Runner
participant Provider
participant javaResolver
participant MojangClient
Runner->>Provider: GetRecommendedJavaVersion(ctx, mcVersion)
Provider->>javaResolver: Resolve(ctx, mcVersion)
javaResolver->>MojangClient: GetVersionManifest()
MojangClient-->>javaResolver: Return manifest and version detail
javaResolver-->>Provider: Return rounded Java LTS version
Provider-->>Runner: Return recommended Java version
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Pull request overview
Adds Java 25 support and improves Java version selection by using Mojang version metadata (with an offline fallback), while also expanding documented/advertised support for proxy server types.
Changes:
- Add Java 25 to CLI flags/docs and make Java 25 the default install target.
- Introduce a Mojang-metadata-based Java resolver (with caching and offline heuristics) and plumb
context.Contextthrough provider Java recommendation APIs. - Update CI to run
go vet/go test, and remove TinyGo build steps.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents Java 25 support and updated Java/Minecraft compatibility guidance. |
| pkg/api/mojang/client.go | Allows overriding the Mojang version manifest URL (used by resolver/tests). |
| internal/server/runner.go | Passes ctx into provider Java recommendation. |
| internal/providers/provider.go | Updates Provider interface to accept context.Context for Java recommendation. |
| internal/providers/java_resolver.go | New metadata-driven Java recommendation with offline fallback + LTS rounding. |
| internal/providers/java_resolver_test.go | Adds unit tests for fallback logic, LTS rounding, metadata usage, and caching. |
| internal/providers/vanilla.go | Adapts to new Provider Java recommendation signature and uses resolver. |
| internal/providers/paper.go | Adapts to new Provider Java recommendation signature and uses resolver. |
| internal/providers/spigot.go | Adapts to new signature; minor output formatting change. |
| internal/providers/craftbukkit.go | Adapts to new signature; minor output formatting change. |
| internal/providers/forge.go | Adapts to new Provider Java recommendation signature and uses resolver. |
| internal/providers/fabric.go | Adapts to new Provider Java recommendation signature and uses resolver. |
| internal/providers/waterfall.go | Adapts to new Provider Java recommendation signature (proxy => Java 17). |
| internal/providers/velocity.go | Adapts to new Provider Java recommendation signature (proxy => Java 17). |
| internal/providers/bungeecord.go | Adapts to new Provider Java recommendation signature (proxy => Java 17). |
| internal/providers/cauldron.go | Adapts to new Provider Java recommendation signature (legacy => Java 8). |
| internal/java/version_map.go | Removes legacy Java/Minecraft version mapping utilities. |
| internal/java/manager.go | Removes unused/legacy “get for MC version” helper in favor of new flow. |
| internal/java/detector.go | Removes unused/legacy “find for MC version” helper in favor of new flow. |
| cmd/mcrun/root.go | Updates help text/flags for proxy types and Java 25 override. |
| cmd/mcrun/install.go | Adds Java 25 to help text and makes it the default installation version. |
| .github/workflows/ci.yml | Drops TinyGo build and adds a dedicated vet/test job. |
Comments suppressed due to low confidence (1)
README.md:218
- The table is labeled "Required Java", but the code is selecting a recommended Java version (and may round up to LTS). Renaming the column clarifies that this is guidance for what mcrun will choose, not the absolute minimum required by Mojang.
| Minecraft Version | Required Java |
|-------------------|---------------|
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Year-based versions (26.2 and later) require Java 25 | ||
| if major >= 22 { | ||
| return 25 | ||
| } | ||
|
|
| mcrun automatically selects the correct Java version: the requirement is taken from | ||
| Mojang's version metadata when available, with this table as an offline fallback: |
| func NewClientWithManifestURL(manifestURL string) *Client { | ||
| return &Client{ | ||
| http: utils.NewHTTPClient(false), | ||
| http: utils.NewHTTPClient(false), | ||
| manifestURL: manifestURL, | ||
| } |
Summary by CodeRabbit
--javaversion overrides, including making Java 25 the default.go vet ./...andgo test ./...runs.