-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Api for creating program in watch mode and using builder to get incremental emit/semantic diagnostics #20234
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
a06f0c3
Use builder state to emit instead
sheetalkamat 576fe1e
Expose the watch and builder API in the typescript.d.ts
sheetalkamat 7ebf9d9
Lint errors fix
sheetalkamat 3c5a6e1
Allow watch host to specify module name resolver
sheetalkamat c9a17f3
Add api to get the dependencies of the file
sheetalkamat 6d36a3d
Make the versions in the source file non zero when the source file is…
sheetalkamat 85ce1d0
Make the builder state as internal and expose builder instead of buil…
sheetalkamat e102fee
Use the results from affected file enumerator apis as Affected File r…
sheetalkamat ffa64e8
Set program as affected if emitting/diagnostics for whole program
sheetalkamat 012f12b
To handle cancellation token, remove changed/affected files from the …
sheetalkamat 0b79f4a
Handle emit only declaration file to always produce declaration file …
sheetalkamat 374536b
Merge branch 'master' into builderApi
sheetalkamat 3dda217
Rename getProgram to getExistingProgram
sheetalkamat 61fc9b9
Rename Watch.synchronizeProgram to getProgram and return the updated …
sheetalkamat 471c83b
Rename WatchHost.moduleNameResolver to WatchHost.resolveModuleNames t…
sheetalkamat 1a91256
Make before and after program create callbacks optional
sheetalkamat f046d82
Merge branch 'master' into builderApi
sheetalkamat 944f8b8
Instead of using system as object on WatchHost, create WatchCompilerH…
sheetalkamat 43c2610
More functions moved from system to WatchCompilerHost
sheetalkamat e694b9e
Update the WatchCompilerHost creation
sheetalkamat 8cc2936
Move watchFile and watchDirectory to WatchCompilerHost
sheetalkamat abafddd
Move internal functions in the watch to separate namespace
sheetalkamat 77e6731
Handle setTimeout, clearTimeout, clearScreen and report watch Diagnos…
sheetalkamat d22ba5e
Move the system.write to trace on WatchCompilerHost
sheetalkamat c9a407e
Add getDefaultLibLocation and getDefaultLibFileName and remove system…
sheetalkamat 14f66ef
Update the emitting file, reporting errors part of the watch api
sheetalkamat a21b074
Update the builder to take options aligning with the WatchCompilerHost
sheetalkamat eb052fe
Merge branch 'master' into builderApi
sheetalkamat 39bf33d
Few renames
sheetalkamat 4c21cbf
Create builderState so that when FilesAffectedBy is only api needed, …
sheetalkamat 2586bb3
From builder use the builderState containing references and file infos
sheetalkamat bb0fc0d
Convert builder state to mutable data, so that later we can create bu…
sheetalkamat 965f40f
Use builder state in the semantic/emit builder as well
sheetalkamat dc62bb9
Change builder to BuilderProgram so it is similar to operating on pro…
sheetalkamat 9b54d2e
Create api to create Watch<BuilderProgram>
sheetalkamat 8ad9a62
Api to get underlying program from builder
sheetalkamat a75badf
Rename on WatchBuilderProgram
sheetalkamat 2611c9b
Merge branch 'master' into builderApi
sheetalkamat cb26366
When user provided resolution is used, invalidate resolutions for all…
sheetalkamat 5bc78af
Merge branch 'master' into builderApi
sheetalkamat 5bd3f97
Merge branch 'master' into builderApi
sheetalkamat 6650029
Merge branch 'master' into builderApi
sheetalkamat ed23ca5
Merge branch 'master' into builderApi
sheetalkamat 29dee9f
Do not expose createWatchOfConfigFile and createWatchOfFilesAndCompil…
sheetalkamat f29c0e3
Expose createWatchCompilerHost as overload
sheetalkamat bd43e45
Move getCurrentDirectory to builder program
sheetalkamat 2be231d
Add createProgram on WatchCompilerHost
sheetalkamat 8a51cda
Merge branch 'master' into builderApi
sheetalkamat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
but if we try to emit this file with this emit resolver the emit will fail, e.g. marking aliases as referenced would not have happened.. right?
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.
Would not impact declaration file emit right? I mean there could be errors but the output wont change and hence ok to do so?
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.
we need to document that well.. also maybe change the parameter name to something more declarative like
declarationFileEmitOnly
. i worry that someone will just create this and pass true by mistake and will be hard to see why it is failing.