-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Support the '--watch' compiler flag. #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @@ -5,9 +5,9 @@ interface System { | |||
| newLine: string; | |||
| useCaseSensitiveFileNames: boolean; | |||
| write(s: string): void; | |||
| writeErr(s: string): void; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future I would do such a change in a separate commit at least, as it makes the change noisy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, sorry about that.
|
Love it.. thanks! 👍 |
|
Addressed your feedback. I also ran into some weird issues with editing in vim, where if you exit and quit ( function fileChanged(curr:any, prev:any) {
if (+curr.mtime <= +prev.mtime) { // this check
return;
}
callback(fileName);
}; |
|
👍 nice. Very insightful. |
We no longer recompile unless the new last-modified time is more recent.
src/compiler/sys.ts
Outdated
| }; | ||
|
|
||
| function fileChanged(curr:any, prev:any) { | ||
| if (+curr.mtime <= +prev.mtime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So even with the buffer period brought up to 500ms, my personal machine still has issues with this when saving in something like vim because it appears that the mtime and ctime are modified independently.
Edited comments, no longer releasing 'program' as it is potentially confusing and doesn't buy us a heck of a lot anyway.
Support the '--watch' compiler flag.
Fixes #268.