Comments (4)
I ran into this once before. All I have right now is a workaround: ignore test files.
Edit Spoon explicitly supports ignoring duplicate definitions INRIA/spoon#2772 Fixed in 45a3d27
from scip-java.
The indexer gets further, but there's a null pointer exception:
Exception in thread "main" java.lang.NullPointerException
at DocumentIndexer.identifierRange(DocumentIndexer.java:312)
at DocumentIndexer.access$1100(DocumentIndexer.java:16)
at DocumentIndexer$ReferencesVisitor.visitCtFieldRead(DocumentIndexer.java:202)
at spoon.support.reflect.code.CtFieldReadImpl.accept(CtFieldReadImpl.java:16)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtNewArray(CtScanner.java:571)
at spoon.support.reflect.code.CtNewArrayImpl.accept(CtNewArrayImpl.java:32)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:149)
at spoon.reflect.visitor.CtScanner.visitCtAnnotation(CtScanner.java:183)
at spoon.support.reflect.declaration.CtAnnotationImpl.accept(CtAnnotationImpl.java:85)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtMethod(CtScanner.java:546)
at spoon.support.reflect.declaration.CtMethodImpl.accept(CtMethodImpl.java:56)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtClass(CtScanner.java:330)
at spoon.support.reflect.declaration.CtClassImpl.accept(CtClassImpl.java:56)
at DocumentIndexer.visitReferences(DocumentIndexer.java:55)
at ProjectIndexer.index(ProjectIndexer.java:70)
at Main.main(Main.java:15)
Fixed in 7acf525
from scip-java.
I get a NullPointerException also, but of a different type:
Linking use to definition: /Users/rb/External/karate/karate-junit5/src/main/java/com/intuit/karate/junit5/FeatureNode.java:81:29-81:32 -> /Users/rb/External/karate/karate-junit5/src/main/java/com/intuit/karate/junit5/FeatureNode.java:78:31-78:53
Exception in thread "main" java.lang.NullPointerException
at DocumentIndexer$ReferencesVisitor.visitCtVariableRead(DocumentIndexer.java:174)
at spoon.support.reflect.code.CtVariableReadImpl.accept(CtVariableReadImpl.java:16)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.visitCtInvocation(CtScanner.java:497)
at DocumentIndexer$ReferencesVisitor.visitCtInvocation(DocumentIndexer.java:181)
at spoon.support.reflect.code.CtInvocationImpl.accept(CtInvocationImpl.java:44)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.visitCtIf(CtScanner.java:476)
at spoon.support.reflect.code.CtIfImpl.accept(CtIfImpl.java:34)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtBlock(CtScanner.java:294)
at spoon.support.reflect.code.CtBlockImpl.accept(CtBlockImpl.java:55)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.visitCtLambda(CtScanner.java:608)
at spoon.support.reflect.code.CtLambdaImpl.accept(CtLambdaImpl.java:54)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtInvocation(CtScanner.java:499)
at DocumentIndexer$ReferencesVisitor.visitCtInvocation(DocumentIndexer.java:181)
at spoon.support.reflect.code.CtInvocationImpl.accept(CtInvocationImpl.java:44)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.visitCtReturn(CtScanner.java:670)
at spoon.support.reflect.code.CtReturnImpl.accept(CtReturnImpl.java:25)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtBlock(CtScanner.java:294)
at spoon.support.reflect.code.CtBlockImpl.accept(CtBlockImpl.java:55)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.visitCtMethod(CtScanner.java:551)
at spoon.support.reflect.declaration.CtMethodImpl.accept(CtMethodImpl.java:56)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:173)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:165)
at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:139)
at spoon.reflect.visitor.CtScanner.visitCtClass(CtScanner.java:330)
at spoon.support.reflect.declaration.CtClassImpl.accept(CtClassImpl.java:56)
at DocumentIndexer.visitReferences(DocumentIndexer.java:55)
at ProjectIndexer.index(ProjectIndexer.java:72)
at Main.main(Main.java:15)
from scip-java.
This combination caused the NullPointerException:
- This repository multiple modules
- Some symbols in one module are referenced in others
- Spoon doesn't appear to support cross-module definitions
Specifically, this usage of result
:
refers to:
But el.getVariable().getDeclaration()
is null
:
from scip-java.
Related Issues (20)
- Indexing Gradle v8 codebases does not work HOT 1
- Remove out of spec definitions from internal semanticdb proto
- Remove the "is_reference" relationship between synthetic apply and productElement* methods
- Avoid duplicate reference when using synthetic `.apply()` constructor
- Separate SCIP/Semanticdb symbols on a typelevel in the converter
- Allow the user to rely on build tool auto-detection without any input HOT 1
- Maven Custom Properties are Ignored HOT 4
- "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
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.