-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Comments
Can you please provide what you see when you provide option |
With typescript@next (today typescript@2.8.0-dev.20180130) Under ~/essaiTS
then when we change ~/essaiTS/file.ts
==> ~/essaiTS/file.js is not changed. Under /tmp/essaiTS
then when we change /tmp/essaiTS/file.ts
==> /tmp/essaiTS/file.js is changed accordingly. |
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 This bug is it confirmed ? I'm on Arch Linux. |
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 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" |
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 |
I don't know if it's useful, but I've done a
See 6997e9b. |
Thank you for information.. Sorry for delay mentioning, but could you run the same experiments with |
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.
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.
I hope now it's ok ! |
With typescript@2.8.0-dev.20180131
Then when we edit the file ~/essaiTS/app/file.ts
|
Same as below, but in /tmp/essaiTS folder
Then when we edit file /tmp/essaiTS/app/file.ts
|
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: 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.... I again apologize for asking you to run this again. Hopefully this time we will get all the information we need. |
The dots in « @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
In /tmp/essaiTS
|
@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. |
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly Fixes #21444
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly Fixes #21444
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly Fixes #21444
Ok thanks @sheetalkamat it resloves the problem !
|
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. |
This ensures that when file is deleted and re-created, the file version isnt same to ensure emits correctly Fixes #21444
TypeScript Version: 2.8.0-dev.20180127 or 2.6.2
OS: Linux x86_64
Node Version: 9.4.0
Search Terms:
Steps to reproduce:
mkdir ~/essaiTS && cd $_
2 . ~/essaiTS/tsconfig.json
node node_modules/typescript/bin/tsc --watch --listEmittedFiles
Expected behavior:
At ~/essaiTS/app/file.js.
we must have:
Actual behavior:
As in step 4., we have instead only:
With TypeScript 6.2 we could see in terminal :
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:
--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.--watch
for files in ~/essaiTS/app/folder/.Related Issues:
Maybe: #20739
The text was updated successfully, but these errors were encountered: