cxbrooks / test

Second test for bugzilla to git
0 stars 0 forks source link

Copernicus includes many type system classes in jarClassList #91

Open cxbrooks opened 16 years ago

cxbrooks commented 16 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#159 From: @cxbrooks Reported version: 7.1.devel CC: pt-dev@chess.eecs.berkeley.edu

cxbrooks commented 16 years ago

How to reproduce cd $PTII $PTII/bin/copernicus ptolemy/actor/lib/test/auto/ComplexDivide.xml cd $PTII/ptolemy/copernicus/java/cg/ComplexDivide/ make treeShake

"make treeShake" fails with: Create the minimal jar file from the final codegen version using the jarClassList.txt file Exception in thread "main" java.lang.NoClassDefFoundError: ptolemy/data/type/ObjectType$BottomClass at ptolemy.data.type.ObjectType.(ObjectType.java:344) at ptolemy.data.type.BaseType.(BaseType.java:554) at ComplexDivide.ComplexDivide_Test1.(Jasmin) at ComplexDivide.ComplexDivide.(Jasmin) at ComplexDivide.Main.(Jasmin) at ComplexDivide.Main.main(Jasmin) Caused by: java.lang.ClassNotFoundException: ptolemy.data.type.ObjectType$BottomClass at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

The reason is that ptolemy/copernicus/java/cg/ComplexDivide/jarClassList.txt does not contain ObjectType$BottomClass.

However, this is a symptom of the problem, not the cause. The real issue is that Copernicus is no longer fully removing the type system classes from the output. The the codesize is quite large.

This bug is not critical in that Copernicus still works. However, Copernicus is not as small as it should be

cxbrooks commented 16 years ago

Created attachment 14 ComplexDivide jarClassList - note that it contains type classes

$PTII/ptolemy/copernicus/java/cg/ComplexDivide/jarClassList.txt Note that it contains classes from the Ptolemy type system that should be removed.

Attached file: jarClassList.txt (text/plain, 14685 bytes) Description: ComplexDivide jarClassList - note that it contains type classes

cxbrooks commented 16 years ago

I checked in a workaround for this bug that fixes the treeshaker, However, the bug remains open because the code size is very large because of all the Ptolemy type system classes in jarFileList.txt