36289 Commits

Author SHA1 Message Date
Sheetal Nandi
1fff2c5991 Just like resolutions store package json scope as a object so we can reuse that data 2024-09-20 14:56:52 -07:00
Sheetal Nandi
0ec97ef6e5 Handle package json lifetime
- All the package json watched are ref counted if watched
- Not watched package json locations are released
   - First of this kind are when resolution from global cache fails, we dont watch those locations so not safe to have them cached
   - If we are looking for a file and the file is not found, the package json locations looked up are not watched
2024-09-20 14:26:10 -07:00
Sheetal Nandi
28f1eab745 Resolutions in cache stays for lifetime.. 2024-09-20 12:25:16 -07:00
Sheetal Nandi
93f61bfa9d In preparation of sharing resolutions, watch the resolutions right away instead of defering external module reoslutions to watch all failed lookup locations 2024-09-20 12:02:59 -07:00
Sheetal Nandi
4935835e3a Make sure reused resolutions from file are accounted if all resolutions are reused/are resolved to ambient module names 2024-09-20 12:02:03 -07:00
Sheetal Nandi
81b8b7d43a Fix incorrect mode calculation in typereference resolution 2024-09-20 12:01:53 -07:00
Sheetal Nandi
38b0c2ee41 Add incremental test where cache should have same resolutions as whats in the program
This shows cache is holding onto resolutions that are no longer needed by program because either those modules arent present in file or is determined to be ambient resolution
2024-09-20 12:01:38 -07:00
Sheetal Nandi
cf54ae6f91 Tests 2024-09-20 11:58:36 -07:00
Sheetal Nandi
7cc516e40b unresolved imports of empty array and undefined are same 2024-09-20 11:45:40 -07:00
Sheetal Nandi
e1486e8cce Now that work with unresolved imports cleanup is done, remove the temp logging added 2024-09-20 11:45:40 -07:00
Sheetal Nandi
3bd850b0ad Remove unnecessary timeout running added during wip to ensure catching all updates 2024-09-20 11:45:39 -07:00
Sheetal Nandi
adf9d69461 If the there is no change detected in module resolution we shouldnt need to update last cached unresolved imports just because we have new program 2024-09-20 11:45:38 -07:00
Sheetal Nandi
bce2833980 Update cached import list update as part of resolving modules instead of another pass 2024-09-20 11:45:38 -07:00
Sheetal Nandi
3234d102ed Instead of iterating over resolutions to invalidate per global cache pass, invalidate them at usage site 2024-09-20 11:45:37 -07:00
Sheetal Nandi
4f34cae519 Use globalCacheResolution to invalidate resolutions on typings update 2024-09-20 11:45:37 -07:00
Sheetal Nandi
f01df5f73f If typing installer is disabled invalidate all the resolutions from typings cache
This change finally makes all tests pass incremental tests for matching resolutions and program structuture
2024-09-20 11:45:37 -07:00
Sheetal Nandi
628eb554f5 Do not update typings for project if type aquisition is disabled 2024-09-20 11:45:37 -07:00
Sheetal Nandi
b1ae179397 Update the unresolved import list only if it will be used 2024-09-20 11:45:36 -07:00
Sheetal Nandi
6a80c2337a Close watchers for TI that are no longer needed 2024-09-20 11:45:32 -07:00
Sheetal Nandi
7aed0d7c79 When type acquisition is disabled, remove the typing files set as root
Also cache the inferred type acquition for inferred project
2024-09-20 11:45:32 -07:00
Sheetal Nandi
3f8e00c37f Handle unnecessary typings request force just because root files change
First unresolved import gets the typing file into cache and sets it as root,
This results in scheduling new typing request with that unresolved import missing
The result will come back with typing file that is omitted, so root file will change but file will still be part of program so its not really removed from program
2024-09-20 11:45:31 -07:00
Sheetal Nandi
f54396972b Verify getUnresolvedImports incrementally 2024-09-20 11:45:31 -07:00
Sheetal Nandi
32048c9551 Add test when type acquisition changes 2024-09-20 11:45:31 -07:00
Sheetal Nandi
c4d154af2c Write log about unresolved imports calculation 2024-09-20 11:45:30 -07:00
Mateusz Burzyński
88809467e8
Fixed a crash when trying to find references on NoSubstitutionTemplateLiteral with LiteralType parent (#59889) 2024-09-19 15:59:36 -07:00
Mateusz Burzyński
9f150e00df
Replace Debug.checkDefined to avoid redundant debugger stops (#60009) 2024-09-19 14:08:12 -07:00
Sheetal Nandi
49ad1a3917
Remove tsbuildInfo specification error now that we need it for non incremental scenarios as well and there is no way to disable it (#59960) 2024-09-18 10:41:58 -07:00
Sheetal Nandi
02b07a1788
Dont open composite projects to determine if script info is part of project (#59688) 2024-09-18 10:35:22 -07:00
Ben Lickly
8230bc66a7
Drop unnecessary type arguments in the isolated declarations quick fix (#59665)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2024-09-16 10:35:50 -07:00
Isabel Duan
52eaa7b02f
Enable --isolatedDeclarations on TS codebase (#59635)
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
2024-09-15 18:10:52 -07:00
Isabel Duan
89e004f632
add support for autoimports/moveToFile to generate aliased named imports (#59885) 2024-09-10 15:38:37 -07:00
Wesley Wigham
0d7763e4c8
Sanitize version string for syntactically invalid buildinfo baselines (#59932) 2024-09-10 13:58:33 -07:00
Jake Bailey
48f0b3cc38
Update deps, TS 5.6, remove node-fetch (#59907) 2024-09-09 13:17:05 -07:00
Mateusz Burzyński
53039d3f05
Include all type parameters in completions within type parameters' constraints (#56543) 2024-09-09 10:35:58 -07:00
Sheetal Nandi
31afb988d1
Updates to --build parsing on command line (#59874) 2024-09-06 12:52:55 -07:00
Sheetal Nandi
ea699093ce
We may not always get file notifications for file creation, so always check for failed lookups starting with the path as well as exact path (#59882) 2024-09-06 12:20:13 -07:00
Sheetal Nandi
2fb1363b82
Make "/home/src/workspaces/project" as default current directory without having to specify it for tsc tests (#59875) 2024-09-05 16:15:20 -07:00
Ron Buckton
f39fe7dbe6
Support importHelpers with module:preserve (#59852) 2024-09-05 17:48:39 -04:00
Sheetal Nandi
d514dab3f6
Fix the incorrect copy over for watchOptions and fix order of watches for referenced projects (#59871) 2024-09-05 13:30:08 -07:00
Sheetal Nandi
87d0e771a8
Fix issues with global typings cache and what gets watches (#59869) 2024-09-05 13:06:30 -07:00
Sheetal Nandi
7976d9cef5
Refactor tsserver, tsc and fourslash-server tests so that paths are always watchable (#59844) 2024-09-04 14:22:10 -07:00
Mateusz Burzyński
29d92edd1c
Revert "Allow variance annotations on generic references (#56418)" (#59793) 2024-09-03 16:08:13 -07:00
Mateusz Burzyński
fe2cb8ebaa
Add missing index parameter to the Array.fromAsync's mapFn (#59837) 2024-09-03 10:18:18 -07:00
Jake Bailey
a709f9899c
Update deps, dprint plugins (#59810) 2024-08-30 15:48:32 -07:00
Armando Aguirre
6260f7ab78
Added typeToTypeNode with truncation (#59332)
Co-authored-by: Armando Aguirre Sepulveda <araguir@microsoft.com>
2024-08-30 14:16:18 -07:00
Mateusz Burzyński
0e292c441a
Fixed formatting to fix the CI on main (#59801) 2024-08-29 14:10:34 -07:00
Yevhenii Hyzyla
eadb9e18f9
Don't generalize when assigment target is never (fix: #41707) (#59774) 2024-08-29 12:20:28 -07:00
CSIGS@microsoft.com
342d142548
LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20240829095357792 to main (#59795) 2024-08-29 11:19:07 -07:00
Daniel Rosenwasser
e6f3bafddf
Optimize path mapping lookups (#59048) 2024-08-29 09:17:24 -07:00
CSIGS@microsoft.com
497316f7e8
LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20240828095615951 to main (#59783) 2024-08-28 11:06:11 -07:00