fwcd / kotlin-language-server

Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
MIT License
1.65k stars 206 forks source link

Consider increasing MAX_FQNAME_LENGTH #575

Open dimtion opened 4 months ago

dimtion commented 4 months ago

When resolving classpath I got the following message:

Could not resolve classpath using Cached + (Stdlib + ([] or (((((([] + Maven) + Gradle) + Shell) + Maven) + Gradle) + Shell)) or Backup): Value '/home/..../258-char-long-path/..../....jar' can't be stored to   database column because exceeds length (255)"

Would it be possible to increase the length of MAX_FQNAME_LENGTH to something larger than 255, for example 511 or 1023? Any negative impact of doing so?

I can open a PR if necessary.

fwcd commented 4 months ago

That seems odd, the MAX_FQNAME_LENGTH is a limit for fully-qualified class names, not file system paths (which should fall under the larger MAX_URI_LENGTH limit. Yet for some reason your log indicates that we store a path somewhere under the smaller limit.