Community
Participate
Working Groups
It's a good practice to stay up to date with new libraries.
Here is the ASM webpage: http://forge.ow2.org/projects/asm/ Here is the diff page from 3.3 to 4.0: http://asm.ow2.org/jdiff33to40/changes.html
The corresponding CQ is already done and approved. https://dev.eclipse.org/ipzilla/show_bug.cgi?id=6591
Created attachment 221810 [details] bundle Here is the ASM 4.0 bundle for testing, it is complete with source, etc and can be checked in to Orbit.
I started the code changes to adopt the new version of ASM. There are many API changes and API tools will require (at a minimum) ASM 4.x moving forward. There are still many test failures and I have to figure out how to collect the default value for an Annotation in our TypeStructureBuilder (using the new API). The branch is here: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?h=mrennie/bug390930
Removing the 4.3 milestone. We don't have the resources to sort out the remaining issues with upgrading. It is also late in the release for making changes such as this.
For Java 8 support we need a 5.x version of ASM, changing this report to refer to ASM 5.x instead of 4.x.
Created attachment 239190 [details] ASM 5.0-BETA Here is the 5.0-beta version of ASM that should support Java 8. I have not checked out the branch yet to determine if there are additional API changes from 4.x -> 5.x.
Created attachment 240128 [details] adapt to new APIs This patch adapts API tools to use ASM 5.0. There are a few wrinkles: 1. there are a few test failures to be sorted out 2. reference extraction for default methods does not seem to resolve them correctly This patch sorts out the Annotation default problem I encountered from before, and allows reference extraction, type structure building and binary compare to work.
Created attachment 240129 [details] update With this patch all the new APIs are used and all tests pass.
The Orbit CQ for ASM 5.0 is: http://dev.eclipse.org/ipzilla/show_bug.cgi?id=7941
And for PDE we have http://dev.eclipse.org/ipzilla/show_bug.cgi?id=7942
Created attachment 240275 [details] patch for Luna Here is the patch ported for Luna (4.4). All tests pass there as well.
Created attachment 240338 [details] BETA_JAVA8 update Here is a further update for the generator and profile modifiers that will be needed to properly generate the fragment in bug 429062
Created attachment 240346 [details] Update BETA_JAVA8 This update is because there were overlapping changes needed in bug 429062
ASM 5 has been added to Orbit, now we need to apply the patches and run some test builds
(In reply to Michael Rennie from comment #15) > ASM 5 has been added to Orbit, now we need to apply the patches and run some > test builds We have a successful orbit I-build with ASM 5.0; http://build.eclipse.org/orbit/committers/orbit-I/20140311210553/I20140311210553/
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?h=BETA_JAVA8_LUNA&id=abb117132844c0b2dc8007cd51dfe327059ca61a ASM upgrade applied to BETA_JAVA8_LUNA. Updated the patch to use version ranges and to not mark Java 8 bytecodes as unsupported. For now I just commented out the Java 8 check, but we may want to remove the preference entirely (Bug 430305).
(In reply to Curtis Windatt from comment #17) > http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/ > ?h=BETA_JAVA8_LUNA&id=abb117132844c0b2dc8007cd51dfe327059ca61a > ASM upgrade applied to BETA_JAVA8_LUNA. Updated the patch to use version > ranges and to not mark Java 8 bytecodes as unsupported. For now I just > commented out the Java 8 check, but we may want to remove the preference > entirely (Bug 430305). I updated the libs for the official release in my workspace and it is a complete failure. Almost all of the unit tests fail once the following exception is reported: java.lang.ClassFormatError: Duplicate field name&signature in class file org/objectweb/asm/tree/MethodNode at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527) at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:330) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:311) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:379) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.eclipse.pde.api.tools.internal.model.TypeStructureBuilder.buildTypeStructure(TypeStructureBuilder.java:282) at org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot.getStructure(AbstractApiTypeRoot.java:60) at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner$Visitor.resolveMethod(TagScanner.java:621) at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner$Visitor.scanMethodJavaDoc(TagScanner.java:508) at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner$Visitor.visit(TagScanner.java:487) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:611) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711) at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner.scan(TagScanner.java:742) at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner.scan(TagScanner.java:688) at org.eclipse.pde.api.tools.internal.ProjectApiDescription$TypeNode.refresh(ProjectApiDescription.java:268) at org.eclipse.pde.api.tools.internal.ApiDescription.findNode(ApiDescription.java:463) at org.eclipse.pde.api.tools.internal.ProjectApiDescription.visit(ProjectApiDescription.java:436) at org.eclipse.pde.api.tools.internal.ProjectApiDescription.accept(ProjectApiDescription.java:405) at org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest.exportApiComponent(ApiBuilderTest.java:351) at org.eclipse.pde.api.tools.builder.tests.compatibility.CompatibilityTest.setUp(CompatibilityTest.java:177) at junit.framework.TestCase.runBare(TestCase.java:139) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3978) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1119) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1003) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:147) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:630) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:574) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54) at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47) at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:133) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:103) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:378) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) at org.eclipse.equinox.launcher.Main.main(Main.java:1438) I opened MethodNode using javap and sure enough, there are colliding fields: static java.lang.Class class$org$objectweb$asm$tree$MethodNode; descriptor: Ljava/lang/Class; flags: ACC_STATIC Synthetic: true static java.lang.Class class$org$objectweb$asm$tree$MethodNode; descriptor: Ljava/lang/Class; flags: ACC_STATIC Synthetic: true
Someone beat me to it - the ASM bug is: http://forge.ow2.org/tracker/index.php?func=detail&aid=317123&group_id=23&atid=100023
FYI: I'm the one who opened the ASM bug just yesterday. But in the meantime I figured out that asm-debug-all works fine (and beside it's sightly bigger provides proper debug information most other libraries do nowadays). So we released JaCoCo based on asm-debug-all.
(In reply to Marc R. Hoffmann from comment #20) > FYI: I'm the one who opened the ASM bug just yesterday. But in the meantime > I figured out that asm-debug-all works fine (and beside it's sightly bigger > provides proper debug information most other libraries do nowadays). So we > released JaCoCo based on asm-debug-all. Thanks for the info Marc, but we will have to wait for the 'fixed' jars due to the way we provide ASM via Orbit.
The 5.0.1 service release is working correctly.
I created the new CQs for the new version: PDE CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=8129 Orbit CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=8128
(In reply to Michael Rennie from comment #23) > I created the new CQs for the new version: > > PDE CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=8129 > Orbit CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=8128 ASM 5.0.1 has been approved and added to Orbit. Once we have a build to consume there is a bit of work to do: 1. rev the in bundle versions to require 5.0.1 2. consume the new API method visitMethodInsn in our method visitors
Any careful coordination needed here? Or should I just "slam" 5.0.1 in our build when it's ready?
(In reply to David Williams from comment #25) > Any careful coordination needed here? Or should I just "slam" 5.0.1 in our > build when it's ready? Just add it when ready.
(In reply to Michael Rennie from comment #24) > ASM 5.0.1 has been approved and added to Orbit. Once we have a build to > consume there is a bit of work to do: > > 1. rev the in bundle versions to require 5.0.1 > 2. consume the new API method visitMethodInsn in our method visitors 3. implement the visitInvokeDynamicInsn method
FWIW, I've updated our "orbit prereqs" with the latest version from Orbit: <unit id="org.objectweb.asm" version="5.0.1.v201403281216"/> <unit id="org.objectweb.asm.source" version="5.0.1.v201403281216"/> Orbit build http://download.eclipse.org/tools/orbit/downloads/drops/I20140328134327/ And, now that I've committed it, http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=55cf3c60968274ecbf6e3d5df566497923856ec3 I remembered that the PDE feature that includes it may have to be "touched". Well, we'll see if I cause Sat. afternoon build failure ... if I do ... I can back out until we're ready to "coordinate".
> I remembered that the PDE feature that includes it may have to be "touched". > > Well, we'll see if I cause Sat. afternoon build failure ... if I do ... I > can back out until we're ready to "coordinate". Oh, and now I just remembered we should be fine for an N-build ... but the feature will have to be "touch" before next I-build.
(In reply to David Williams from comment #29) > > I remembered that the PDE feature that includes it may have to be "touched". > > > > Well, we'll see if I cause Sat. afternoon build failure ... if I do ... I > > can back out until we're ready to "coordinate". > > Oh, and now I just remembered we should be fine for an N-build ... but the > feature will have to be "touch" before next I-build. I pushed the fix to use the new visitMethodInsn + new versions: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=570f6a45d49541588115c0ae86558e1290299e91 I touched the feature: http://git.eclipse.org/c/pde/eclipse.pde.git/commit/?id=e49a188db4eb96d49f35832640044e93a79924bd
Verified for Eclipse(4.4) Luna M7 using build eclipse-SDK-I20140429-2000-win32-x86_64 ASM version is 5.0.1 25th april timestamp 1740