fix(check): align skipLibCheck default with tsgo#36185
Open
bartlomieju wants to merge 1 commit into
Open
Conversation
Deno's base check compiler options defaulted skipLibCheck to false, while the generated tsconfig for native check defaulted it to true. This flips the resolved base default to true so the whole pipeline (native check, the in-isolate check path, and the LSP) agrees on tsgo's --init default, and a user skipLibCheck: false still overrides it. Also routes skipLibCheck through the resolved compiler options (which honor --config) instead of the raw project-root deno.json pass, so an override from --config <other> is respected, and re-enables the .d.ts entrypoint check specs that were ignored under issue #36085.
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.
Deno's base check compiler options defaulted
skipLibCheckto false, whilethe generated tsconfig used by native
deno checkdefaulted it to true. Thatsplit meant the two halves of the check pipeline disagreed on whether
.d.tsfiles are type-checked, and it also made the native check-hash collide across
runs that used different effective
skipLibCheckvalues (a clean run under theimplicit false default would satisfy a later run that should have checked lib
files, and vice versa).
This flips the resolved base default to true so the whole pipeline (native
check, the in-isolate check path shared by
deno run --check/test/cache,and the LSP) agrees on tsgo's
--initdefault ofskipLibCheck: true. A userskipLibCheck: falsestill overrides it, and that override is now sourced fromthe resolved compiler options (which honor
--config <other>) rather than theraw project-root deno.json pass, so it is respected however the config is
provided.
With the default settled, this re-enables the
.d.tsentrypoint check specsthat were ignored under #36085: under the aligned default a
.d.tsentrypoint(or a referenced
.d.tsdependency) is not type-checked, and each spec now alsocovers the
skipLibCheck: falsepath that does surface the error. The specs runin per-test temp dirs so their generated
.deno/and check caches don't clobberone another.
Closes #36085