History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-15634
Type: Bug Bug
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Brian Pontarelli
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

IntelliJ has problems when libraries are removed and replaced

Created: 11 Oct 07 02:12   Updated: 16 Oct 07 19:29
Component/s: Compiling Project

File Attachments: 1. Text File idea.log (125 kb)


Build: 7,330
Severity: High


 Description  « Hide
Background
----------------
We are using a dependency management tool called Savant that downloads project JAR files into the users home directory in the same manner that Maven does. We also are using vertigo-ant, which provides a two features of importance:

1. The ability to create IML files that reference the JAR files Savant downloads into the users home directory
2. Release processing for creating tags and releasing JAR files into remote locations

Most of our projects are configured to reference the JAR files from the users home directory because our developers use the vertigo-ant support for generating the .IML files for projects. Plus, the release process deletes all of these JAR files and downloads them fresh to ensure the project is releasable.

Issues
--------
When the release process deletes all of the JAR files referenced by the IML and cached/indexed by IJ, IJ has issues recovering from this. Often IJ has to re-cache/re-index the entire set of project libraries, even though the JAR files that are downloaded are identical to the JAR files IJ had previously indexed/cached. I would think that a simple MD5 sum might save some time and headaches when re-caching/re-indexing. This process is extremely time consuming and sometimes can put IJ into a state where it is unable to correctly find classes inside JAR files. I've even seen things get as bad as IJ assuming all the JAR files are missing, even though they exist and are completely valid. I would assume that the cache is getting corrupted.

One of the difficult problems is that our release tool might be in the process of downloading a JAR file while IJ is trying to parse it. In this case, IJ might think that the JAR file is corrupt. Once IJ gets into this state, the only solution seems to be to remove the JAR file, clear the cache, close IJ and restart everything from scratch. Perhaps IJ could add the concept of a MD5 file for each JAR file and waits until the MD5 of the JAR matches the value in the MD5 file. Savant, Maven and most dependency management tools support MD5 files for JARs. Otherwise, I would suggest that periodically checking if the JAR files size has changed (say every 10 milliseconds) until it is stable for a period of time should work.

Also, with the latest EAP build we are now seeing a number of exceptions and errors from IJ when these JAR files disappear and re-appear. I've attached my latest log file that contains some of these stack traces for you guys to look over.



 All   Comments   Work Log   Change History      Sort Order:
Brian Pontarelli - 16 Oct 07 19:29
Hey, I was wondering if the configuration property in the idea.properties named idea.jars.nocopy would make a difference. It looks like IJ does this specifically for Windows, but on Windows I doubt that this issue appears since the files are locked correctly. I'll test changing this property and see what IJ thinks.