Closed scottkurz closed 11 months ago
@scottkurz LCLS does read that file, but we don't "lock" it. I see things like this all the time on Windows though. When our tests run for the plugins, we see failures on clean because some Liberty file cannot be deleted. Not sure there is anything we can do about it.
Found a potential spot of code to change. The properties are read in the constructor in io.openliberty.tools.langserver.lemminx.data.LibertyRuntime(Path)
. The FileInputStream is not closed in the constructor. Should use a try-with-resources statement when processing the properties file instead.
Yeah I know saying LCLS "locks" it is oversimplifying and not entirely accurate. I just tried it again and I failed repeatedly and had to open a different editor (besides the server.xml one) to get the clean to work. OK, nice to know we have something to look at.
So I wanted to at least raise this for awareness...not sure what can easily be done...
But if I have my server.xml file open in Liberty Tools Eclipse and need to do a clean
mvn clean
(FWIW, Liberty Tools Eclipse doesn't offer a clean function but that's kind of besides the point here), it sometimes fails because the file is locked.I assume this is locked by the LCLS lemminx ext:
And...the workaround is just to try again until it works, which is a pretty obvious a thing to try as well. so not a huge deal. Just noting.