* Allow filterType to consider union constraints of non-union types when determining never-ness
* Move impl to callback
* Baseline change in narrowing behavior into test, fix post-LKG build
* Test for not watchiong referenced projects fileNames and invalidating it
* Add watching wild card directories and caching parsed command line for projects so that its shared
* Handle config file watching and commandline cache together
* Watch extended files for commndline cache instead of project
* Use extended config cache now that we are watching extended config files
* Structure for getParsedCommandLine from the LS
* Adding some more skeleton with todos
* getParsedCommandLine on WatchCompilerHost
* Tests for Watch, LS scenarios
* Handle getParsedCommandLine so we are looking at all things for referenced
* Cleanup and commenting
* Test for transitive references with tsc-watch
* Cache parsed command line even if host implements getParsedCommandLine
* Cleanup
* Cleanup
* Some tests to verify exclude from referenced project doesnt trigger the update
* Baseline when program is same
* Test for incremental scenario
* Tests for output from referenced project
* Comments
* Extra tests in preparation for lazy signature making sure the original intent of test is maintained
* Whenver we cant use state delay signature calculation and use source file version as signature
* Incremental correctness checks
* Retain old behavior in compile on save by disabling use of file version as signature in when state is not reused
* Watch extended configs if present
* Address code review comments
Added new `WatchType` for extended config files. Refactored watch map
update to separate function, relocated call sites. Removed unnecessary
test cases and relocated with new tests in programUpdates.
* Unify extended config file watching between tsc/tsserver
Update `updateExtendedConfigFilesWatch` to read from a
`TsConfigSourceFile` to get `extendedSourceFiles`. Add watcher map to
`ConfiguredProject` in the server. New test cases to verify correct
events triggered and extended files are being watched properly.
* Simplify watcher callback, fix tests
Removes unnecessary actions in extended config watcher callback
function. Updates tests to match.
* Share extended config watchers across projects in server
New shared watcher map in ProjectService that stores callbacks per
project to be invoked when the file watcher is triggered. The
FileWatcher is created with the watch options of the first Project to
watch the extended config.
* Refactor shared extended config map and watchers
Remove all server-related utility functions/types from
watchUtilities. Store config-project mapping and config file watchers
inside ProjectService with new private methods to add or remove
projects.
* Store projects in extended config file watcher
Creates SharedExtendedConfigFileWatcher in both editorServices
(tsserver) and tsbuildPublic. The file watcher is responsible for
triggering a full project reload for the contained projects. Upon
reload, any configs that are no longer related to a project have their
watchers updated to match. New test cases to confirm that the file
watchers for extended configs are closed when the project is closed.
* Apply suggestions from code review
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Map extended config files by path
* Move shared watcher into utilities and add more tests
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* --explainFiles currently hardcoded
* Move configFileSpecs to configFile so it can be used in program later
* Explain root file inclusion reason and explain include files in the log
* Baseline explainFiles
* Fix incorrectly reporting of file list two times in --b mode
* Fix unnecessary new lines in output represented incorretly in the baseline
* More tests
* More cleaning up
* Keep listing files in same order as list files, just add explaination
* Fix double listing of file names when the program has errors
* Make diagnostic chains for file include reason
* Add explaination for the file include to diagnostics for program
* Harness ls incorrectly adding tsconfig as the root file
* Fix incorrect use of path for calculating absolute path
* Fix the root file in fourslash
* Test project service options merge
* Add config file name to matched by include explaination
* Add test for when the file changes and program is reused completely but related file information is reattached to correct location
* Handle file preprocessing diagnostics updates when program is reused and related information location changes
* Moved types to types.ts
* Refactoring and cleanup
* More cleanup
* More refatoring
* Handle synthetic imports
* Baselines after merge
* Parse excludeDirectories and excludeFiles
* Use watch factory in typings installer
* Some refactoring for watchFactory
* Create Noop watcher if file or directory being watched is excluded
* Baselines without using exclude watch options
* Baselines including exclude option
* Handle exclude options in the system watches
* Add test without exclude option for recursive directory watching
* Test baselines with exclude option
* Always set sysLog
* Test for exclude option in server
* Add exclude options in the config file and fix the test
* Fix host configuration for server
* Handle host configuration for watch options
* Fix sysLog time log so baselines can be clean
* Handle reloadProjects to reload the project from scratch
* Ensure that file updates are reflected
* Feedback
* Feedback
* Syntax only server creates inferred project with all the open files with noResolve and can handle semantic operations
* No Watching
* Disable tests
* Add and fix tests
* Only support selected commands
* Revert "Disable tests"
This reverts commit 90d8a966eb.
* Dont log request details for unsupported commands
* Emit buildinfo when there are errors with noEmitOnError?
TODO: --build mode
* Always emit tsbuild info even if there are non syntax errors in tsc --build mode
* Sort affectedFilesPendingEmit for consistent build info text
As stated in 26417, `host` is only ever written to and never read from. `createProgramHost` is the only place I could find that provides a member for `ProgramHost`'s `onCachedDirectoryStructureHostCreate`, so that's removed as well.
* Add tests for noEmitOnError
* Do not write files directly from builder when noEmitOnError is true
Fixes#34823
* make linter happy
* Instead of generating output in memory, check errors before doing the emit in case of noEmitOnError
* Create different watch options in compiler options
* Thread through the new watch options
* Actually use the options passed through for watch strategy
* Support delay on updating child directory watches
* Make watchOptions separate from compilerOptions
* Support passing watch options from command line
* Handle displaying of watchOptions
* Move codefix types into services/types.ts
* Also split apart refactorProvider
* Move all meanings of DocumentHighlights into one file
* Use setter for object allocator
* Remove unneeded namespace reference
* Remove some shorthand references to nonlocal namespace variables
* Convert WatchType string enum to a structure that can be merged across modules
* Rename harness to harnessIO
* Move accidental globals into namespace
* Remove unused globals
* Suppress lints - these qualifiers are needed for the migration to go smoothly
* Hide global declaration
Msbuild currently uses a combination of `--listFiles` and `--noEmit` to
obtain a list of files to be consumed by tsc. However, these two flags
don't suppress type checking, the results of which msbuild will never
consume. This new switch gives msbuild a faster way to obtain the file
list.
Note: like `--noEmit`, doesn't make sense in build mode.