Recent

Author Topic: Lazarus file change tool very very bad  (Read 6646 times)

anna

  • Sr. Member
  • ****
  • Posts: 426
Lazarus file change tool very very bad
« on: July 29, 2015, 11:00:59 am »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

lazjump

  • Jr. Member
  • **
  • Posts: 61
Re: Lazarus file change tool very very bad
« Reply #1 on: July 29, 2015, 02:21:23 pm »
(This is not a direct answer for your question)

I once had similar problem when running Win XP SP3 in VirtualBox VM, and working with files in a shared folder (shared by the host system). In my case, I think it was not Lazarus' fault because it happened with Delphi 7 too.
I thought Delphi was expensive until I learned the price of ExtJS

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Lazarus file change tool very very bad
« Reply #2 on: July 29, 2015, 02:36:57 pm »
How to turn OFF ???
On Windows 8 (and possibly earlier versions) execute the command:
Code: [Select]
shutdown /s /t 0
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: Lazarus file change tool very very bad
« Reply #3 on: July 29, 2015, 06:15:13 pm »
How to turn OFF ???
On Windows 8 (and possibly earlier versions) execute the command:
Code: [Select]
shutdown /s /t 0

Are you joking?
The question is "How to turn off stupid Lazarus' file changing detection?"
Now this stupid detection is based on modification time of files. This MUST BE BASED on CRC32!!! Remember!
WinXP SP3 Pro Russian 32-bit (5.1.2600)

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Lazarus file change tool very very bad
« Reply #4 on: July 29, 2015, 06:18:46 pm »
Why do you insist on using offending words towards the developers, each and every time you report something here?
It does not encourage anyone of us to help you.

Bart
« Last Edit: July 29, 2015, 06:44:50 pm by Bart »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus file change tool very very bad
« Reply #5 on: July 29, 2015, 06:25:27 pm »
being rude and mean is the shortest part to a human's heart :)

What anna is looking for is:
Tools -> Options -> Environment -> Desktop -> "Check and Auto save files"
Check for disk file changes via content rather than timestamp

bylaardt

  • Sr. Member
  • ****
  • Posts: 309
Re: Lazarus file change tool very very bad
« Reply #6 on: July 29, 2015, 07:46:42 pm »
Do not care about this now! one day... after marriage, after several daughters, you can understand it.
be happy and ignore this comments. ;)
« Last Edit: July 29, 2015, 07:49:00 pm by skalogryz »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus file change tool very very bad
« Reply #7 on: July 29, 2015, 07:49:26 pm »
bylaardt, thank you for not using more offense.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: Lazarus file change tool very very bad
« Reply #8 on: July 29, 2015, 09:03:41 pm »
Why do you insist on using offending words towards the developers, each and every time you report something here?
It does not encourage anyone of us to help you.

Bart

And is joking  a normal manner of speaking?
You jokes are offensive.
Just do not joke and all my messages will be polite.
"Stupid" is literary expression , so no rudeness presents at all.
If Lazarus has useless features , I will  call things by their proper names .
WinXP SP3 Pro Russian 32-bit (5.1.2600)

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: Lazarus file change tool very very bad
« Reply #9 on: July 29, 2015, 09:04:10 pm »
being rude and mean is the shortest part to a human's heart :)

What anna is looking for is:
Tools -> Options -> Environment -> Desktop -> "Check and Auto save files"
Check for disk file changes via content rather than timestamp
Enabling this checkbox does nothing. I still get window when time is changed (see issue for steps to reproduce).

How to disable this WONDERFUL* feature completely, not switch from one WONDERFUL to another WONDERFUL feature.

____
*I will use WONDERFUL instead stupid in this topic.
« Last Edit: July 29, 2015, 09:27:20 pm by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus file change tool very very bad
« Reply #10 on: July 29, 2015, 09:20:49 pm »
Cannot confirm. Works as expected here (modify time stamp is ignored and the content is verified).
BUT you can try to check "content changes" checkbox when the dialog shows up.

Another problem that might be there, is that file gets updated, but with "non-printable" updates.
For example, a line breaks #13#10 are being replaced with #10.
The text doesn't "obviously" change, but file content does.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus file change tool very very bad
« Reply #11 on: July 29, 2015, 09:21:40 pm »
what's causing your file modify time to be updated?
never mind. I've read through the bug report.
« Last Edit: July 29, 2015, 09:51:06 pm by skalogryz »

anna

  • Sr. Member
  • ****
  • Posts: 426
« Last Edit: July 30, 2015, 06:06:36 am by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus file change tool very very bad
« Reply #13 on: July 29, 2015, 10:26:24 pm »
Just keep the checkbox checked and add this code to Lazarus packager
Code: [Select]
Index: packager/packagesystem.pas
===================================================================
--- packager/packagesystem.pas  (revision 48971)
+++ packager/packagesystem.pas  (working copy)
@@ -5007,6 +5007,10 @@
       continue;
     NewFilename:=APackage.Filename;
     if FileExistsCached(APackage.Filename) then begin
+
+      if EnvironmentOptions.CheckDiskChangesWithLoading and (APackage.LPKSource<>nil) then
+        APackage.LPKSource.MakeFileDateValid;
+
       if (APackage.LPKSource<>nil)
       and (not APackage.LPKSource.FileNeedsUpdate) then
         continue;

C:\FPC_Laz\lazarus>
Currently the checkbox is working for regular files (project files or files opened in the source editor). However, packages is not using the flag. The patch above would resolve the issue for you, but i'm not confident if that's the best way to resolve it long term.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: Lazarus file change tool very very bad
« Reply #14 on: July 30, 2015, 05:36:42 am »
Just keep the checkbox checked and add this code to Lazarus packager
Code: [Select]
Index: packager/packagesystem.pas
===================================================================
--- packager/packagesystem.pas  (revision 48971)
+++ packager/packagesystem.pas  (working copy)
@@ -5007,6 +5007,10 @@
       continue;
     NewFilename:=APackage.Filename;
     if FileExistsCached(APackage.Filename) then begin
+
+      if EnvironmentOptions.CheckDiskChangesWithLoading and (APackage.LPKSource<>nil) then
+        APackage.LPKSource.MakeFileDateValid;
+
       if (APackage.LPKSource<>nil)
       and (not APackage.LPKSource.FileNeedsUpdate) then
         continue;

C:\FPC_Laz\lazarus>
Currently the checkbox is working for regular files (project files or files opened in the source editor). However, packages is not using the flag. The patch above would resolve the issue for you, but i'm not confident if that's the best way to resolve it long term.

What is "Lazarus packager""? I don't know how to do that. And take notice of that I do not use thunk and svn. I use ready made installers. After breaking autoupdates of snapshots, release is only way to get Lazarus for me.
« Last Edit: July 30, 2015, 05:39:10 am by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

 

TinyPortal © 2005-2018