diff --git a/common.json b/common.json index 392bffc0..b9410a99 100644 --- a/common.json +++ b/common.json @@ -4,7 +4,7 @@ "Jsonnet files should not include this file directly but use ci/common.jsonnet instead." ], - "mx_version": "7.36.5", + "mx_version": "7.38.0", "COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet", "jdks": { diff --git a/src/mx/_impl/mx.py b/src/mx/_impl/mx.py index 7f50d22d..ddd06c79 100755 --- a/src/mx/_impl/mx.py +++ b/src/mx/_impl/mx.py @@ -7295,7 +7295,7 @@ def prepare(self, daemons): sourceFiles=[_cygpathU2W(f) for f in sorted(javafiles.keys())], project=self.subject, outputDir=_cygpathU2W(outputDir), - classPath=_separatedCygpathU2W(classpath(self.subject.name, includeSelf=False, jdk=self.jdk, ignoreStripped=True)), + classPath=_separatedCygpathU2W(classpath(self.subject.name, includeSelf=False, jdk=self.jdk, ignoreStripped=True, forBuild=True)), sourceGenDir=self.subject.source_gen_dir(), jnigenDir=self.subject.jni_gen_dir(), processorPath=_separatedCygpathU2W(self.subject.annotation_processors_path(self.jdk)), @@ -12196,7 +12196,7 @@ def library(name, fatalIfMissing=True, context=None): return l -def classpath_entries(names=None, includeSelf=True, preferProjects=False, excludes=None): +def classpath_entries(names=None, includeSelf=True, preferProjects=False, excludes=None, forBuild=False): """ Gets the transitive set of dependencies that need to be on the class path given the root set of projects and distributions in `names`. @@ -12247,7 +12247,7 @@ def _preVisit(dst, edge): return False if dst in roots: return True - if edge and edge.src.isJARDistribution() and edge.kind == DEP_STANDARD: + if edge and edge.src.isJARDistribution() and edge.kind in (DEP_STANDARD, DEP_BUILD): if isinstance(edge.src.suite, BinarySuite) or not preferProjects: return dst.isJARDistribution() else: @@ -12261,7 +12261,7 @@ def _visit(dep, edge): if dep.isPOMDistribution(): return cpEntries.append(dep) - walk_deps(roots=roots, visit=_visit, preVisit=_preVisit, ignoredEdges=[DEP_ANNOTATION_PROCESSOR, DEP_BUILD]) + walk_deps(roots=roots, visit=_visit, preVisit=_preVisit, ignoredEdges=[DEP_ANNOTATION_PROCESSOR] + ([] if forBuild else [DEP_BUILD])) return cpEntries @@ -12305,13 +12305,13 @@ def _appendUnique(cp_addition): return os.pathsep.join(cp) -def classpath(names=None, resolve=True, includeSelf=True, includeBootClasspath=False, preferProjects=False, jdk=None, unique=False, ignoreStripped=False): +def classpath(names=None, resolve=True, includeSelf=True, includeBootClasspath=False, preferProjects=False, jdk=None, unique=False, ignoreStripped=False, forBuild=False): """ Get the class path for a list of named projects and distributions, resolving each entry in the path (e.g. downloading a missing library) if 'resolve' is true. If 'names' is None, then all registered dependencies are used. """ - cpEntries = classpath_entries(names=names, includeSelf=includeSelf, preferProjects=preferProjects) + cpEntries = classpath_entries(names=names, includeSelf=includeSelf, preferProjects=preferProjects, forBuild=forBuild) return _entries_to_classpath(cpEntries=cpEntries, resolve=resolve, includeBootClasspath=includeBootClasspath, jdk=jdk, unique=unique, ignoreStripped=ignoreStripped) @@ -18367,7 +18367,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.38.2") # GR-61461 - mx vscodeinit fails with Could not find a JDK 22 +version = VersionSpec("7.39.0") # GR-61581 - Build dependencies for java projects. _mx_start_datetime = datetime.utcnow()