Skip to content
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

[wip] Shared resolutions in tsserver #55968

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Commits on Oct 1, 2024

  1. Configuration menu
    Copy the full SHA
    139873c View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Configuration menu
    Copy the full SHA
    774fd2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f53ed20 View commit details
    Browse the repository at this point in the history
  3. 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
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    7f0d8b5 View commit details
    Browse the repository at this point in the history
  4. When type acquisition is disabled, remove the typing files set as root

    Also cache the inferred type acquition for inferred project
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    3fd456f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    77ab17f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e3bee90 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e1de706 View commit details
    Browse the repository at this point in the history
  8. If typing installer is disabled invalidate all the resolutions from t…

    …ypings cache
    
    This change finally makes all tests pass incremental tests for matching resolutions and program structuture
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    01bf971 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6c9662b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4087c69 View commit details
    Browse the repository at this point in the history
  11. If the there is no change detected in module resolution we shouldnt n…

    …eed to update last cached unresolved imports just because we have new program
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    6d8c00c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    cd599c4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    969b2b3 View commit details
    Browse the repository at this point in the history
  14. Tests

    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    3c0372e View commit details
    Browse the repository at this point in the history
  15. Add incremental test where cache should have same resolutions as what…

    …s 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
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    149c700 View commit details
    Browse the repository at this point in the history
  16. Make sure reused resolutions from file are accounted if all resolutio…

    …ns are reused/are resolved to ambient module names
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    180f11f View commit details
    Browse the repository at this point in the history
  17. In preparation of sharing resolutions, watch the resolutions right aw…

    …ay instead of defering external module reoslutions to watch all failed lookup locations
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    fb80bfc View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9edcd79 View commit details
    Browse the repository at this point in the history
  19. 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
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    1d40538 View commit details
    Browse the repository at this point in the history
  20. The redirected reference use that projects tsconfig directory as the …

    …root directory for watching resolutions
    sheetalkamat committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    61c7aec View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d4fc069 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    af4f032 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0de256f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e4da7f View commit details
    Browse the repository at this point in the history
  4. Handle effective type roots and type ref resolution sharing cache

    // TODO: update incremental tests to actually verify the cache
    sheetalkamat committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    11866b4 View commit details
    Browse the repository at this point in the history