Coder Social home page Coder Social logo

Comments (2)

sheetalkamat avatar sheetalkamat commented on May 18, 2024

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.

Jason3S avatar Jason3S commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.