possible bug in mx/projects handling
Doug Simon
doug.simon at oracle.com
Mon Jun 3 09:29:01 PDT 2013
Ok, I see the problem. Pushing through a fix now. Here's the patch:
diff -r 91a1041ec905 mxtool/mx.py
--- a/mxtool/mx.py Sat Jun 01 20:42:22 2013 -0400
+++ b/mxtool/mx.py Mon Jun 03 18:07:59 2013 +0200
@@ -1700,6 +1700,11 @@
try:
zf = zipfile.ZipFile(tmp, 'w')
for p in sorted_deps(d.deps):
+ # skip a Java project if its Java compliance level is "higher" than the configured JDK
+ if java().javaCompliance < p.javaCompliance:
+ log('Excluding {0} from {2} (Java compliance level {1} required)'.format(p.name, p.javaCompliance, d.path))
+ continue
+
outputDir = p.output_dir()
for root, _, files in os.walk(outputDir):
relpath = root[len(outputDir) + 1:]
On Jun 3, 2013, at 5:31 PM, "Deneau, Tom" <tom.deneau at amd.com> wrote:
> Doug --
>
> Did you also put your com.amd.sumatra as a dependency for graal.jar? That is where the problem seems to arise.
>
> distribution at GRAAL@path=graal.jar
> distribution at GRAAL@dependencies=com.oracle.graal.hotspot.amd64,com.oracle.graal.hotspot.sparc,com.oracle.graal.hotspot,com.amd.sumatra
>
> -- Tom
>
> -----Original Message-----
> From: graal-dev-bounces at openjdk.java.net [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of Doug Simon
> Sent: Monday, June 03, 2013 9:02 AM
> To: Venkatachalam, Vasanth
> Cc: graal-dev at openjdk.java.net
> Subject: Re: possible bug in mx/projects handling
>
>
> On May 31, 2013, at 11:02 PM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
>
>> Hi,
>>
>> We have a project com.amd.sumatra which requires java 1.8 compliance to build.
>>
>> We've added lines in mx/project to specify that the project shouldn't be built when building with a 1.7 JDK:
>>
>> distribution at GRAAL@path=graal.jar
>> distribution at GRAAL@dependencies=com.oracle.graal.hotspot.amd64,com.oracle.graal.hotspot.sparc,com.oracle.graal.hotspot,com.amd.sumatra
>>
>> # com.amd.sumatra
>> project at com.amd.sumatra@subDir=graal
>> project at com.amd.sumatra@sourceDirs=src
>> project at com.amd.sumatra@dependencies=com.oracle.graal.hotspot,com.oracle.graal.hotspot.amd64,com.oracle.graal.hsail,com.oracle.graal.compiler.hsail,com.amd.okra
>> project at com.amd.sumatra@checkstyle=com.oracle.graal.graph
>> project at com.amd.sumatra@javaCompliance=1.8
>>
>> When I do an mx build, I see the lines
>>
>> Excluding com.amd.sumatra fro build (Java compliance level 1.8 required)
>>
>> But then Graal goes ahead and tries to build the package. This appears to be a bug. Can someone look into this?
>
> I tried to reproduce this by creating a local com.amd.sumatra project and used some JDK 1.8 API in it. However, 'mx build' does the expected thing in may case (i.e. does not try to compiled anything in com.amd.sumatra). Could you please send me the output of 'mx clean --no-native; mx -v build' so I can investigate further.
>
> -Doug
>
More information about the graal-dev
mailing list