Skip to content

Commit

Permalink
[GR-55586] Proguard fails when a dependency is a multi version jar wi…
Browse files Browse the repository at this point in the history
…th JDK-22 overlay.

PullRequest: mx/1819
  • Loading branch information
tzezula committed Jul 22, 2024
2 parents e67c4fe + 0feff62 commit 5033ad3
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 9 deletions.
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+5-437", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+6-612", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "jdk-11.0.11+9", "platformspecific": true, "extrabundles": ["static-libs"] },

Expand Down Expand Up @@ -45,13 +45,13 @@
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.3", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+5", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-24+5-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-24+5-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-24+5-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-24+5-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-24+5-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-24+5-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+6", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-24+6-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-24+6-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-24+6-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-24+6-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-24+6-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-24+6-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
54 changes: 54 additions & 0 deletions mx.mx/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,24 @@
}
},

"ORG_JSON_20231013" : {
"digest": "sha512:a5cdd1ed984448d6538746429f2d1a0ec8f64f93af0e84870ce898a9f07a81d11bf27d2ee081471975772efc8a0d3d5e05541197a532066e9edb09ad032d31a3",
"maven" : {
"groupId" : "org.json",
"artifactId" : "json",
"version" : "20231013",
}
},

"GSON_2.9.0" : {
"digest": "sha512:13ff22a60ee6a72ba0c4e8fe3702b8f3f6be6b67ed4279079a9843f57ad0ca125d4ecc1564ac4e736eab10fb6254d2c011b2c08c514d708be7f8091332ed2c2c",
"maven" : {
"groupId" : "com.google.code.gson",
"artifactId" : "gson",
"version" : "2.9.0",
}
},

# As of 8.0.0, the versioning of ProGuardCORE is unlinked from ProguardBASE and ProguardRETRACE
# since ProGuardCORE is a general library used by other projects.
# https://github.com/Guardsquare/proguard/issues/132#issuecomment-887610759
Expand Down Expand Up @@ -694,6 +712,42 @@
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/proguard-core-9.0.8-jdk21-backport.jar"],
},

"PROGUARD_BASE_7_5_0" : {
"digest": "sha512:da7c0cc01daabbec0a6861288ae0a6f2aa5d70bb4ff01e356724cd0a9448f10789de793d1dcc5a9f246dc335041e66a4d0c9d4f5ec885a8fc56bc5dd82c9345a",
"maven" : {
"groupId" : "com.guardsquare",
"artifactId" : "proguard-base",
"version" : "7.5.0",
},
"dependencies" : [
"PROGUARD_CORE_9_1_4",
"GSON_2.9.0",
"LOG4J_CORE_2_19_0",
"LOG4J_API_2_19_0",
"ORG_JSON_20231013"
],
},

"PROGUARD_RETRACE_7_5_0" : {
"digest": "sha512:0bfeb05ebd170670684193883c660003ffd079f0d889166c220ebc3ebc12c16bffa92e8291bd4d802753a21f2cae1864ccaada781b5027458e7a694ae7ab9c63",
"maven" : {
"groupId" : "com.guardsquare",
"artifactId" : "proguard-retrace",
"version" : "7.5.0",
},
"dependencies" : ["PROGUARD_BASE_7_5_0"],
},

"PROGUARD_CORE_9_1_4" : {
"digest": "sha512:a385b489b649377d1bc0aced28dc84e24c61460edb32d126162a48465055323aa2e5d92c9a83d29e31629378651a299a964c2576d58f4fc56e7c15ce46fd6424",
"maven" : {
"groupId" : "com.guardsquare",
"artifactId" : "proguard-core",
"version" : "9.1.4",
},
"dependencies" : ["LOG4J_CORE_2_19_0", "LOG4J_API_2_19_0"],
},

"NINJA" : {
"packedResource" : True,
"version" : "1.10.2",
Expand Down
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18198,7 +18198,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.27.6") # GR-55163
version = VersionSpec("7.28.0") # GR-55586: Proguard fails when a dependency is a multi version jar with JDK-22 overlay.

_mx_start_datetime = datetime.utcnow()

Expand Down
13 changes: 13 additions & 0 deletions src/mx/_impl/mx_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,19 @@ def get_supported_hash_algorithms(self):
return ['sha256', 'sha512', 'sha3_384', 'sha3_512']


class MxCompatibility728(MxCompatibility727):

@staticmethod
def version():
return mx.VersionSpec("7.28.0")

def proguard_libs(self):
return {
'CORE': '9_1_4',
'BASE': '7_5_0',
'RETRACE': '7_5_0',
}

def minVersion():
_ensureCompatLoaded()
return list(_versionsMap)[0]
Expand Down

0 comments on commit 5033ad3

Please sign in to comment.