Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.ibm.wala.ide JAR is missing dependencies #1264

Open
khatchad opened this issue Apr 13, 2023 · 4 comments
Open

com.ibm.wala.ide JAR is missing dependencies #1264

khatchad opened this issue Apr 13, 2023 · 4 comments
Labels
gradle WALA’s Gradle build system

Comments

@khatchad
Copy link
Contributor

khatchad commented Apr 13, 2023

I don't think the following is working:

bin.includes = .,\
META-INF/,\
plugin.properties,\
target/dependency/com.ibm.wala.core.jar,\
target/dependency/com.ibm.wala.util.jar,\
target/dependency/com.ibm.wala.shrike.jar,\
target/dependency/com.ibm.wala.cast.jar

I just built locally off of d15ca9b. Then, I had a look at ide/build/libs/com.ibm.wala.ide-1.6.1-SNAPSHOT.jar. In that JAR, there's a META-INF directory, but no WALA JARs. The only other things in the JAR are the IDE class files.

$ jar tf ./com.ibm.wala.ide-1.6.1-SNAPSHOT.jar 
META-INF/
META-INF/MANIFEST.MF
com/
com/ibm/
com/ibm/wala/
com/ibm/wala/ide/
com/ibm/wala/ide/classloader/
com/ibm/wala/ide/classloader/EclipseSourceDirectoryTreeModule.class
com/ibm/wala/ide/classloader/EclipseSourceFileModule.class
com/ibm/wala/ide/plugin/
com/ibm/wala/ide/plugin/CorePlugin.class
com/ibm/wala/ide/client/
com/ibm/wala/ide/client/EclipseProjectSourceAnalysisEngine.class
com/ibm/wala/ide/client/EclipseProjectAnalysisEngine.class
com/ibm/wala/ide/ui/
com/ibm/wala/ide/ui/ViewIRAction.class
com/ibm/wala/ide/ui/SWTTreeViewer.class
com/ibm/wala/ide/ui/SWTTreeViewer$GraphViewer.class
com/ibm/wala/ide/ui/ViewIFDSLocalAction.class
com/ibm/wala/ide/ui/IFDSExplorer.class
com/ibm/wala/ide/ui/ViewIFDSLocalAction$Labels.class
com/ibm/wala/ide/ui/AbstractJFaceRunner.class
com/ibm/wala/ide/ui/SWTTreeViewer$GraphViewer$GraphLabelProvider.class
com/ibm/wala/ide/ui/SWTTreeViewer$GraphViewer$GraphContentProvider.class
com/ibm/wala/ide/util/
com/ibm/wala/ide/util/EclipseProjectPath$AnalysisScopeType.class
com/ibm/wala/ide/util/EclipseProjectPath$Loader.class
com/ibm/wala/ide/util/EclipseFileProvider.class
com/ibm/wala/ide/util/EclipseFileProvider$EclipseUtil.class
com/ibm/wala/ide/util/HeadlessUtil.class
com/ibm/wala/ide/util/HeadlessUtil$EclipseCompiler.class
com/ibm/wala/ide/util/EclipseProjectPath$ILoader.class
com/ibm/wala/ide/util/ProgressMonitorDelegate.class
com/ibm/wala/ide/util/EclipseProjectPath.class
com/ibm/wala/ide/util/HeadlessUtil$Parser.class
com/ibm/wala/ide/util/EclipseAnalysisScopeReader.class

My guess is that this is a Gradle problem.

Originally posted by @khatchad in #1260 (comment)

@khatchad
Copy link
Contributor Author

I don't think Gradle (or even Maven Tycho for that matter) reads builds.properties. What is probably missing is the Gradle analog of #1260 (comment).

@liblit
Copy link
Contributor

liblit commented Apr 16, 2023

No other WALA jar files include their dependencies. Is there some reason that this one must?

If yes, then should this jar include all transitive dependencies, or only the subset of transitive dependencies that are also part of WALA?

If just the WALA subset, then presumably there is some mechanism for identifying and making non-WALA dependencies available. Why does that mechanism not also work for dependencies that are part of WALA?

@liblit liblit added the gradle WALA’s Gradle build system label Apr 16, 2023
@khatchad
Copy link
Contributor Author

khatchad commented Apr 17, 2023

I believe that these dependencies are needed because the rest of WALA is no longer being packaged as OSGi components.

The other dependencies are packaged as OSGi components in p2 repos (i.e., Eclipse dependencies).

@khatchad
Copy link
Contributor Author

More thorough answer:

No other WALA jar files include their dependencies.

Right. That is the ideal situation, especially if you are using a build system that handles dependencies.

Is there some reason that this one must?

Looks like @msridhar does a good job explaining it here: 12dc060.

My thinking, as I mentioned above, is that when the rest of the WALA subprojects were still OSGi components, including the JARs was unnecessary. Now, they are just normal dependencies. And, OSGi components have traditionally included the JARs for "normal" dependencies. That's no longer the case, though; it is now possible to add dependencies from, say, Maven Central, using M2E.

If the com.ibm.wala.ide subproject` gets pulled out into its own repo, we could use Maven and Tycho to include these dependencies from Maven Central.

If yes, then should this jar include all transitive dependencies, or only the subset of transitive dependencies that are also part of WALA?

AFAIK, these JARs suffice. However, I am unsure if they themselves include transitive dependencies. I don't think that they do.

If just the WALA subset, then presumably there is some mechanism for identifying and making non-WALA dependencies available. Why does that mechanism not also work for dependencies that are part of WALA?

We'll need Maven to do that since it's done through Tycho and Tycho does not yet seem to be supported in Gradle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle WALA’s Gradle build system
Projects
None yet
Development

No branches or pull requests

2 participants