GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Watch mode watches for changes in package.json files used in resolution by weswigham · Pull Request #44935 · microsoft/TypeScript Conversation
Member
This fixes an issue I noticed while writing tests for cts/mts (and cc Andrew Branch (@andrewbranch) since you said including package json files in the normal watched file set may affect/help package autoimports.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Wesley Wigham (weswigham)
requested review from
Andrew Branch (andrewbranch) and
Sheetal Nandi (sheetalkamat)
Uh oh!
There was an error while loading. Please reload this page.
Andrew Branch (andrewbranch)
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good. Do you know if these same watches get used for editor services? I need to make a to-do for myself to remove the extra watch I added there if so.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because these package json lookups are calculated when program is built.. If the program was already built and then you change package.json file and invoke tsbuild, the change wont be picked by ts build and it will be reported as upto date. Also note that ts build uses the infomation from tsconfig to derive if things can be upto date. So we never watch module resolution etc. So this seems one off.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep - I said as much in the OP of this PR -
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems incorrect.. Full Reload means read config file again to calculate file names.. Why do we need to do that for package.json changes.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
| watchExtendedConfigFiles(state, projectPath, config); | ||
| watchWildCardDirectories(state, project, projectPath, config); | ||
| watchInputFiles(state, project, projectPath, config); | ||
| watchPackageJsonFiles(state, project, projectPath, config); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect location for these? Because program is yet not created so this won't be correct list? And all the package.json watches will be deleted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How so? This is the only place we add tsbuild watchers, afaik. It's a known limitation that we don't have a full list on first build (or, more like, we have an empty list because we don't have a good way to calculate a list).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Because even though project config file was parsed to calculate the new filenames, options etc, the program was not created. that happens later during building of project so this cache is old cache and doing this has no effect?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.