sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Contains resources with very long paths

Open cypher256 opened this issue 2 years ago • 1 comments

4.18.0.RELEASE Even when installed in "sts-4.18.0.RELEASE", which is directly under the Windows drive, the longest path length is as long as 265.

ex: C:\sts-4.18.0.RELEASE\plugins\org.springframework.tooling.boot.ls_1.45.0.202303131439\servers\spring-boot-language-server\BOOT-INF\classes\org\springframework\ide\vscode\boot\java\data\providers\prefixsensitive\DataRepositoryPrefixSensitiveCompletionProvider.class

A well-known problem with Eclipse on Windows is that exceeding the Windows maximum path length 260 characters causes various problems. Is it possible to shorten the length? Given that we cannot force the location of STS when users install it, I think a maximum of 200 characters would be reasonable.

This is not specifically a problem in my environment, but I am reporting it just in case. If there is no problem, please close this Issue.

cypher256 avatar Mar 18 '23 03:03 cypher256

The long path of the file that you mentioned (and various others) is related to the fact that this plugin in STS (org.springframework.tooling.boot.ls) contains the language server in an exploded layout under the servers\spring-boot-language-server subdirectory. The main issue with these long path names is that the built-in zip tool in Windows can't deal with this and is not able to extract a ZIP file correctly that contains those long path names. This is the reason why the default windows package for STS comes in a "self-extracting" format, which really contains the logic to extract the content in a correct way - even with those long path names.

The only option to really change this would be to ship the embedded language server itself as a fat jar and start it from that (instead of the exploded layout), which comes at additional cost around startup time and a few other challenges, so there are a lot of pros and cons involved here.

Hope this explains the way it is at the moment. But we are happy to change this if our user base would like this to be changed and makes their lives easier. So let's see if there is additional feedback around this coming in here.

martinlippert avatar Mar 21 '23 15:03 martinlippert