Skip to content

Commit

Permalink
[GR-47445] Make module path and class-path deterministic if UseModule…
Browse files Browse the repository at this point in the history
…Path=True.

PullRequest: mx/1645
  • Loading branch information
chumer committed Aug 1, 2023
2 parents 04191ad + 2c1500e commit 3d9cd65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ local with(platform, java_release, timelimit="15:00") = {
specVersion: "3",

# Overlay
overlay: "d280a58c1a1ad015c7873c19818aae0910a64996",
overlay: "025dc1bfebd740acab8dad8803fbbfaa1944bfdf",

# For use by overlay
versions:: versions,
Expand Down
18 changes: 10 additions & 8 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12616,19 +12616,21 @@ def get_runtime_jvm_args(names=None, cp_prefix=None, cp_suffix=None, jdk=None, e
if excludeEntry in entries:
entries.remove(excludeEntry)

mp_entries = set()
mp_entries_set = set()
mp_entries = []
for entry in entries:
if entry.isClasspathDependency() and entry.use_module_path():
if entry.get_declaring_module_name():
mp_entries.add(entry)
if entry.get_declaring_module_name() and entry not in mp_entries_set:
mp_entries.append(entry)
mp_entries_set.add(entry)
# if a distribution is a module put all dependencies
# on the module path as well.
for mp_entry in classpath_entries(names=[entry]):
if mp_entry in entries:
mp_entries.add(mp_entry)

if mp_entry in entries and mp_entry not in mp_entries_set:
mp_entries.append(mp_entry)
mp_entries_set.add(mp_entry)
if mp_entries:
cp_entries = frozenset(entries) - mp_entries
cp_entries = [e for e in entries if e not in mp_entries_set]
else:
cp_entries = entries

Expand Down Expand Up @@ -18523,7 +18525,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("6.35.0") # LayoutDirDistribution forbids maven deployment.
version = VersionSpec("6.35.1") # Make module path determinstic if UseModulePath=True is in use.

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down

0 comments on commit 3d9cd65

Please sign in to comment.