Comments (6)
New exception coming from JDT https://github.com/eclipse/eclipse.jdt.core/commit/905307ba95aeaa4570286fd98cd5fee0aa7ea5d7#diff-1c6dd3b4a801c8d49da846e136f7f10cR129
Exception in thread "main" java.lang.IllegalStateException: Module should be known
at org.eclipse.jdt.internal.compiler.batch.CompilationUnit.module(CompilationUnit.java:126)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.module(CompilationUnitDeclaration.java:833)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:460)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:845)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:394)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:59)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:255)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:403)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:362)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:330)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:113)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:96)
at spoon.Launcher.buildModel(Launcher.java:766)
at ProjectIndexer.index(ProjectIndexer.java:43)
at Main.main(Main.java:15)
Apparently this isn't supposed to happen 😕
from scip-java.
Confirmed this issue is still occuring for google/gson repos:
Platform
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 14.0.1, vendor: N/A, runtime: /usr/local/Cellar/openjdk/14.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.6", arch: "x86_64", family: "mac"
Command
% ~/Workspace/lsif-java/build/install/lsifjava/bin/lsifjava -projectRoot ~/Workspace/lsif-java-playground/projects-maven/gson -out gson-dump.lsif
Output
Running JVM 14.0.2
Arguments /Users/adewitt/Workspace/lsif-java-playground/projects-maven/gson ALL_SOURCE
Working Directory = /Users/adewitt/Workspace/lsif-java-playground/projects-maven
Absolute Path = /Users/adewitt/Workspace/lsif-java-playground/projects-maven
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details
Exception in thread "main" java.lang.IllegalStateException: Module should be known
at org.eclipse.jdt.internal.compiler.batch.CompilationUnit.module(CompilationUnit.java:126)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.module(CompilationUnitDeclaration.java:833)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:469)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:845)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:394)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:60)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:256)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:417)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:369)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:337)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:114)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:97)
at spoon.Launcher.buildModel(Launcher.java:755)
at ProjectIndexer.index(ProjectIndexer.java:52)
at Main.main(Main.java:18)
from scip-java.
Module should be known
exception has been fixed upstream in INRIA/spoon#3549
Following that, the issue highlighted in INRIA/spoon#3550 has been fixed. PR pending at the time of writing.
Following that again, an issue in Spoon was detected where it trips over constructs with type params such as public static<T>
where there is no space between the keyword and the type param. Fixed in INRIA/spoon#3552
The issue described in INRIA/spoon#3553 was encounted. This PR is still pending further investigation with Spoon maintainers to develop a better fix for it.
In combination, these PRs have brought lsif-java to the point where it is able to index google/gson without throwing an exception. There is still some investigation required wrt reducing the number of .java files that are not being picked up. PR to improve Spoons POM handling is in development at the time of writing.
from scip-java.
@Strum355 It looks like INRIA/spoon#3567 resolves this item:
The issue described in INRIA/spoon#3553 was encountered. This PR is still pending further investigation with Spoon maintainers to develop a better fix for it.
Can you confirm if google/gson can be successfully indexed after the recent Spoon fixes?
from scip-java.
@aidaeology INRIA/spoon#3550 is still pending a proper review and to be merged.
from scip-java.
Indexes without exception with current latest Spoon snapshot (3.8.0-beta-8)
Some files are missing and a lot of "WARNING Skipping linking use to definition" but it runs otherwise 👍
from scip-java.
Related Issues (20)
- "Find implementations" is not working for Scala classes and traits
- Auto-indexing: support relative paths HOT 1
- Auto-indexing: directly support multi-root projects
- Amend docs to support Bazel 6 HOT 5
- BazelBuildTool exits with 0 even if no files are found
- Gradle dependency verification conflicts with using semanticdb plugin HOT 1
- Gradle centralised repo management causes problems HOT 6
- Issues indexing kotlin gradle project HOT 10
- `Failed to query the value of property 'freeCompilerArgs'` in buildSrc task
- `Task with name 'compileKotlinJvm' not found in project ':icons'`
- trailing arguments doesn't work for sbt projects HOT 1
- Gradle plugin - don't log the full stack trace for missing publication
- Implement new scip `SymbolInformation` fields HOT 1
- Publish Docker image for linux/arm64 platform
- Kotlin find references shows refs for wrong symbol HOT 6
- Test issue HOT 3
- ABC testing HOT 2
- semanticdb-javac terminates in error "silently", due to a NullPointerException HOT 3
- execute com.sourcegraph.scip_java.ScipJava.main() fail HOT 1
- Support for is_type_definition relationship field for SymbolInformation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scip-java.