Skip to content

Conversation

peterzhuamazon
Copy link
Contributor

@peterzhuamazon peterzhuamazon commented Sep 23, 2025

Add Temurin JDK25 and JRE25 version 25.0.0-36 to scoop

Closes #561

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

Adds two new Scoop manifests for Temurin 25: JDK and JRE (Windows x64). Each includes metadata, architecture-specific URLs and hashes, extract directory, PATH/JAVA_HOME setup, and checkver/autoupdate logic using GitHub API responses and regex parsing.

Changes

Cohort / File(s) Summary of Changes
New Temurin 25 manifests
bucket/temurin25-jdk.json, bucket/temurin25-jre.json
Added Scoop JSON manifests for Temurin 25 JDK and JRE (win-x64), including description, homepage, version, license, 64-bit download URL and SHA256, extract_dir, env_add_path, env_set, checkver (API + script + regex + replace), and autoupdate (URL templating, hash URL/regex, extract_dir).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant U as User
    participant S as Scoop
    participant API as GitHub API (Temurin)
    participant R as Release Assets
    participant H as .sha256.txt

    rect rgb(235, 245, 255)
    note over U,S: Installation / Update Check
    U->>S: scoop install/update temurin25-(jdk|jre)
    S->>API: GET /.../releases/25/ga (Windows x64)
    API-->>S: JSON of assets (tags, names, links)
    S->>S: PowerShell script + regex extract ver/link/name
    S-->>U: Version resolved
    end

    rect rgb(240, 255, 240)
    note over S,R: Download and Verify
    S->>R: Download ZIP via templated URL
    S->>H: Fetch corresponding .sha256.txt
    H-->>S: SHA256
    S->>S: Verify hash, extract to extract_dir
    S->>S: Set PATH (bin) and JAVA_HOME
    S-->>U: Installed
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

review-needed

Suggested reviewers

  • se35710

Poem

I thump-thump code with whiskered cheer,
Two fresh brews of Java hop in here. ☕🐇
JDK and JRE take the stage,
Tags and hashes neatly caged.
With PATH and HOME set just so—
Off I bound, to compile and go!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description follows the repository template and includes a short summary and the contributing checklist, but it leaves the required issue reference as the placeholder "Closes #XXXX / Relates to #XXXX" and does not show that a relevant issue was opened or referenced as the template mandates. Replace the placeholder "Closes #XXXX / Relates to #XXXX" with the actual issue number (or remove it and explicitly state why no issue is necessary) and ensure you have opened or linked the required Package Request or Bug Report and confirmed you searched for similar issues as required by the contributing guide.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title is concise and accurately summarizes the primary change — adding Temurin JDK25 and JRE25 version 25.0.0-36 to Scoop — and directly matches the added manifest files in the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

temurin25-jdk

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

temurin25-jre

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
bucket/temurin25-jdk.json (1)

17-27: Tighten regex to reduce overmatching and lock to JDK assets

Current character class [dejkr]{3} can match unintended triplets. Constrain to jdk explicitly and avoid greedy whitespace matches.

Apply:

-        "regex": "(?<ver>.*?) https://github.com/(?<link>.*?)/tag/(?<tag>.*?) (?<name>(?<prefix>OpenJDK[\\dU]*-[dejkr]{3})_x64_(?<suffix>.*))",
+        "regex": "(?<ver>.*?) https://github.com/(?<link>[^\\s]+)/tag/(?<tag>[^\\s]+) (?<name>(?<prefix>OpenJDK\\d+U-jdk)_x64_(?<suffix>.*))",
bucket/temurin25-jre.json (1)

17-27: Tighten regex to reduce overmatching and lock to JRE assets

Constrain to jre explicitly; avoid permissive character class and greedy whitespace.

Apply:

-        "regex": "(?<ver>.*?) https://github.com/(?<link>.*?)/tag/(?<tag>.*?) (?<name>(?<prefix>OpenJDK[\\dU]*-[dejkr]{3})_x64_(?<suffix>.*))",
+        "regex": "(?<ver>.*?) https://github.com/(?<link>[^\\s]+)/tag/(?<tag>[^\\s]+) (?<name>(?<prefix>OpenJDK\\d+U-jre)_x64_(?<suffix>.*))",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 586bcbf and 3eac047.

📒 Files selected for processing (2)
  • bucket/temurin25-jdk.json (1 hunks)
  • bucket/temurin25-jre.json (1 hunks)
🔇 Additional comments (6)
bucket/temurin25-jdk.json (3)

1-16: Manifest structure and metadata look solid

Description/homepage/version/license, PATH/JAVA_HOME, and extract_dir are consistent with Temurin packaging. Initial URL points to the correct GitHub release artifact name for JDK x64.


28-39: Autoupdate block is correct and consistent with Adoptium layout

URL templating, hash retrieval via .sha256.txt, and extract_dir from tag look good.


8-12: Verify SHA256 and extract_dir

Automation failed (script produced a shell error) — confirm .architecture["64bit"].hash in bucket/temurin25-jdk.json equals the first token from the upstream .sha256.txt (URL at .architecture["64bit"].url) and that extract_dir equals the release tag (decode %2B → +).

bucket/temurin25-jre.json (3)

1-16: Manifest structure and metadata look solid

Fields align with Temurin JRE packaging. extract_dir jdk-25+36-jre matches expected folder layout.


28-39: Autoupdate block looks correct

URL, hash regex, and extract_dir templating with -jre suffix are consistent.


8-12: Verify upstream SHA256 and extract_dir alignment (-jre suffix)

Runner couldn't fetch the upstream .sha256.txt so the hash couldn't be validated; extract_dir is "jdk-25+36-jre" which matches tag "jdk-25+36" — confirm the SHA256 in bucket/temurin25-jre.json (66abb3213ce984ecb7b3ae7edfeac2d58622297f8c114eb467518dd63e42aa3f) matches the upstream checksum.

@peterzhuamazon
Copy link
Contributor Author

Hi @se35710 would you kindly take a look at this?

Thanks!

@se35710 se35710 merged commit c4dbdff into ScoopInstaller:master Sep 25, 2025
4 checks passed
f-cramer pushed a commit to f-cramer/scoop-java that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] Adding Temurin-25
2 participants