-
Notifications
You must be signed in to change notification settings - Fork 108
microsoft-lts-jdk: Update to Version 25.0.2 #570
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
base: master
Are you sure you want to change the base?
Changes from all commits
1fcea29
ae3cf68
568a217
74b0837
45f1b35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,16 @@ | ||||||
| { | ||||||
| "description": "The Microsoft Build of OpenJDK is a no-cost long-term supported distribution and Microsoft's way to collaborate and contribute to the Java ecosystem.", | ||||||
| "description": "The Microsoft Build of OpenJDK is a new no-cost long-term supported distribution and Microsoft's new way to collaborate and contribute to the Java ecosystem", | ||||||
| "homepage": "https://www.microsoft.com/openjdk/", | ||||||
| "version": "21.0.10", | ||||||
| "version": "25.0.2", | ||||||
| "license": "GPL-2.0-only WITH Classpath-exception-2.0", | ||||||
| "architecture": { | ||||||
| "64bit": { | ||||||
| "url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.10-windows-x64.zip", | ||||||
| "hash": "45a44af1f832e720ea6ad90dd7b2c94a48b2e5bf2fab92b2403e975f78d7d5e1" | ||||||
| "url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.2-windows-x64.zip", | ||||||
| "hash": "38d1a42d189c50b24152014ef131931f25f4cc80400ce618f0477f5e4e5aa252" | ||||||
| }, | ||||||
| "arm64": { | ||||||
b4imetu marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| "url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.10-windows-aarch64.zip", | ||||||
| "hash": "924c7127929aeb90019c1982a26b0a88337aed00ef333afb0bec28c06a6b5767" | ||||||
| "url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.2-windows-aarch64.zip", | ||||||
| "hash": "e0d9380cf3d0b5efc675664fa0db22cc9eb5d77c4fd2a132f4b58df0608593cf" | ||||||
| } | ||||||
| }, | ||||||
| "extract_to": "tmp", | ||||||
|
|
@@ -25,8 +25,8 @@ | |||||
| "JAVA_HOME": "$dir" | ||||||
| }, | ||||||
| "checkver": { | ||||||
| "url": "https://docs.microsoft.com/java/openjdk/download", | ||||||
| "regex": "(?<ms>microsoft-jdk-((?<ver>21[\\d.]*?).(?<build>[\\d]+).[\\d]+)-windows-x64).zip" | ||||||
| "url": "https://learn.microsoft.com/en-us/java/openjdk/download", | ||||||
| "regex": "(?<ms>microsoft-jdk-((?<ver>25[\\d.]*?).(?<build>[\\d]+).[\\d]+)-windows-x64).zip" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, verify the file exists and examine its structure
fd microsoft-lts-jdk.jsonRepository: ScoopInstaller/Java Length of output: 92 🏁 Script executed: # Read the entire file to understand context
cat -n bucket/microsoft-lts-jdk.jsonRepository: ScoopInstaller/Java Length of output: 2060 🏁 Script executed: # Run the validation script from the review to test the current regex
python - <<'PY'
import json, re, pathlib, urllib.request
manifest = json.loads(pathlib.Path("bucket/microsoft-lts-jdk.json").read_text())
rx = re.compile(manifest["checkver"]["regex"])
samples = [
"microsoft-jdk-25.0.2-windows-x64.zip",
"microsoft-jdk-25.0.2.8.1-windows-x64.zip",
]
print("=== Sample matches (CURRENT REGEX) ===")
for s in samples:
m = rx.search(s)
print(s, "=>", m.groupdict() if m else None)
print("\n=== checkver URL matches (CURRENT REGEX) ===")
url = manifest["checkver"]["url"]
try:
html = urllib.request.urlopen(url, timeout=20).read().decode("utf-8", "ignore")
hits = sorted(set(re.findall(r"microsoft-jdk-[^\"'\\s>]*windows-x64\\.zip", html)))
print(f"found {len(hits)} candidate links")
for h in hits[:20]:
m = rx.search(h)
print(h, "=>", m.groupdict() if m else None)
except Exception as e:
print(f"Error fetching URL: {e}")
PYRepository: ScoopInstaller/Java Length of output: 1094 🏁 Script executed: # Test the suggested fixed regex against the same samples
python - <<'PY'
import json, re, pathlib
suggested_regex = r"(?<ms>microsoft-jdk-((?<ver>25[\\d.]*?)\\.(?<build>[\\d]+)\\.[\\d]+)-windows-x64)\\.zip"
# Note: Python re module doesn't support named groups with (?<name>...) syntax
# It uses (?P<name>...) syntax, but let's construct it properly for testing
suggested_regex_python = r"(?P<ms>microsoft-jdk-((?P<ver>25[\d.]*?)\.(?P<build>[\d]+)\.[\d]+)-windows-x64)\.zip"
rx_suggested = re.compile(suggested_regex_python)
samples = [
"microsoft-jdk-25.0.2-windows-x64.zip",
"microsoft-jdk-25.0.2.8.1-windows-x64.zip",
]
print("=== Sample matches (SUGGESTED REGEX) ===")
for s in samples:
m = rx_suggested.search(s)
print(s, "=>", m.groupdict() if m else None)
PYRepository: ScoopInstaller/Java Length of output: 335 🏁 Script executed: python - <<'PY'
import re
# Current regex converted to Python syntax
current_regex = r"(?P<ms>microsoft-jdk-((?P<ver>25[\d.]*?).(?P<build>[\d]+).[\d]+)-windows-x64).zip"
rx_current = re.compile(current_regex)
# Suggested regex
suggested_regex = r"(?P<ms>microsoft-jdk-((?P<ver>25[\d.]*?)\.(?P<build>[\d]+)\.[\d]+)-windows-x64)\.zip"
rx_suggested = re.compile(suggested_regex)
samples = [
"microsoft-jdk-25.0.2-windows-x64.zip",
"microsoft-jdk-25.0.2.8.1-windows-x64.zip",
"microsoft-jdk-25-0-2-windows-x64.zip", # edge case: different separator
]
print("=== CURRENT REGEX (unescaped dots) ===")
for s in samples:
m = rx_current.search(s)
result = m.groupdict() if m else None
print(f"{s:40} => {result}")
print("\n=== SUGGESTED REGEX (escaped dots) ===")
for s in samples:
m = rx_suggested.search(s)
result = m.groupdict() if m else None
print(f"{s:40} => {result}")
# Show the danger: current regex matches dashes too (unwanted)
print("\n=== DEMONSTRATING THE PROBLEM ===")
test = "microsoft-jdk-25-0-2-windows-x64.zip"
m = rx_current.search(test)
if m:
print(f"CURRENT REGEX WRONGLY MATCHES: {test}")
print(f" Captures: {m.groupdict()}")
else:
print(f"Current regex correctly rejects: {test}")
m = rx_suggested.search(test)
if m:
print(f"SUGGESTED REGEX WRONGLY MATCHES: {test}")
print(f" Captures: {m.groupdict()}")
else:
print(f"Suggested regex correctly rejects: {test}")
PYRepository: ScoopInstaller/Java Length of output: 1033 Escape literal dots in Line 29 uses unescaped dots ( Suggested regex fix- "regex": "(?<ms>microsoft-jdk-((?<ver>25[\\d.]*?).(?<build>[\\d]+).[\\d]+)-windows-x64).zip"
+ "regex": "(?<ms>microsoft-jdk-((?<ver>25[\\d.]*?)\\.(?<build>[\\d]+)\\.[\\d]+)-windows-x64)\\.zip"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| }, | ||||||
| "autoupdate": { | ||||||
| "architecture": { | ||||||
|
|
||||||
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.
Please align PR metadata with the actual updated version.
Line 4 is
25.0.2, but the PR title still says25.0.1. Please update the PR title/description to avoid release-note and review confusion.🤖 Prompt for AI Agents