Repository navigation
Disable ATA when no user cache is available - #64836
Merged
Jake Bailey (jakebailey) merged 4 commits intoOct 15, 2026
Merged
Conversation
Automatic type acquisition should stay disabled when a user-specific cache directory cannot be determined, rather than installing typings into a temporary directory.
Jake Bailey (jakebailey)
requested review from
Ryan Cavanaugh (RyanCavanaugh) and
Andrew Branch (andrewbranch)
and
a balanced review from Copilot
October 15, 2026 20:17
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A relative HOME can cause cache-path conversion to panic and prevent language-server startup.
1 open finding
What changed in this PR
Disables automatic type acquisition when no user cache is available, avoiding fallback to a shared temporary directory.
Changes:
- Returns a typed cache path or an empty sentinel.
- Passes the result directly to language-server configuration.
- Adds cache-location and acquisition-disabled tests.
| File | Description |
|---|---|
tsc/internal/vfs/osvfs/os.go |
Removes temporary-directory fallback. |
tsc/internal/vfs/osvfs/os_test.go |
Tests available, missing, and relative cache locations. |
tsc/internal/project/ata/ata_test.go |
Tests acquisition without a cache. |
tsc/internal/lsp/replay_test.go |
Preserves the typed cache result in replay setup. |
tsc/cmd/tsc/lsp.go |
Preserves the typed cache result during startup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
UserCacheDir can return a relative path without an error when the home or local app data directory is relative. Such a cache is unavailable for global typings and must not prevent the language server from starting.
Ryan Cavanaugh (RyanCavanaugh)
approved these changes
Oct 15, 2026
Daniel Rosenwasser (DanielRosenwasser)
approved these changes
Oct 15, 2026
Jake Bailey (jakebailey)
enabled auto-merge
October 15, 2026 20:57
# Conflicts: # tsc/internal/vfs/osvfs/os_test.go
Ryan Cavanaugh (RyanCavanaugh)
approved these changes
Oct 15, 2026
Daniel Rosenwasser (DanielRosenwasser)
approved these changes
Oct 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Instead of using tmp, which is world-writable on Linux etc.