Files cached too aggressively in package dialog.
Original Reporter info from Mantis: michael @mvancanneyt
-
Reporter name: Michael Van Canneyt
Original Reporter info from Mantis: michael @mvancanneyt
- Reporter name: Michael Van Canneyt
Description:
Lazarus keeps files in cache and does not check for renewal at all locations.
Steps to reproduce:
- Outside lazarus, create Unit with file name differing from name in unit clause
(e.g. file testu.pp, unit testa)
- Create new package.
- select 'Add other items'
- Use 'Add files from directory' to add the unit.
- Press 'Add files to package'
- Lazarus warns that the names differ. Abort.
- Outside lazarus, fix the unit clause
- Inside lazarus, press again 'Add files to package'
-> Lazarus does not detect the file change and warns again that the names differ, despite the fact that the file has been fixed.
Presumably, it keeps the files in memory cache.
I have attached a zip with a test package and unit.
Additional information:
The new 'add' button in the package manager does not check the filename vs. unitname, and displays no warning, this is even worse IMHO.
A suspected related problem is that files that are in cache, but not in the editor, which are updated through SVN, are also not detected as updated and when opened, edited and saved, overwrite the updated version with the older versions in memory.
This is harder to reproduce reliably but has bugged us on more than one occasion.
As a result we now routinely close lazarus prior to running svn update.
I suggest a button 'clear file cache' that clears file in the cache which are not open in some dialog. Similar in functionality to 'Clear browser history' in a web browser.
Mantis conversion info:
- Mantis ID: 27421
- Version: 1.5 (SVN)