Skip to content

Commit

Permalink
[GR-47474] Allow jar distributions in excludes (but warn).
Browse files Browse the repository at this point in the history
PullRequest: mx/1649
  • Loading branch information
steve-s committed Aug 7, 2023
2 parents a35a315 + 6c67063 commit e1950df
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -5407,9 +5407,17 @@ def resolveDeps(self):
self._resolveDepsHelper(overlaps)
self.resolved_overlaps = overlaps
self.overlaps = original_overlaps
to_remove = []
for l in self.excludedLibs:
if not l.isBaseLibrary():
if l.isJARDistribution():
warn('"exclude" attribute contains a jar distribution: ' + l.name +
'. Adding it to dependencies. Please move the distribution from "exclude" to "distDependencies".', context=self)
self.deps += [l]
to_remove += [l]
elif not l.isBaseLibrary():
abort('"exclude" attribute can only contain libraries: ' + l.name, context=self)
for l in to_remove:
self.excludedLibs.remove(l)
licenseId = self.theLicense if self.theLicense else self.suite.defaultLicense # pylint: disable=access-member-before-definition
if licenseId:
self.theLicense = get_license(licenseId, context=self)
Expand Down Expand Up @@ -18559,7 +18567,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.38.0") # Allow loading extra modules in unit tests
version = VersionSpec("6.39.0") # Allow jar distributions in the exclude set (with a warning)

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

0 comments on commit e1950df

Please sign in to comment.