Repository navigation
fix(compiler): list wildcard type roots with the compiler host to stop a panic with project references - #1048
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
b6de5dd to
c9f12af
Compare
Merging this PR will improve performance by 3%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Performance change vs mainWorkflow run · main Clef gate: Clef estimated 19.6% default and single-threaded wall time, 25.7% peak RSS, 27.5% single-threaded instruction count impact probability. Release builds in fast mode (TSRS_FAST=1) with Hyperfine 2 hardware counters. After warming each binary, alternating main/PR pairs measure wall time at both the fast preset's default checker count and with --singleThreaded, with ten pairs per configuration by default. Instructions come from the single-threaded runs; peak RSS comes from the default-count runs.
Negative means the PR used less; positive means it used more. Deltas are medians of paired PR/main ratios for wall time and instructions. Single-threaded runs reduce scheduling noise; shared CI machines can still add noise to wall time. Measured medians (main → PR)
tsrs-lintRelease
Negative means the PR used less. Wall and CPU time deltas are medians of paired PR/main ratios; peak RSS compares medians. Measured lint medians (main → PR)
|
compilerOptions.types: ["*"]in a program that uses the sources of referenced projects panicked withshould not be called by resolver.tsrs-lintand the language server load programs this way.resolve_automatic_type_directiveslisted the type roots throughproject_references.host. With source references, that is the dts faking host, and itsget_accessible_entriesis only for module resolution and panics. tsgo lists them with the compiler host's file system (p.host.FS(),internal/compiler/fileloader.go:293), and this does the same.get_automatic_type_directive_namesnow takes(options, current_directory, fs), matching Go's(options, baseDirectory, fs). The directory is still the host's current directory, as it was, becauseParsedCommandLinehas no base directory.Before,
tsrs-lint headlessexited 1 with the panic. Now the@typespackages load and the rules run, and tsgo loads the same program with no diagnostics.Fixes #1047