Skip to content
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

Problem with --watch option with a tsconfig.json « "include": ["app/**/*.ts"] » #21444

Closed
JulioJu opened this issue Jan 28, 2018 · 16 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@JulioJu
Copy link

JulioJu commented Jan 28, 2018

TypeScript Version: 2.8.0-dev.20180127 or 2.6.2

OS: Linux x86_64

Node Version: 9.4.0

Search Terms:

  • "is:issue is:open watch"

Steps to reproduce:

  1. mkdir ~/essaiTS && cd $_

2 . ~/essaiTS/tsconfig.json

{
    "include": [
        "app/**/*.ts"
    ]
}
  1. ~/essaiTS/app/file.ts
console.log('aaa');
  1. node node_modules/typescript/bin/tsc --watch --listEmittedFiles
    • We could see a new file ~/essaiTS/app/file.js with:
console.log('aaa');
  1. ~/essaiTS/app/file.ts
console.log('aaa');
console.log('bbb');

Expected behavior:
At ~/essaiTS/app/file.js.
we must have:

console.log('aaa');
console.log('bbb');

Actual behavior:
As in step 4., we have instead only:

console.log('aaa');

With TypeScript 6.2 we could see in terminal :

3:14:46 PM - File change detected. Starting incremental compilation...
3:14:47 PM - Compilation complete. Watching for file changes.

With TypeScript 2.8.0-dev.20180127 there is no messages. (error on my part, with TypeScript 2.8.* console is just cleared: see my following comment.)
Notes:

  • No problems with compilation option --watch if essaiTS is in folder /tmp.
    To test you could use command line: cp -R ~/essaiTS /tmp && cd /tmp/essaiTS && node node_modules/typescript/bin/tsc --watch --listEmittedFiles, then edit file /tmp/essaiTS/app/file.ts.
  • There is no problems with option --watch for files in ~/essaiTS/app/folder/.

Related Issues:
Maybe: #20739

@mhegazy mhegazy added the Bug A bug in TypeScript label Jan 30, 2018
@mhegazy mhegazy added this to the TypeScript 2.8 milestone Jan 30, 2018
@sheetalkamat
Copy link
Member

Can you please provide what you see when you provide option --listFiles with --watch and without -watch. can you please let us know where the tsc is invoked from in your repro steps.. In short i am looking for current working directory being used.

@JulioJu
Copy link
Author

JulioJu commented Jan 30, 2018

With typescript@next (today typescript@2.8.0-dev.20180130)

Under ~/essaiTS

  1. cd ~/essaiTS
  2. $ node node_modules/typescript/bin/tsc --listFiles
/home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
/home/julioju/essaiTS/app/file.ts
  1. $ node node_modules/typescript/bin/tsc --listFiles --watch
11:52:26 PM - Starting compilation in watch mode...


/home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
/home/julioju/essaiTS/app/file.ts
11:52:28 PM - Compilation complete. Watching for file changes.

then when we change ~/essaiTS/file.ts

11:53:36 PM - File change detected. Starting incremental compilation...


/home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
/home/julioju/essaiTS/app/file.ts
11:53:36 PM - Compilation complete. Watching for file changes.

==> ~/essaiTS/file.js is not changed.

Under /tmp/essaiTS

  1. cp -R ../essaiTS /tmp && cd /tmp/essaiTS
  2. $ node node_modules/typescript/bin/tsc --listFiles
/tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
/tmp/essaiTS/app/file.ts
  1. $ node node_modules/typescript/bin/tsc --listFiles --watch

11:54:29 PM - Starting compilation in watch mode...


/tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
/tmp/essaiTS/app/file.ts
11:54:31 PM - Compilation complete. Watching for file changes.

then when we change /tmp/essaiTS/file.ts

11:56:27 PM - File change detected. Starting incremental compilation...


/tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
/tmp/essaiTS/app/file.ts
11:56:27 PM - Compilation complete. Watching for file changes.

==> /tmp/essaiTS/file.js is changed accordingly.

@JulioJu
Copy link
Author

JulioJu commented Jan 30, 2018

Same problem if we are in /taa/essaiTS (no emit app/file.js file on incremental compilation).

It's very strange. There is no problems in folder /tmp/essaiTS, or folder /tmp/tmp/tmp/essaiTS. (file app/file.js is emitted on incremental compilation)

The filesystem of my /tmp is tmpfs (Ram memory). But when we compile under other folder who is the mount point of a filesystem tmpfs like /dev/shm or /run/user/1000 I have the same problem (no emit app/file.js file on incremental compilation).

In /tmp/essaiTS, if I use /usr/bin/tsc --watch (located outside /tmp/essaiTS) , there is no problem too. (file app/file.js is emitted on incremental compilation)

This bug is it confirmed ?

I'm on Arch Linux. If you want I can try tomorrow on a Live Ubuntu 17.10. (see comment below, I believe I've found why there is in no problems of incremental compilation under folder /tmp.)

@JulioJu
Copy link
Author

JulioJu commented Jan 31, 2018

On Arch Linux I've disabled the automatic mount of a filesystem tmpfs in /tmp (https://wiki.archlinux.org/index.php/Tmpfs#Disable_automatic_mount). You could test than /tmp is not a mount point of a tmpfs filesystem thanks to the command df -h.

When /tmp is not a mount point of a tmpfs filesystem, there is the same problem as with other folders (no emit app/file.js file on incremental compilation).

So on my computer, under Arch Linux, before there was no problem with incremental compilation because /tmp was a mount point of a tmps filesystem.

Characteristics of my laptop is: "CPU: Dual core Intel Core i5 M 520 (-MT-MCP-) speed/max: 1222/2395 MHz"

@JulioJu
Copy link
Author

JulioJu commented Jan 31, 2018

The problem was introduced between TypeScript 2.6.0-dev.20170929 and 2.6.0-dev.20170930. I've tested with TypeScript 2.6.0-dev.20170929: no problems, ~/essaiTS/app/file.js is emitted on --watch mode. Opposite, TypeScript 2.6.0-dev.20170930 does not emits ~/essaiTS/app/file.js on --watch mode.

@JulioJu
Copy link
Author

JulioJu commented Jan 31, 2018

I don't know if it's useful, but I've done a git bisect.

$ git log --pretty=short:

commit 6997e9b7316b081f8731d131139c7d7f1bba9092 (HEAD, refs/bisect/bad)
Merge: 7f7d0c6c7b 8ac01d76f5
Author: Sheetal Nandi <shkamat@microsoft.com>

    Merge pull request #17269 from Microsoft/watchImprovements

commit 7f7d0c6c7b9b27c46d2d24c9bcf698bc81dc06d5 (refs/bisect/good-7f7d0c6c7b9b27c46d2d24c9bcf698bc81dc06d5)
Author: Wesley Wigham <wwigham@gmail.com>

    Baseline public API (#18897)

See 6997e9b.

@sheetalkamat
Copy link
Member

Thank you for information.. Sorry for delay mentioning, but could you run the same experiments with --extendedDiagnostics This would help us identify which kind of watch notifications we are receiving to get better understanding of the issue. The change you have mentioned was a big change to revamp how tsc --watch works so narrowing the issue further would help immensely. We use node's fs.watch and fs.watchFile to determine the updates and those apis are very OS dependent and hence need your help in investigating...

@JulioJu
Copy link
Author

JulioJu commented Feb 1, 2018

Yes, I've seen it's a big merge.

I've explored more thanks git bisect but it's hard because there are lot of changes, lot of break, and there is a lot of changes.

89c61e797c794515a06a3719ca95e37d97783d6e is the first bad commit
commit 89c61e797c794515a06a3719ca95e37d97783d6e
Author: Sheetal Nandi <shkamat@microsoft.com>
Date:   Thu Aug 3 00:27:46 2017 -0700

    Modify the api in builder so that it tracks changed files

At 89c61e7, you could see an error message when you use incremental compilation (see message below). It was introduced by c814d8e and was resolved by 59d07dc. This error message cause no compilation problems. Some ancestors of 89c61e7 have this message, but I've not seen incremental compilations problems when we edit and save small codes in ~/essaiTS/app/file.ts.

$ node ~/essaiTS/lib/tsc.js --watch, then edit and save the file ~/essaiTS/app/file.ts.


9:31:02 PM - Compilation complete. Watching for file changes.


error TS18003: No inputs were found in config file '/home/.........../essaiTS/tsconfig.json'. S
pecified 'include' paths were '["app/**/*.ts"]' and 'exclude' paths were '[]'.
error TS18003: No inputs were found in config file '/home/............./essaiTS/tsconfig.json'. S
pecified 'include' paths were '["app/**/*.ts"]' and 'exclude' paths were '[]'.
9:31:09 PM - File change detected. Starting incremental compilation...


9:31:09 PM - Compilation complete. Watching for file changes.


error TS18003: No inputs were found in config file '/home/.............../essaiTS/tsconfig.json'. S
pecified 'include' paths were '["app/**/*.ts"]' and 'exclude' paths were '[]'.
error TS18003: No inputs were found in config file '/home/.................../essaiTS/tsconfig.json'. S
pecified 'include' paths were '["app/**/*.ts"]' and 'exclude' paths were '[]'.
9:31:24 PM - File change detected. Starting incremental compilation...


9:31:24 PM - Compilation complete. Watching for file changes.
  • (Note: from e068475 to 69e5abd(parent of c814d8e) the command $ node ~/essaiTS/lib/tsc.js --watch crashes when it's launched.).

I hope now it's ok !

@JulioJu
Copy link
Author

JulioJu commented Feb 1, 2018

With typescript@2.8.0-dev.20180131
$ node node_modules/typescript/bin/tsc --watch --extendedDiagnostics

3:37:43 AM - File change detected. Starting incremental compilation...
3:39:44 AM - Starting compilation in watch mode...


Synchronizing program
FileWatcher:: Added: PathInfo: /home/............./essaiTS/app/file.ts
FileWatcher:: Added: PathInfo: /home/............./essaiTS/node_modules/typescript/lib/lib.d.ts
DirectoryWatcher recursive:: Added: PathInfo: /home/.........../essaiTS/node_modules/@types
Files:                   2
Lines:               19880
Nodes:               91612
Identifiers:         31615
Symbols:             24072
Types:                6571
Memory used:        55364K
I/O Read time:       0.00s
Parse time:          0.46s
Program time:        0.47s
Bind time:           0.23s
Check time:          1.25s
transformTime time:  0.02s
commentTime time:    0.00s
I/O Write time:      0.00s
printTime time:      0.01s
Emit time:           0.04s
Total time:          2.00s
3:39:47 AM - Compilation complete. Watching for file changes.


DirectoryWatcher recursive:: Added: PathInfo: /home/............./essaiTS/app

Then when we edit the file ~/essaiTS/app/file.ts

3:40:29 AM - File change detected. Starting incremental compilation...


Synchronizing program
FileWatcher:: Added: PathInfo: /home/............/essaiTS/app/file.ts
Files:              2
Lines:          19881
Nodes:          91619
Identifiers:    31617
Symbols:        21765
Types:             58
Memory used:   47850K
I/O Read time:  0.00s
Parse time:     0.00s
Program time:   0.00s
Bind time:      0.00s
Total time:     0.00s
3:40:29 AM - Compilation complete. Watching for file changes.

@JulioJu
Copy link
Author

JulioJu commented Feb 1, 2018

Same as below, but in /tmp/essaiTS folder

3:36:28 AM - Starting compilation in watch mode...


Synchronizing program
FileWatcher:: Added: PathInfo: /tmp/essaiTS/app/file.ts
FileWatcher:: Added: PathInfo: /tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
DirectoryWatcher recursive:: Added: PathInfo: /tmp/essaiTS/node_modules/@types
Files:                   2
Lines:               19880
Nodes:               91612
Identifiers:         31615
Symbols:             24072
Types:                6571
Memory used:        55758K
I/O Read time:       0.00s
Parse time:          0.47s
Program time:        0.48s
Bind time:           0.23s
Check time:          1.38s
transformTime time:  0.02s
commentTime time:    0.00s
I/O Write time:      0.00s
printTime time:      0.01s
Emit time:           0.04s
Total time:          2.13s
3:36:30 AM - Compilation complete. Watching for file changes.


DirectoryWatcher recursive:: Added: PathInfo: /tmp/essaiTS/app

Then when we edit file /tmp/essaiTS/app/file.ts

3:37:43 AM - File change detected. Starting incremental compilation...


Synchronizing program
Files:                   2
Lines:               19879
Nodes:               91605
Identifiers:         31613
Symbols:             21765
Types:                  61
Memory used:        47876K
I/O Read time:       0.00s
Parse time:          0.00s
Program time:        0.00s
Bind time:           0.00s
transformTime time:  0.00s
printTime time:      0.00s
Emit time:           0.00s
Check time:          0.00s
commentTime time:    0.00s
I/O Write time:      0.00s
Total time:          0.01s
3:37:43 AM - Compilation complete. Watching for file changes.

@JulioJu JulioJu changed the title Problem with --watch when we compile in folder "~/" Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem Feb 1, 2018
@JulioJu JulioJu changed the title Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem with package.json « "include": ["app/**/*.ts"] » Feb 1, 2018
@JulioJu JulioJu changed the title Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem with package.json « "include": ["app/**/*.ts"] » Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem with tsconfig.json « "include": ["app/**/*.ts"] » Feb 1, 2018
@sheetalkamat
Copy link
Member

I am sorry for asking for more information but with console clearing that happens with --watch the actual useful information got lost. I have merged #21537 that will not clear the screen on updates so we wont loose the diagnostic information. Can you please run this with and when tonights typescript nightly drop is generated.

I would appreciate if you can run this with these all options: --watch --listFiles --listEmittedFiles --extendedDiagnostics

Out of the above log i can tell that the paths for the watch seem incorrect with something like too many dots with home directory.... /home/............/essaiTS/app/file.ts but the log would help understand if any directory watch or file watch gets invoked at all..

I again apologize for asking you to run this again. Hopefully this time we will get all the information we need.

JulioJu pushed a commit to JulioJu/medicalCentre that referenced this issue Feb 3, 2018
@JulioJu
Copy link
Author

JulioJu commented Feb 3, 2018

The dots in « /home/............/essaiTS/app/file.ts » replace only the name of my home folder. Dots replace only a folder name who has only ASCII characters and who is 11 characters long. Now, I replace the name of my home folder by « julioju »

@sheetalkamat no problems ;-) ! It's cool if I can help :-) ! Have you noticed than I've found accuracy the problematic commit ? It's 89c61e7. You could see it's a very small commit :-) ! You could see explanations on my comment above.

With TypeScript 2.8.0-dev.20180203

In ~/essaiTS

$ node node_modules/typescript/bin/tsc --watch --listFiles --listEmittedFiles --extendedDiagnostics
Current directory: /home/julioju/essaiTS CaseSensitiveFileNames: trueundefinedFileWatcher:: Added: PathInfo: /home/julioju/essaiTS/tsconfig.jsonundefined5:43:53 PM - Starting compilation in w
atch mode...


Synchronizing program
CreatingProgramWith::
  roots: ["/home/julioju/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/home/julioju/essaiTS/tsconfig.json"}
FileWatcher:: Added: PathInfo: /home/julioju/essaiTS/app/file.ts
FileWatcher:: Added: PathInfo: /home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
DirectoryWatcher recursive:: Added: PathInfo: /home/julioju/essaiTS/node_modules/@types
TSFILE: /home/julioju/essaiTS/app/file.js
/home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
/home/julioju/essaiTS/app/file.ts
Files:                   2
Lines:               19886
Nodes:               91626
Identifiers:         31622
Symbols:             24085
Types:                6579
Memory used:        55095K
I/O Read time:       0.00s
Parse time:          0.46s
Program time:        0.47s
Bind time:           0.23s
Check time:          1.19s
transformTime time:  0.02s
commentTime time:    0.00s
I/O Write time:      0.00s
printTime time:      0.01s
Emit time:           0.04s
Total time:          1.94s
5:43:55 PM - Compilation complete. Watching for file changes.


DirectoryWatcher recursive:: Added: PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 1ms Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 1ms Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
FileWatcher:: Close: PathInfo: /home/julioju/essaiTS/app/file.ts
DirectoryWatcher recursive:: Elapsed: 1ms Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 0ms Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
5:44:06 PM - File change detected. Starting incremental compilation...


Synchronizing program
CreatingProgramWith::
  roots: ["/home/julioju/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/home/julioju/essaiTS/tsconfig.json"}
FileWatcher:: Added: PathInfo: /home/julioju/essaiTS/app/file.ts
/home/julioju/essaiTS/node_modules/typescript/lib/lib.d.ts
/home/julioju/essaiTS/app/file.ts
Files:              2
Lines:          19887
Nodes:          91633
Identifiers:    31624
Symbols:        21775
Types:             58
Memory used:   56389K
I/O Read time:  0.00s
Parse time:     0.00s
Program time:   0.00s
Bind time:      0.00s
Total time:     0.00s
5:44:06 PM - Compilation complete. Watching for file changes.

In /tmp/essaiTS

$ node node_modules/typescript/bin/tsc --watch --listFiles --listEmittedFiles --extendedDiagnostics
Current directory: /tmp/essaiTS CaseSensitiveFileNames: trueundefinedFileWatcher:: Added: PathInfo: /tmp/essaiTS/tsconfig.jsonundefined5:45:47 PM - Starting compilation in watch mode...


Synchronizing program
CreatingProgramWith::
  roots: ["/tmp/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/tmp/essaiTS/tsconfig.json"}
FileWatcher:: Added: PathInfo: /tmp/essaiTS/app/file.ts
FileWatcher:: Added: PathInfo: /tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
DirectoryWatcher recursive:: Added: PathInfo: /tmp/essaiTS/node_modules/@types
TSFILE: /tmp/essaiTS/app/file.js
/tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
/tmp/essaiTS/app/file.ts
Files:                   2
Lines:               19887
Nodes:               91633
Identifiers:         31624
Symbols:             24085
Types:                6579
Memory used:        55432K
I/O Read time:       0.00s
Parse time:          0.46s
Program time:        0.47s
Bind time:           0.27s
Check time:          1.20s
transformTime time:  0.02s
commentTime time:    0.00s
I/O Write time:      0.00s
printTime time:      0.01s
Emit time:           0.05s
Total time:          1.99s
5:45:49 PM - Compilation complete. Watching for file changes.


DirectoryWatcher recursive:: Added: PathInfo: /tmp/essaiTS/app
FileWatcher:: Trigger: /tmp/essaiTS/app/file.ts 1 PathInfo: /tmp/essaiTS/app/file.ts
FileWatcher:: Elapsed: 1ms Trigger: /tmp/essaiTS/app/file.ts 1 PathInfo: /tmp/essaiTS/app/file.ts
5:48:12 PM - File change detected. Starting incremental compilation...


Synchronizing program
CreatingProgramWith::
  roots: ["/tmp/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/tmp/essaiTS/tsconfig.json"}
TSFILE: /tmp/essaiTS/app/file.js
/tmp/essaiTS/node_modules/typescript/lib/lib.d.ts
/tmp/essaiTS/app/file.ts
Files:                   2
Lines:               19886
Nodes:               91626
Identifiers:         31622
Symbols:             21775
Types:                  61
Memory used:        47983K
I/O Read time:       0.00s
Parse time:          0.00s
Program time:        0.00s
Bind time:           0.00s
Check time:          0.00s
transformTime time:  0.00s
printTime time:      0.00s
Emit time:           0.01s
commentTime time:    0.00s
I/O Write time:      0.00s
Total time:          0.01s
5:48:12 PM - Compilation complete. Watching for file changes.

@JulioJu JulioJu changed the title Linux: Problem with --watch when we compile in folder outside /tmp mounted by systemd as tmpfs filesystem with tsconfig.json « "include": ["app/**/*.ts"] » Linux and mac problem with --watch option Feb 5, 2018
@JulioJu JulioJu changed the title Linux and mac problem with --watch option Linux and mac problem with --watch option with a tsconfig.json « "include": ["app/**/*.ts"] » Feb 5, 2018
@sheetalkamat
Copy link
Member

@JulioJu thank you for the log, I was able to repro this in our test framework using the repro log.. I am looking into fixing this. Thanks again for all the efforts to get the repro.

sheetalkamat added a commit that referenced this issue Feb 6, 2018
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly
Fixes #21444
@sheetalkamat
Copy link
Member

@JulioJu I have a fix for this in #21693. Would it be possible to actually try this out to see if this fixes your issue.

sheetalkamat added a commit that referenced this issue Feb 6, 2018
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly
Fixes #21444
sheetalkamat added a commit that referenced this issue Feb 6, 2018
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly
Fixes #21444
@JulioJu
Copy link
Author

JulioJu commented Feb 7, 2018

Ok thanks @sheetalkamat it resloves the problem !

$ cd ~/TypeScript
$ git checkout master
$ git pull
$ git merge fileChangeThroughDeleteAndCreate
$ yarn install && gulp clean && gulp local
$ cd ~/essaiTS
$ cp -R ~/TypeScript/built/local/ .
$ node ~/essaiTS/local/tsc.js --watch --listFiles --listEmittedFiles --extendedDiagnostics
Current directory: /home/julioju/essaiTS CaseSensitiveFileNames: trueundefinedFileWatcher:: Added: PathInfo: /home/julioju/essaiTS/tsconfig.jsonundefined10:47:54 AM - Starting compilation in
watch mode...


Synchronizing program
CreatingProgramWith::
  roots: ["/home/julioju/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/home/julioju/essaiTS/tsconfig.json"}
FileWatcher:: Added: PathInfo: /home/julioju/essaiTS/app/file.ts
FileWatcher:: Added: PathInfo: /home/julioju/essaiTS/local/lib.d.ts
DirectoryWatcher recursive:: Added: PathInfo: /home/julioju/essaiTS/node_modules/@types
TSFILE: /home/julioju/essaiTS/app/file.js
/home/julioju/essaiTS/local/lib.d.ts
/home/julioju/essaiTS/app/file.ts
Files:                   2
Lines:               19885
Nodes:               91619
Identifiers:         31620
Symbols:             24085
Types:                6582
Memory used:        60008K
I/O Read time:       0.00s
Parse time:          0.49s
Program time:        0.50s
Bind time:           0.21s
Check time:          1.18s
transformTime time:  0.02s
commentTime time:    0.00s
I/O Write time:      0.00s
printTime time:      0.01s
Emit time:           0.04s
Total time:          1.93s
10:47:56 AM - Compilation complete. Watching for file changes.


DirectoryWatcher recursive:: Added: PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 1ms Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 1ms Trigger: /home/julioju/essaiTS/app/4913 PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 0ms Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
DirectoryWatcher recursive:: Elapsed: 0ms Trigger: /home/julioju/essaiTS/app/file.ts PathInfo: /home/julioju/essaiTS/app
FileWatcher:: Trigger: /home/julioju/essaiTS/app/file.ts 1 PathInfo: /home/julioju/essaiTS/app/file.ts
FileWatcher:: Elapsed: 0ms Trigger: /home/julioju/essaiTS/app/file.ts 1 PathInfo: /home/julioju/essaiTS/app/file.ts
10:48:02 AM - File change detected. Starting incremental compilation...


Synchronizing program
CreatingProgramWith::
  roots: ["/home/julioju/essaiTS/app/file.ts"]
  options: {"watch":true,"listFiles":true,"listEmittedFiles":true,"extendedDiagnostics":true,"configFilePath":"/home/julioju/essaiTS/tsconfig.json"}
TSFILE: /home/julioju/essaiTS/app/file.js
/home/julioju/essaiTS/local/lib.d.ts
/home/julioju/essaiTS/app/file.ts
Files:                   2
Lines:               19886
Nodes:               91626
Identifiers:         31622
Symbols:             21775
Types:                  63
Memory used:        61539K
I/O Read time:       0.00s
Parse time:          0.00s
Program time:        0.00s
Bind time:           0.00s
Check time:          0.00s
transformTime time:  0.00s
printTime time:      0.01s
Emit time:           0.01s
commentTime time:    0.00s
I/O Write time:      0.00s
Total time:          0.01s
10:48:02 AM - Compilation complete. Watching for file changes.

@JulioJu JulioJu closed this as completed Feb 7, 2018
@JulioJu JulioJu changed the title Linux and mac problem with --watch option with a tsconfig.json « "include": ["app/**/*.ts"] » Problem with --watch option with a tsconfig.json « "include": ["app/**/*.ts"] » Feb 7, 2018
@JulioJu
Copy link
Author

JulioJu commented Feb 7, 2018

I've changed the title, because maybe (probably) it could occur also on MS Windows, not only in Linux and Mac. Actually not tested on MS Windows.

sheetalkamat added a commit that referenced this issue Feb 7, 2018
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly
Fixes #21444
@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Feb 7, 2018
JulioJu pushed a commit to JulioJu/medicalCentre that referenced this issue Feb 19, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants