-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Always look for tsconfig, allow command line to override tsconfig file list #49817
base: main
Are you sure you want to change the base?
Always look for tsconfig, allow command line to override tsconfig file list #49817
Conversation
More than just occasionally, if the number of times I've had to explain this behavior to people on Discord is any indication. |
We discussed this at today's design meeting. One work item is adding the ability to set a command line option to tsc --incremental --tsBuildInfoFile .tsbuildinfo --strict file1.ts file2.ts
tsc --incremental --tsBuildInfoFile .tsbuildinfo --strict file1.ts (which we allow today already) might not have correct incremental results and may incorrectly reuse the incremental data from the earlier build despite the file list changing, so is also a related issue worth looking in to, since using the folder's tsconfig by default, rather than ignoring it, may result in many more command line invocations having As for scheduling, we may do this for 4.9 or if not for 5.0. |
Oh, neat, we already supported |
And as for the concern about buildinfos, I put together a harness that could actually test multiple consecutive invocations - looks like we handle the file list changing entirely just dandy. So I'd call this done and ready for review. |
We already have this framework which you can use by calling The concerning scenario is |
@sheetalkamat are you expressing concern that this PR and the If there's concern about this changing the default of |
lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
can't use lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
cann't use with lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files
This allows you to say, eg,
tsc -p path/to/tsconfig.json --other-option-override false glob/*/filename-override.ts
- essentially allowing you to use config extension on the commandline, including overriding included files. Even when-p
isn't provided (but other options or filenames are), we also now look up atsconfig.json
in the current directory to use as the base config for the invocation (which is theoretically a breaking change, since we'd previously ignore the tsconfig, but it looks like that occasionally confused people, looking at the linked issue).Fixes #27379