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

Return empty SymbolDescriptor for empty symbol #254

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

olafurpg
Copy link
Member

@olafurpg olafurpg commented Jun 15, 2021

This change should fix the following stack trace

Caused by: java.lang.IllegalArgumentException: invalid symbol format
^
	at com.sourcegraph.lsif_semanticdb.SymbolDescriptor$Parser.fail(SymbolDescriptor.java:72)
	at com.sourcegraph.lsif_semanticdb.SymbolDescriptor$Parser.parseDescriptor(SymbolDescriptor.java:143)
	at com.sourcegraph.lsif_semanticdb.SymbolDescriptor$Parser.entryPoint(SymbolDescriptor.java:60)
	at com.sourcegraph.lsif_semanticdb.SymbolDescriptor.parseFromSymbol(SymbolDescriptor.java:20)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.symbolDisplayName(SignatureFormatter.java:532)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.formatType(SignatureFormatter.java:424)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.formatTypeArguments(SignatureFormatter.java:249)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.formatType(SignatureFormatter.java:414)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.formatMethodSignature(SignatureFormatter.java:164)
	at com.sourcegraph.lsif_semanticdb.SignatureFormatter.formatSymbol(SignatureFormatter.java:38)
	at com.sourcegraph.lsif_semanticdb.LsifSemanticdb.processDocument(LsifSemanticdb.java:140)
	at com.sourcegraph.lsif_semanticdb.LsifSemanticdb.lambda$processPath$3(LsifSemanticdb.java:83)

Reported by @wiwa

@olafurpg olafurpg merged commit fd09a0c into sourcegraph:main Jun 15, 2021
@olafurpg olafurpg deleted the exception branch June 15, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant