View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027421 | Lazarus | IDE | public | 2015-02-08 12:04 | 2020-11-23 20:52 |
Reporter | Michael Van Canneyt | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | open | ||
Product Version | 1.5 (SVN) | ||||
Summary | 0027421: Files cached too aggressively in package dialog. | ||||
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. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | - | ||||
Widgetset | |||||
Attached Files |
|
|
|
|
The file cache is invalidated every time the IDE gets activated, i.e. when you switch back from another application to the IDE. It sounds as if the activate is broken on your system. What OS, window manager? |
|
Linux, Kubunutu, KDE 64-bit. Lazarus GTK2 widgetset. Maybe it has something to do with the fact that there is a modal dialog opened. The SVN problem I mentioned is noticeable both on Windows and Linux. As an aside: The activivation of Lazarus is but one use-case, it is not a guarantee. Real-life example: At 18:00 a scheduled script updates all SVN sources on my desktop PC at home. If Lazarus is opened and active at 18:00 (which is the case more often than not), it does not detect the changes. |
|
I faced a more or less similar issue about 2 weeks ago with a project. I changed the .pas and .lfm of an opened project with a text editor, and reopened the project with Lazarus. Lazarus showed the unedited files! A restart of Lazarus was necessary to get it to show the edited files. |
|
Maybe I should point out that most of the time, Lazarus does indeed detect the change in files and offers to reload them. It is just when this dialog is active and used that it does not seem to detect the change in files. The only difference with other cases I can think of is that the file is not actually in use anywhere yet (I am exactly trying to use it), so maybe this is the cause ? |
|
The modal dialog might be a problem. I have to check this. Reopening a project does indeed not reload all files. -> Bug |
|
I improved the checks in r64094. Now a check of filename vs. unitname works when adding a unit for both packages and project. Dummy question: how exactly you reopen a project? From menu Project -> Open Recent Project? Or do you mean reopening when the project info .lpi file got changed externally? |
|
Please test with current trunk. The change of files is still checked only at activation of Lazarus. Changing that would require big changes and eat resources. Maybe updating from SVN by timer is not a good idea. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-02-08 12:04 | Michael Van Canneyt | New Issue | |
2015-02-08 12:04 | Michael Van Canneyt | File Added: bug.zip | |
2015-02-08 12:05 | Michael Van Canneyt | Additional Information Updated | View Revisions |
2015-02-08 12:21 | Mattias Gaertner | Note Added: 0080858 | |
2015-02-08 12:21 | Mattias Gaertner | Assigned To | => Mattias Gaertner |
2015-02-08 12:21 | Mattias Gaertner | Status | new => feedback |
2015-02-08 13:06 | Michael Van Canneyt | Note Added: 0080859 | |
2015-02-08 13:06 | Michael Van Canneyt | Status | feedback => assigned |
2015-02-09 08:54 | Stephano | Note Added: 0080873 | |
2015-02-09 11:33 | Michael Van Canneyt | Note Added: 0080877 | |
2015-02-09 12:04 | Mattias Gaertner | Note Added: 0080879 | |
2020-09-02 23:19 | Juha Manninen | Assigned To | Mattias Gaertner => Juha Manninen |
2020-10-31 16:01 | Juha Manninen | Status | assigned => feedback |
2020-10-31 16:01 | Juha Manninen | Note Added: 0126680 | |
2020-11-02 11:10 | Juha Manninen | Note Edited: 0126680 | View Revisions |
2020-11-23 20:52 | Juha Manninen | Note Added: 0127145 |