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

Compact the tsbuild info by encoding info differently for some of the situations #58641

Merged
merged 4 commits into from
May 24, 2024

Conversation

sheetalkamat
Copy link
Member

  • For any diagnostics per file records, dont record file name if it is same as the key - file for which the diagnostics is recorded 8df8f4b
    So now the reusable diagnostics will have key as
    • undefined if its same as file for which the diagnostics is
    • false if it was global error - though we dont have anything like this
    • filePath if the diagnostic or related information in the diagnostics is in different file
  • Change recording of semantic diagnostics to reduce size in normal scenarios:
    It will now be recorded for each file as: 666f49f
    • If emptyArray - dont record
    • If diagnsotics - record as [ fileId diagnostics]
    • If not cached for the file thats not in changeSet - record as fileId
  • Dont record empty referenceMap since we know when to create referenceMap 8fc7268

…narios:

- If emptyArray - dont record
- If diagnsotics - record as [ fileId diagnostics]
- If not cached for the file thats not in changeSet - record as fileId
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels May 24, 2024
@lazytype
Copy link

Would older versions of TypeScript gracefully handle tsbuild info files created with the new TypeScript version? In a large, shared code base it may be common for developers to switch between branches which are on different TS versions.

@sheetalkamat sheetalkamat marked this pull request as ready for review May 24, 2024 16:07
@sheetalkamat
Copy link
Member Author

The buildInfos are invalidated between version change which means they arent reused and are regenerated if building with different version

@sheetalkamat sheetalkamat changed the title Compact the tsbuild info by encoding info differently for osme of the situations Compact the tsbuild info by encoding info differently for some of the situations May 24, 2024
Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@sheetalkamat sheetalkamat merged commit 87918f5 into main May 24, 2024
28 checks passed
@sheetalkamat sheetalkamat deleted the compactSemantic branch May 24, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants