Skip to content

Fix java 25 - #1

Merged
et-nik merged 2 commits into
mainfrom
0723-fix-java-25
Jul 24, 2026
Merged

Fix java 25#1
et-nik merged 2 commits into
mainfrom
0723-fix-java-25

Conversation

@et-nik

@et-nik et-nik commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added Java 25 support for installs and --java version overrides, including making Java 25 the default.
    • Improved Java version recommendations by using Mojang metadata when available, with offline fallback and cached results.
  • Documentation
    • Updated README Java requirements and offline mappings (including 26.2+ → Java 25 and 1.17–1.17.1 → Java 17+).
    • Expanded CLI help for Waterfall, Velocity, and BungeeCord, plus updated Java 25 messaging.
  • Bug Fixes
    • Refined CraftBukkit/Spigot “run” hint formatting.
  • Chores
    • Enhanced CI with go vet ./... and go test ./... runs.

@et-nik
et-nik requested a review from Copilot July 23, 2026 21:49
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 175b1593-220a-46b4-a654-cc9dce4ae74a

📥 Commits

Reviewing files that changed from the base of the PR and between 03ea463 and 925b375.

📒 Files selected for processing (5)
  • README.md
  • internal/providers/java_resolver.go
  • internal/providers/java_resolver_test.go
  • pkg/api/mojang/client.go
  • pkg/api/mojang/client_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/api/mojang/client.go
  • internal/providers/java_resolver.go
  • internal/providers/java_resolver_test.go
  • README.md

📝 Walkthrough

Walkthrough

The 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.

Changes

Java resolution flow

Layer / File(s) Summary
Mojang-backed Java resolver
internal/providers/java_resolver.go, pkg/api/mojang/client.go
Java recommendations use configurable Mojang metadata, cached results, fallback Minecraft-version rules, and supported LTS rounding.
Provider contract and runner integration
internal/providers/*.go, internal/server/runner.go, internal/java/*.go
Provider recommendation methods accept context, callers forward it, and previous package-level and Minecraft-specific Java lookup APIs are removed.
Resolver test coverage
internal/providers/java_resolver_test.go, pkg/api/mojang/client_test.go
Tests cover fallback behavior, metadata resolution, LTS rounding, unavailable or missing data, caching, and configurable manifest URLs.
Java 25 CLI and documentation updates
cmd/mcrun/*.go, README.md
Java 25 becomes the default install version and is added to CLI help, global flags, version requirements, and supported server-type descriptions.

CI validation

Layer / File(s) Summary
Go build and test workflow
.github/workflows/ci.yml
Linux and macOS builds no longer use TinyGo, and a test job runs go vet ./... and go test ./....

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the main change: Java 25 support and related version updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.Context through 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.

Comment thread internal/providers/java_resolver.go Outdated
Comment on lines +95 to +99
// Year-based versions (26.2 and later) require Java 25
if major >= 22 {
return 25
}

Comment thread README.md Outdated
Comment on lines +214 to +215
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:
Comment thread pkg/api/mojang/client.go
Comment on lines +28 to 32
func NewClientWithManifestURL(manifestURL string) *Client {
return &Client{
http: utils.NewHTTPClient(false),
http: utils.NewHTTPClient(false),
manifestURL: manifestURL,
}
@et-nik
et-nik merged commit 9795b5a into main Jul 24, 2026
15 checks passed
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