-
Notifications
You must be signed in to change notification settings - Fork 20
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
IOOBE in project loading prevents any analysis #151
Comments
Similar to #110. Here's the stack trace:
However, the IOOBE is just a symptom: if we print the already-collected locations, we'll see that they're already wrong: diff --git a/src/main/java/software/amazon/smithy/lsp/ext/FileCachingCollector.java b/src/main/java/software/amazon/smithy/lsp/ext/FileCachingCollector.java
index 334bcd2..a4f91af 100644
--- a/src/main/java/software/amazon/smithy/lsp/ext/FileCachingCollector.java
+++ b/src/main/java/software/amazon/smithy/lsp/ext/FileCachingCollector.java
@@ -202,6 +202,7 @@ final class FileCachingCollector implements ShapeLocationCollector {
memberEndMarker = traits.get(0).getSourceLocation().getLine();
}
+ LspLog.println("Indexing " + memberShape.getId() + " as " + createLocation(modelFile.filename, startPosition, endPosition));
locations.put(memberShape.getId(), createLocation(modelFile.filename, startPosition, endPosition));
previousLine = currentLine;
}
So we're crashing during the analysis of BTW. this is fixed in #146, but it's still in progress and this is affecting my teams today. |
Closing as this is fixed by #146 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce:
sources
IndexOutOfBoundsException
inFileCachingCollector
, resulting in any analysis/navigation afterwards throwing a NPE (project is null)The text was updated successfully, but these errors were encountered: