[racket-dev] overwrite
When I use drracket, I frequently get a warning that my file has been modified on disk and the question of whether I want to save the file or revert. Is anyone else suffering from this problem? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
It's from git touching the files and giving them a new timestamp. It probably didn't really change. Jay 2011/2/26 Matthias Felleisen : > > When I use drracket, I frequently get a warning that my file has been > modified on disk and the question of whether I want to save the file or > revert. Is anyone else suffering from this problem? > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Jay McCarthy Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
The files I have been editing this morning are not under Git control. (And yes, I have on one occasion checked the file via Emacs and didn't see any difference.) On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > It's from git touching the files and giving them a new timestamp. It > probably didn't really change. > > Jay > > 2011/2/26 Matthias Felleisen : >> >> When I use drracket, I frequently get a warning that my file has been >> modified on disk and the question of whether I want to save the file or >> revert. Is anyone else suffering from this problem? >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> > > > > -- > Jay McCarthy > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
I also see this quite frequently (for files not under Git control). I was thinking at one point it might be related to when I run check syntax, but I haven't confirmed a repeatable pattern. -Kathy On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: > > The files I have been editing this morning are not under Git control. > (And yes, I have on one occasion checked the file via Emacs and didn't > see any difference.) > > > On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > >> It's from git touching the files and giving them a new timestamp. It >> probably didn't really change. >> >> Jay >> >> 2011/2/26 Matthias Felleisen : >>> >>> When I use drracket, I frequently get a warning that my file has been >>> modified on disk and the question of whether I want to save the file or >>> revert. Is anyone else suffering from this problem? >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >>> >> >> >> >> -- >> Jay McCarthy >> Assistant Professor / Brigham Young University >> http://faculty.cs.byu.edu/~jay >> >> "The glory of God is Intelligence" - D&C 93 > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
I confirm the check syntax observation. On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: > I also see this quite frequently (for files not under Git control). I was > thinking at one point it might be related to when I run check syntax, but I > haven't confirmed a repeatable pattern. > > -Kathy > > > > > On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: > >> >> The files I have been editing this morning are not under Git control. >> (And yes, I have on one occasion checked the file via Emacs and didn't >> see any difference.) >> >> >> On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: >> >>> It's from git touching the files and giving them a new timestamp. It >>> probably didn't really change. >>> >>> Jay >>> >>> 2011/2/26 Matthias Felleisen : When I use drracket, I frequently get a warning that my file has been modified on disk and the question of whether I want to save the file or revert. Is anyone else suffering from this problem? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >>> >>> >>> -- >>> Jay McCarthy >>> Assistant Professor / Brigham Young University >>> http://faculty.cs.byu.edu/~jay >>> >>> "The glory of God is Intelligence" - D&C 93 >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Well it just occurred for a file under Git but WITHOUT check syntax. On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: > > I confirm the check syntax observation. > > On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: > >> I also see this quite frequently (for files not under Git control). I was >> thinking at one point it might be related to when I run check syntax, but I >> haven't confirmed a repeatable pattern. >> >> -Kathy >> >> >> >> >> On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: >> >>> >>> The files I have been editing this morning are not under Git control. >>> (And yes, I have on one occasion checked the file via Emacs and didn't >>> see any difference.) >>> >>> >>> On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: >>> It's from git touching the files and giving them a new timestamp. It probably didn't really change. Jay 2011/2/26 Matthias Felleisen : > > When I use drracket, I frequently get a warning that my file has been > modified on disk and the question of whether I want to save the file or > revert. Is anyone else suffering from this problem? > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Jay McCarthy Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 >>> >>> >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >> > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
I get this a lot, using just the binary installer version downloaded from racket-lang.org. And it happens even when I'm not using check-syntax, though it might happen more frequently when I do use check-syntax; hard to tell. On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen wrote: > > Well it just occurred for a file under Git but WITHOUT check syntax. > > > > On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: > >> >> I confirm the check syntax observation. >> >> On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: >> >>> I also see this quite frequently (for files not under Git control). I was >>> thinking at one point it might be related to when I run check syntax, but I >>> haven't confirmed a repeatable pattern. >>> >>> -Kathy >>> >>> >>> >>> >>> On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: >>> The files I have been editing this morning are not under Git control. (And yes, I have on one occasion checked the file via Emacs and didn't see any difference.) On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > It's from git touching the files and giving them a new timestamp. It > probably didn't really change. > > Jay > > 2011/2/26 Matthias Felleisen : >> >> When I use drracket, I frequently get a warning that my file has been >> modified on disk and the question of whether I want to save the file or >> revert. Is anyone else suffering from this problem? >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> > > > > -- > Jay McCarthy > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College PO Box 5014 2277 Martha Berry Hwy NW Mount Berry, GA 30149-5014 (706) 368-5632 http://cs.berry.edu/~nhamid/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Are any of you, by any chance: - using a teaching language (via the language menu, not #lang 2htdp/bsl or similar) - hitting run and then save right *after* run when you get this message? Robby On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: > I get this a lot, using just the binary installer version downloaded > from racket-lang.org. And it happens even when I'm not using > check-syntax, though it might happen more frequently when I do use > check-syntax; hard to tell. > > > > On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen > wrote: >> >> Well it just occurred for a file under Git but WITHOUT check syntax. >> >> >> >> On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: >> >>> >>> I confirm the check syntax observation. >>> >>> On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: >>> I also see this quite frequently (for files not under Git control). I was thinking at one point it might be related to when I run check syntax, but I haven't confirmed a repeatable pattern. -Kathy On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: > > The files I have been editing this morning are not under Git control. > (And yes, I have on one occasion checked the file via Emacs and didn't > see any difference.) > > > On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > >> It's from git touching the files and giving them a new timestamp. It >> probably didn't really change. >> >> Jay >> >> 2011/2/26 Matthias Felleisen : >>> >>> When I use drracket, I frequently get a warning that my file has been >>> modified on disk and the question of whether I want to save the file or >>> revert. Is anyone else suffering from this problem? >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >>> >> >> >> >> -- >> Jay McCarthy >> Assistant Professor / Brigham Young University >> http://faculty.cs.byu.edu/~jay >> >> "The glory of God is Intelligence" - D&C 93 > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev >>> >>> >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> > > > > -- > Nadeem Abdul Hamid > Associate Professor, Computer Science > Berry College > PO Box 5014 > 2277 Martha Berry Hwy NW > Mount Berry, GA 30149-5014 > (706) 368-5632 > http://cs.berry.edu/~nhamid/ > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
On Feb 26, 2011, at 12:12 PM, Robby Findler wrote: > Are any of you, by any chance: > > - using a teaching language (via the language menu, not #lang > 2htdp/bsl or similar) #lang racket > - hitting run and then save right *after* run no > > when you get this message? > > Robby > > On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: >> I get this a lot, using just the binary installer version downloaded >> from racket-lang.org. And it happens even when I'm not using >> check-syntax, though it might happen more frequently when I do use >> check-syntax; hard to tell. >> >> >> >> On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen >> wrote: >>> >>> Well it just occurred for a file under Git but WITHOUT check syntax. >>> >>> >>> >>> On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: >>> I confirm the check syntax observation. On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: > I also see this quite frequently (for files not under Git control). I was > thinking at one point it might be related to when I run check syntax, but > I haven't confirmed a repeatable pattern. > > -Kathy > > > > > On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: > >> >> The files I have been editing this morning are not under Git control. >> (And yes, I have on one occasion checked the file via Emacs and didn't >> see any difference.) >> >> >> On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: >> >>> It's from git touching the files and giving them a new timestamp. It >>> probably didn't really change. >>> >>> Jay >>> >>> 2011/2/26 Matthias Felleisen : When I use drracket, I frequently get a warning that my file has been modified on disk and the question of whether I want to save the file or revert. Is anyone else suffering from this problem? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >>> >>> >>> -- >>> Jay McCarthy >>> Assistant Professor / Brigham Young University >>> http://faculty.cs.byu.edu/~jay >>> >>> "The glory of God is Intelligence" - D&C 93 >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >>> >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >>> >> >> >> >> -- >> Nadeem Abdul Hamid >> Associate Professor, Computer Science >> Berry College >> PO Box 5014 >> 2277 Martha Berry Hwy NW >> Mount Berry, GA 30149-5014 >> (706) 368-5632 >> http://cs.berry.edu/~nhamid/ >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Same answers. -Kathy On 26 Feb 2011, at 5:23:56, Matthias Felleisen wrote: > > On Feb 26, 2011, at 12:12 PM, Robby Findler wrote: > >> Are any of you, by any chance: >> >> - using a teaching language (via the language menu, not #lang >> 2htdp/bsl or similar) > > #lang racket > > >> - hitting run and then save right *after* run > > no > > >> >> when you get this message? >> >> Robby >> >> On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: >>> I get this a lot, using just the binary installer version downloaded >>> from racket-lang.org. And it happens even when I'm not using >>> check-syntax, though it might happen more frequently when I do use >>> check-syntax; hard to tell. >>> >>> >>> >>> On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen >>> wrote: Well it just occurred for a file under Git but WITHOUT check syntax. On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: > > I confirm the check syntax observation. > > On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: > >> I also see this quite frequently (for files not under Git control). I >> was thinking at one point it might be related to when I run check >> syntax, but I haven't confirmed a repeatable pattern. >> >> -Kathy >> >> >> >> >> On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: >> >>> >>> The files I have been editing this morning are not under Git control. >>> (And yes, I have on one occasion checked the file via Emacs and didn't >>> see any difference.) >>> >>> >>> On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: >>> It's from git touching the files and giving them a new timestamp. It probably didn't really change. Jay 2011/2/26 Matthias Felleisen : > > When I use drracket, I frequently get a warning that my file has been > modified on disk and the question of whether I want to save the file > or revert. Is anyone else suffering from this problem? > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Jay McCarthy Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 >>> >>> >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >> > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >>> >>> >>> -- >>> Nadeem Abdul Hamid >>> Associate Professor, Computer Science >>> Berry College >>> PO Box 5014 >>> 2277 Martha Berry Hwy NW >>> Mount Berry, GA 30149-5014 >>> (706) 368-5632 >>> http://cs.berry.edu/~nhamid/ >>> >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >>> > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Looking at the code, I don't see anything suspicious (assuming that after-save-file and file-or-directory-modify-seconds work properly, that is). If you find a way to make it happen (even if it only works 1 in 10 tries or something), that would help. Or if you had the energy to instrument the after-save-file method in the framework to tell what it is doing and watched those printsouts and compared them with reality that would be a lot of help. Robby On Sat, Feb 26, 2011 at 11:26 AM, Kathy Gray wrote: > Same answers. > -Kathy > > On 26 Feb 2011, at 5:23:56, Matthias Felleisen wrote: > >> >> On Feb 26, 2011, at 12:12 PM, Robby Findler wrote: >> >>> Are any of you, by any chance: >>> >>> - using a teaching language (via the language menu, not #lang >>> 2htdp/bsl or similar) >> >> #lang racket >> >> >>> - hitting run and then save right *after* run >> >> no >> >> >>> >>> when you get this message? >>> >>> Robby >>> >>> On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: I get this a lot, using just the binary installer version downloaded from racket-lang.org. And it happens even when I'm not using check-syntax, though it might happen more frequently when I do use check-syntax; hard to tell. On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen wrote: > > Well it just occurred for a file under Git but WITHOUT check syntax. > > > > On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: > >> >> I confirm the check syntax observation. >> >> On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: >> >>> I also see this quite frequently (for files not under Git control). I >>> was thinking at one point it might be related to when I run check >>> syntax, but I haven't confirmed a repeatable pattern. >>> >>> -Kathy >>> >>> >>> >>> >>> On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: >>> The files I have been editing this morning are not under Git control. (And yes, I have on one occasion checked the file via Emacs and didn't see any difference.) On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > It's from git touching the files and giving them a new timestamp. It > probably didn't really change. > > Jay > > 2011/2/26 Matthias Felleisen : >> >> When I use drracket, I frequently get a warning that my file has >> been modified on disk and the question of whether I want to save the >> file or revert. Is anyone else suffering from this problem? >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> > > > > -- > Jay McCarthy > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College PO Box 5014 2277 Martha Berry Hwy NW Mount Berry, GA 30149-5014 (706) 368-5632 http://cs.berry.edu/~nhamid/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Dunno whether this helps... I haven't looked at the pertinent Racket code, but errors like this often happen in Unix applications because the mtime of the file is in the future relative to the current time clock. Less commonly, because the mtime changed since the file was read by the app or since the app last checked. The most common case can happen because a VC/CM system is updating the times (someone mentioned Git, and some other systems do this), because it's a network filesystem and the server and workstation clocks aren't synced sufficiently, or because NTP or some other mechanism dangerously jumped the current time clock in reverse (usually a good NTP daemon will slow the clock rather than jump in reverse). Robby Findler wrote at 02/26/2011 01:39 PM: Looking at the code, I don't see anything suspicious (assuming that after-save-file and file-or-directory-modify-seconds work properly, that is). -- http://www.neilvandyke.org/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
The code compares the date of the file when it was last saved to the date of the file when "run" is clicked. Robby On Sat, Feb 26, 2011 at 12:50 PM, Neil Van Dyke wrote: > Dunno whether this helps... > > I haven't looked at the pertinent Racket code, but errors like this often > happen in Unix applications because the mtime of the file is in the future > relative to the current time clock. Less commonly, because the mtime > changed since the file was read by the app or since the app last checked. > > The most common case can happen because a VC/CM system is updating the times > (someone mentioned Git, and some other systems do this), because it's a > network filesystem and the server and workstation clocks aren't synced > sufficiently, or because NTP or some other mechanism dangerously jumped the > current time clock in reverse (usually a good NTP daemon will slow the clock > rather than jump in reverse). > > Robby Findler wrote at 02/26/2011 01:39 PM: >> >> Looking at the code, I don't see anything suspicious (assuming that >> after-save-file and file-or-directory-modify-seconds work properly, that >> is). >> > > -- > http://www.neilvandyke.org/ > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
On Feb 26, 2011, at 9:26 AM, Kathy Gray wrote: > Same answers. > -Kathy +1 I've seen this for ~ 6 months; I believe I've reported it before, but never followed up on it adequately. At least one of my students has also seen it. To add a few details: It usually happens on a "run", asking if I want to revert the file. The message occurs on every subsequent run, until I save. When I save, DrRacket indicates that the file has changed on disk, and do I want to overwrite (yes). Then things are fine again. Is this the kind of annotation you were thinking of? oiseau:~/plt/collects/framework clements$ git diff private/editor.rkt diff --git a/collects/framework/private/editor.rkt b/collects/framework/private/editor.rkt index 0c8981b..9f21ce6 100644 --- a/collects/framework/private/editor.rkt +++ b/collects/framework/private/editor.rkt @@ -209,6 +209,9 @@ (and fn (file-exists? fn) (let ([ms (file-or-directory-modify-seconds fn)]) + (when (< last-saved-file-time ms) +(log-warning (format "last-saved-file-time: ~v" last-saved-file-time)) +(log-warning (format "file-modified-time: ~v" ms))) (< last-saved-file-time ms)) (define has-focus #f) oiseau:~/plt/collects/framework clements$ Looking at this code, I'm betting on Neil's suggestion of NTP, though I realize that the mechanism isn't obvious... perhaps the OS adjusts the save times of recently-saved files? John Clements > > On 26 Feb 2011, at 5:23:56, Matthias Felleisen wrote: > >> >> On Feb 26, 2011, at 12:12 PM, Robby Findler wrote: >> >>> Are any of you, by any chance: >>> >>> - using a teaching language (via the language menu, not #lang >>> 2htdp/bsl or similar) >> >> #lang racket >> >> >>> - hitting run and then save right *after* run >> >> no >> >> >>> >>> when you get this message? >>> >>> Robby >>> >>> On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: I get this a lot, using just the binary installer version downloaded from racket-lang.org. And it happens even when I'm not using check-syntax, though it might happen more frequently when I do use check-syntax; hard to tell. On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen wrote: > > Well it just occurred for a file under Git but WITHOUT check syntax. > > > > On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: > >> >> I confirm the check syntax observation. >> >> On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: >> >>> I also see this quite frequently (for files not under Git control). I >>> was thinking at one point it might be related to when I run check >>> syntax, but I haven't confirmed a repeatable pattern. >>> >>> -Kathy >>> >>> >>> >>> >>> On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: >>> The files I have been editing this morning are not under Git control. (And yes, I have on one occasion checked the file via Emacs and didn't see any difference.) On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > It's from git touching the files and giving them a new timestamp. It > probably didn't really change. > > Jay > > 2011/2/26 Matthias Felleisen : >> >> When I use drracket, I frequently get a warning that my file has >> been modified on disk and the question of whether I want to save the >> file or revert. Is anyone else suffering from this problem? >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev >> > > > > -- > Jay McCarthy > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev >>> >> >> >> _ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/dev > > > _ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/dev > -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College PO Box 5014 2277 Martha Berry Hwy NW Mount Berry, GA 30149-5014 (706) 368-5632 http://cs.berry.edu/~nhamid/ _ Fo
Re: [racket-dev] overwrite
On Feb 27, 2011, at 10:08 AM, John Clements wrote: > > Looking at this code, I'm betting on Neil's suggestion of NTP, though I > realize that the mechanism isn't obvious... perhaps the OS adjusts the save > times of recently-saved files? One other note; if it's NTP, it would probably happen only on computers whose clocks tended to run a little fast or a little slow; this could explain why some of us have never seen this, and others see it all the time. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Yes, that's it. Also, put something into the after-save-file-method: diff --git a/collects/framework/private/editor.rkt b/collects/framework/private/editor.rkt index 0c8981b..cb5504a 100644 --- a/collects/framework/private/editor.rkt +++ b/collects/framework/private/editor.rkt @@ -190,7 +190,8 @@ (set! last-saved-file-time (and filename (file-exists? filename) - (file-or-directory-modify-seconds filename) + (file-or-directory-modify-seconds filename)) +(log-warning (format "saved ~a at ~a" filename last-saved-file-time) (inner (void) after-save-file success?)) and then when you see this strange behavior, maybe it the particular numbers that you're seeing might shed some light on which part of this is going wrong. Thanks! Robby On Sun, Feb 27, 2011 at 12:08 PM, John Clements wrote: > > On Feb 26, 2011, at 9:26 AM, Kathy Gray wrote: > >> Same answers. >> -Kathy > > +1 > > I've seen this for ~ 6 months; I believe I've reported it before, but never > followed up on it adequately. At least one of my students has also seen it. > > To add a few details: It usually happens on a "run", asking if I want to > revert the file. The message occurs on every subsequent run, until I save. > When I save, DrRacket indicates that the file has changed on disk, and do I > want to overwrite (yes). Then things are fine again. > > Is this the kind of annotation you were thinking of? > > oiseau:~/plt/collects/framework clements$ git diff private/editor.rkt > diff --git a/collects/framework/private/editor.rkt > b/collects/framework/private/editor.rkt > index 0c8981b..9f21ce6 100644 > --- a/collects/framework/private/editor.rkt > +++ b/collects/framework/private/editor.rkt > @@ -209,6 +209,9 @@ > (and fn > (file-exists? fn) > (let ([ms (file-or-directory-modify-seconds fn)]) > + (when (< last-saved-file-time ms) > + (log-warning (format "last-saved-file-time: ~v" > last-saved-file-time)) > + (log-warning (format "file-modified-time: ~v" ms))) > (< last-saved-file-time ms)) > > (define has-focus #f) > oiseau:~/plt/collects/framework clements$ > > > Looking at this code, I'm betting on Neil's suggestion of NTP, though I > realize that the mechanism isn't obvious... perhaps the OS adjusts the save > times of recently-saved files? > > > John Clements > > > >> >> On 26 Feb 2011, at 5:23:56, Matthias Felleisen wrote: >> >>> >>> On Feb 26, 2011, at 12:12 PM, Robby Findler wrote: >>> Are any of you, by any chance: - using a teaching language (via the language menu, not #lang 2htdp/bsl or similar) >>> >>> #lang racket >>> >>> - hitting run and then save right *after* run >>> >>> no >>> >>> when you get this message? Robby On Sat, Feb 26, 2011 at 11:10 AM, Nadeem Abdul Hamid wrote: > I get this a lot, using just the binary installer version downloaded > from racket-lang.org. And it happens even when I'm not using > check-syntax, though it might happen more frequently when I do use > check-syntax; hard to tell. > > > > On Sat, Feb 26, 2011 at 12:05 PM, Matthias Felleisen > wrote: >> >> Well it just occurred for a file under Git but WITHOUT check syntax. >> >> >> >> On Feb 26, 2011, at 11:48 AM, Matthias Felleisen wrote: >> >>> >>> I confirm the check syntax observation. >>> >>> On Feb 26, 2011, at 11:39 AM, Kathy Gray wrote: >>> I also see this quite frequently (for files not under Git control). I was thinking at one point it might be related to when I run check syntax, but I haven't confirmed a repeatable pattern. -Kathy On 26 Feb 2011, at 4:36:37, Matthias Felleisen wrote: > > The files I have been editing this morning are not under Git control. > (And yes, I have on one occasion checked the file via Emacs and didn't > see any difference.) > > > On Feb 26, 2011, at 11:35 AM, Jay McCarthy wrote: > >> It's from git touching the files and giving them a new timestamp. It >> probably didn't really change. >> >> Jay >> >> 2011/2/26 Matthias Felleisen : >>> >>> When I use drracket, I frequently get a warning that my file has >>> been modified on disk and the question of whether I want to save >>> the file or revert. Is anyone else suffering from this problem? >>> _ >>> For list-related administrative tasks: >>> http://lists.racket-lang.org/listinfo/dev >>> >> >> >> >>
Re: [racket-dev] overwrite
On Feb 27, 2011, at 11:42 AM, Robby Findler wrote: > Yes, that's it. Also, put something into the after-save-file-method: > > diff --git a/collects/framework/private/editor.rkt > b/collects/framework/private/editor.rkt > index 0c8981b..cb5504a 100644 > --- a/collects/framework/private/editor.rkt > +++ b/collects/framework/private/editor.rkt > @@ -190,7 +190,8 @@ > (set! last-saved-file-time > (and filename >(file-exists? filename) > - (file-or-directory-modify-seconds filename) > + (file-or-directory-modify-seconds filename)) > +(log-warning (format "saved ~a at ~a" filename > last-saved-file-time) > > (inner (void) after-save-file success?)) > > and then when you see this strange behavior, maybe it the particular > numbers that you're seeing might shed some light on which part of this > is going wrong. Add'l data point: I tried messing up the clock manually, by turning off NTP, but I was unable to duplicate the bug this way. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
> Looking at this code, I'm betting on Neil's suggestion of NTP, though I > realize that the mechanism isn't obvious... perhaps the OS adjusts the save > times of recently-saved files? I haven't followed this discussion closely, nor looked at the relevant code. However :) >From what I know about NTP, it will never make time "go backwards", so I doubt it's the culprit. (When NTP determines that your clock is later than it should be, it merely slows it down a bit until the true time "catches up" with it.) _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Two hours ago, John Clements wrote: > > Add'l data point: I tried messing up the clock manually, by turning > off NTP, but I was unable to duplicate the bug this way. NTP is unlikely to be the problem, since the times are saved on the filesystem, independently of the system time (or clock). And since Robby says that DrR compares only the time value regardless of being in the future, then there shouldn't be any problem with that. (It might, however, lead to problems if there's something that can change the file's time when it's in the future -- for example, if compiling the file tries to guarantee that it is not in the future for the compiled file to be further in time, and if DrR causes this by the automatic compilation. (This is not a guess about the problem, just an example of how it could break.)) As for git, it shouldn't lead to times in the future, since unlike other systems (like svn), it does not have a time stamp for each file. Instead, the idea is that it only changes files that it touches and uses the current time. This is why a rebase operation can lead to a lot of time changes -- since it will undo your commit(s), then fast-forward the repository, then replay the commits, so you end up with many files that have the same contents, but a different time. (And as an unrelated reminder -- if this bothers anyone, I have a wrapper that properly restores the time for such operations.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
Is this happening on network-mounted drives? One strange thing I've run into in the past is that on SMB-mounted filesystems, the timestamp is rounded off to a multiple of 2 seconds. It seems like that could cause this problem. rsync has a --modify-window parameter to accommodate this. e.g. see here: http://www.goodjobsucking.com/?p=16 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
On 27.02.11 23:33, Eli Barzilay wrote: Two hours ago, John Clements wrote: Add'l data point: I tried messing up the clock manually, by turning off NTP, but I was unable to duplicate the bug this way. NTP is unlikely to be the problem, since the times are saved on the filesystem, independently of the system time (or clock). And since Robby says that DrR compares only the time value regardless of being in the future, then there shouldn't be any problem with that. If NTP or clock drift was the reason then makefiles would not work and vim would also complain a lot (an this is not the case, at least for me). I do not use network mounts or git and I too get this message almost all the time on OS X. I will try to track it down using the patches posted in this thread. -- regards, Jakub Piotr Cłapa _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
On Fri, Mar 4, 2011 at 3:24 PM, Jakub Piotr Cłapa wrote: > On 27.02.11 23:33, Eli Barzilay wrote: > >> Two hours ago, John Clements wrote: >> >>> >>> Add'l data point: I tried messing up the clock manually, by turning >>> off NTP, but I was unable to duplicate the bug this way. >>> >> >> NTP is unlikely to be the problem, since the times are saved on the >> filesystem, independently of the system time (or clock). And since >> Robby says that DrR compares only the time value regardless of being >> in the future, then there shouldn't be any problem with that. >> > > If NTP or clock drift was the reason then makefiles would not work and vim > would also complain a lot (an this is not the case, at least for me). > > I do not use network mounts or git and I too get this message almost all > the time on OS X. I will try to track it down using the patches posted in > this thread. > I got my first hit using these patches. I tried to save the file, and was informed that it had changed on disk since my last save from DrRacket, and did I want to overwrite it. Here's what I got last-saved-file-time: 1299611826 file-modified-time: 1299611832 These times are both quite close to when I tried to save. In retrospect, I should have added the output of (current-seconds) to the log output. I don't recall a six-second delay while trying to save. John _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] overwrite
On Tue, Mar 8, 2011 at 3:59 PM, John Clements wrote: > > On Fri, Mar 4, 2011 at 3:24 PM, Jakub Piotr Cłapa > wrote: >> >> On 27.02.11 23:33, Eli Barzilay wrote: >>> >>> Two hours ago, John Clements wrote: Add'l data point: I tried messing up the clock manually, by turning off NTP, but I was unable to duplicate the bug this way. >>> >>> NTP is unlikely to be the problem, since the times are saved on the >>> filesystem, independently of the system time (or clock). And since >>> Robby says that DrR compares only the time value regardless of being >>> in the future, then there shouldn't be any problem with that. >> >> If NTP or clock drift was the reason then makefiles would not work and vim >> would also complain a lot (an this is not the case, at least for me). >> >> I do not use network mounts or git and I too get this message almost all >> the time on OS X. I will try to track it down using the patches posted in >> this thread. > > I got my first hit using these patches. I tried to save the file, and was > informed that it had changed on disk since my last save from DrRacket, and > did I want to overwrite it. Here's what I got > > last-saved-file-time: 1299611826 > file-modified-time: 1299611832 > > These times are both quite close to when I tried to save. In retrospect, I > should have added the output of (current-seconds) to the log output. I > don't recall a six-second delay while trying to save. Hm. Yeah, I'm not seeing any clues in those numbers. How about also putting the filename into the log (the one that's being passed to file-or-directory-modify-seconds) and recording if it is the after-load-file or the after-save-file method that's updating the last-saved-file-time field? Robby _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev