-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Mark allowArbitraryExtensions as affectsProgramStructure #52437
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
Merged
jakebailey
merged 5 commits into
microsoft:main
from
jakebailey:fix-allowArbitraryExtensions-flag
Jan 26, 2023
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
187 changes: 187 additions & 0 deletions
187
.../tscWatch/programUpdates/Updates-diagnostics-when-'--allowArbitraryExtensions'-changes.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
Input:: | ||
//// [/a/lib/lib.d.ts] | ||
/// <reference no-default-lib="true"/> | ||
interface Boolean {} | ||
interface Function {} | ||
interface CallableFunction {} | ||
interface NewableFunction {} | ||
interface IArguments {} | ||
interface Number { toExponential: any; } | ||
interface Object {} | ||
interface RegExp {} | ||
interface String { charAt: any; } | ||
interface Array<T> { length: number; [n: number]: T; } | ||
|
||
//// [/a.ts] | ||
import {} from './b.css' | ||
|
||
//// [/b.d.css.ts] | ||
declare const style: string; | ||
|
||
//// [/tsconfig.json] | ||
{"compilerOptions":{"allowArbitraryExtensions":true}} | ||
jakebailey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
/a/lib/tsc.js -w -p /tsconfig.json | ||
Output:: | ||
>> Screen clear | ||
[[90m12:00:15 AM[0m] Starting compilation in watch mode... | ||
|
||
[96ma.ts[0m:[93m1[0m:[93m16[0m - [91merror[0m[90m TS2306: [0mFile '/b.d.css.ts' is not a module. | ||
|
||
[7m1[0m import {} from './b.css' | ||
[7m [0m [91m ~~~~~~~~~[0m | ||
|
||
[[90m12:00:18 AM[0m] Found 1 error. Watching for file changes. | ||
|
||
|
||
|
||
Program root files: ["/a.ts","/b.d.css.ts","/a/lib/lib.d.ts"] | ||
Program options: {"allowArbitraryExtensions":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} | ||
Program structureReused: Not | ||
Program files:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
Shape signatures in builder refreshed for:: | ||
/b.d.css.ts (used version) | ||
/a.ts (used version) | ||
/a/lib/lib.d.ts (used version) | ||
|
||
PolledWatches:: | ||
|
||
FsWatches:: | ||
/tsconfig.json: | ||
{} | ||
/a.ts: | ||
{} | ||
/b.d.css.ts: | ||
{} | ||
/a/lib/lib.d.ts: | ||
{} | ||
|
||
FsWatchesRecursive:: | ||
/: | ||
{} | ||
|
||
exitCode:: ExitStatus.undefined | ||
|
||
//// [/a.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
|
||
|
||
|
||
Change:: Disable allowArbitraryExtensions | ||
|
||
Input:: | ||
//// [/tsconfig.json] | ||
{"compilerOptions":{"allowArbitraryExtensions":false}} | ||
|
||
|
||
Output:: | ||
>> Screen clear | ||
[[90m12:00:21 AM[0m] File change detected. Starting incremental compilation... | ||
|
||
[96ma.ts[0m:[93m1[0m:[93m16[0m - [91merror[0m[90m TS6263: [0mModule './b.css' was resolved to '/b.d.css.ts', but '--allowArbitraryExtensions' is not set. | ||
|
||
[7m1[0m import {} from './b.css' | ||
[7m [0m [91m ~~~~~~~~~[0m | ||
|
||
[[90m12:00:22 AM[0m] Found 1 error. Watching for file changes. | ||
|
||
|
||
|
||
Program root files: ["/a.ts","/b.d.css.ts","/a/lib/lib.d.ts"] | ||
Program options: {"allowArbitraryExtensions":false,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} | ||
Program structureReused: Completely | ||
Program files:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
No shapes updated in the builder:: | ||
|
||
PolledWatches:: | ||
|
||
FsWatches:: | ||
/tsconfig.json: | ||
{} | ||
/a.ts: | ||
{} | ||
/b.d.css.ts: | ||
{} | ||
/a/lib/lib.d.ts: | ||
{} | ||
|
||
FsWatchesRecursive:: | ||
/: | ||
{} | ||
|
||
exitCode:: ExitStatus.undefined | ||
|
||
|
||
Change:: Enable allowArbitraryExtensions | ||
|
||
Input:: | ||
//// [/tsconfig.json] | ||
{"compilerOptions":{"allowArbitraryExtensions":true}} | ||
|
||
|
||
Output:: | ||
>> Screen clear | ||
[[90m12:00:25 AM[0m] File change detected. Starting incremental compilation... | ||
|
||
[96ma.ts[0m:[93m1[0m:[93m16[0m - [91merror[0m[90m TS2306: [0mFile '/b.d.css.ts' is not a module. | ||
|
||
[7m1[0m import {} from './b.css' | ||
[7m [0m [91m ~~~~~~~~~[0m | ||
|
||
[[90m12:00:26 AM[0m] Found 1 error. Watching for file changes. | ||
|
||
|
||
|
||
Program root files: ["/a.ts","/b.d.css.ts","/a/lib/lib.d.ts"] | ||
Program options: {"allowArbitraryExtensions":true,"watch":true,"project":"/tsconfig.json","configFilePath":"/tsconfig.json"} | ||
Program structureReused: Completely | ||
Program files:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/b.d.css.ts | ||
/a.ts | ||
/a/lib/lib.d.ts | ||
|
||
No shapes updated in the builder:: | ||
|
||
PolledWatches:: | ||
|
||
FsWatches:: | ||
/tsconfig.json: | ||
{} | ||
/a.ts: | ||
{} | ||
/b.d.css.ts: | ||
{} | ||
/a/lib/lib.d.ts: | ||
{} | ||
|
||
FsWatchesRecursive:: | ||
/: | ||
{} | ||
|
||
exitCode:: ExitStatus.undefined | ||
|
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.
Uh oh!
There was an error while loading. Please reload this page.