Comments (2)
This is working as intended.
tsc --b
does not check dependencies for upto date ness. It only checks at your root files, output and referenced project upto date ness
Here is output
c:\temp\tsbuild-issue>pnpm build
> [email protected] build C:\temp\tsbuild-issue
> tsc -b -v .
[1:33:47 PM] Projects in this build:
* tsconfig.core.json
* tsconfig.json
[1:33:47 PM] Project 'tsconfig.core.json' is out of date because output file 'dist/compile.tsbuildInfo' does not exist
[1:33:47 PM] Building project 'C:/temp/tsbuild-issue/tsconfig.core.json'...
c:\temp\tsbuild-issue>pnpm add -D @types/[email protected]
Packages: +1 -1
+-
Progress: resolved 3, reused 2, downloaded 1, added 1, done
devDependencies:
- @types/vscode 1.88.0
+ @types/vscode 1.89.0
Done in 1.4s
c:\temp\tsbuild-issue>pnpm build
> [email protected] build C:\temp\tsbuild-issue
> tsc -b -v .
[1:34:07 PM] Projects in this build:
* tsconfig.core.json
* tsconfig.json
[1:34:07 PM] Project 'tsconfig.core.json' is up to date because newest input 'src/window.ts' is older than output 'dist/compile.tsbuildInfo'
from typescript.
Ahhh, that explains why it doesn't work as expected. It only takes local dependencies into account. That is too bad. It means I have to do tsc -b . -f
. I take it that there isn't a compiler option to have it check external dependencies.
By the way, thank you for the -v
option. I was certain it meant --version
and it does, but the meaning magically changes with the -b
option. Only after realizing that you used it in a way I hadn't seen did I think to try tsc -b . --help
. Looking further, I see that there is a --help --all
option that shows everything. But I was surprised that the meaning of an option changes dramatically based upon other options.
I will open a feature request to add a compile option to "monitor external dependencies". I would rather have it take a little bit long to compile reliably than to waste time trying to figure out why something wasn't working only to realize I needed to do a clean build.
To be clear, I was sure this was a bug. I had opened the .tsbuildinfo
file to see if it was tracking the external dependencies. It is. It just is not using them for composite
or incremental
builds. I'm guessing it is there for watch
. Which then leads to the question why watch
behavior would be different than tsc -b .
. Which explains #48314.
from typescript.
Related Issues (20)
- tsc --init update 2024 HOT 5
- [transpileDeclaration API][5.5] Type containing enum values is incorrectly emitted HOT 3
- 5.5 Beta - Error assigning const string to enum from another file HOT 3
- `export default` generates JavaScript and declaration file incompatible HOT 3
- Issues with `isolatedDeclarations` and the associated fixes in editor HOT 5
- Design Meeting Notes, 5/3/2024 HOT 1
- [transpileDeclaration API][5.5] Type-only import is missing when type is used as arrow function argument HOT 3
- Error on types when using multiple conditional properties HOT 3
- Compiler Option to monitor external dependencies
- Extract interface metadata for runtime HOT 2
- Enum allows numeric keys with leading 0s HOT 5
- Various bugs with class expressions and JavaScript decorators (code run twice, internal compiler crash) HOT 1
- JSDoc unexpected type error when spreading array containing different shapes of same type HOT 3
- Selecting suggestion of string completion deletes everything up to end of line, if no ending quote is present
- Hitting TS Limits: "Max Call Stack Size Exceeded" HOT 3
- [NewErrors] 5.5.0-dev.20240505 vs 5.4.5 HOT 52
- Error in Index Signature Assignment HOT 3
- [ServerErrors][TypeScript] 5.5.0-dev.20240505 HOT 15
- [ServerErrors][JavaScript] 5.5.0-dev.20240505 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript.