-
Notifications
You must be signed in to change notification settings - Fork 220
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
SourceDirCallGraph.main run error #1083
Comments
Thanks for the report. I have just added the ./gradlew -PmainClass=com.ibm.wala.examples.drivers.SourceDirCallGraph run --args="-sourceDir /tmp/srcTest -mainClass LFoo" In my class Foo {
public static void main(String[] args) {
}
} This works for me; I don't get your crash, and in the end I see:
You can see the WALA-start build.gradle here. Can you let me know what is different about your local configuration? Are you using the released version of WALA, or are you building the master branch from source? |
Ok, dug in and I could reproduce your issue. The core problem here is that Eclipse libraries in Maven Central specify their own dependencies with wide version ranges, and do not provide guarantees that a set of dependencies that get pulled in together will be consistent. I am not sure of a good fix. Looking at the
These were actually included unintentionally. Gradle knows how to read them, and it forces these (transitive) dependencies back to older versions that make Here are the key dependencies and the exact versions that get pulled in:
Based on that, I added the following to my build.gradle dependencies: implementation('org.eclipse.platform:org.eclipse.equinox.common') {
version {
strictly '3.14.100'
}
}
implementation('org.eclipse.platform:org.eclipse.core.resources') {
version {
strictly '3.14.0'
}
}
implementation('org.eclipse.platform:org.eclipse.core.commands') {
version {
strictly '3.9.700'
}
} This makes For Maven, I think if you add the above dependencies to your POM, that should force their versions. Can you try and see if that fixes things (on Java 11 or higher)? |
To be clear, you should just add dependencies like: <dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.14.100</version>
</dependency> And I think that should fix it. |
Thanks for your advice!!!! |
I'm trying to run SourceDirCallGraph from Eclipse. No matter Java 8 or 11 been used, it will report error. I can see wala 1.6.0 was used. How to solve it? Thanks! |
@hopeshared-lee I think we now require Java 17 for Eclipse-related code. Could you try when running on Java 17? |
When I use maven import the package: com.ibm.wala.cast.java.ecj and run the function : SourceDirGraph.main,the exception was thrown :
![image](https://user-images.githubusercontent.com/40926753/145512289-0aeb2d5b-46aa-4f73-acae-024e28a7d085.png)
The libraries(such as org.eclipse.core) in External libraries List were import automatically when load the maven project.
Can anyone tell me why does this happen?
Does this have anything to do with my local configuration?
The text was updated successfully, but these errors were encountered: