Skip to content
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

tsc --build sometimes exits quickly without reporting errors, even when the TS being built is invalid #50568

Closed
NickHeiner opened this issue Aug 31, 2022 · 3 comments
Assignees
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@NickHeiner
Copy link

Bug Report

This issue was originally posted as a PR comment.

Possibly related: #50545.

πŸ”Ž Search Terms

tsc build exit silent failure

πŸ•— Version & Regression Information

  • This changed between versions 4.7.3 and 4.8.2_

⏯ Playground Link / πŸ’» Code

This occurs in my 7.5k file monorepo. I'm able to work around this issue by using tsc -p instead of tsc --build, so I'm not going to invest in creating a minimal repro case. I know that makes it hard for you to investigate, so I don't expect much from filing this issue. I'm more doing it in case other people have the same problem. If enough people +1 it, then we can invest in finding a repro.

If you want to give me a tsc with additional logging to run, I'm happy to do that.

πŸ™ Actual behavior

When I run tsc --build on my TS project, I get no errors, even though they exist.

Ξ» ./tools/tvui/node_modules/.bin/tsc -p packages/tsconfig.json 
# ... expected error messages omitted

Found 3 errors in 3 files.

Errors  Files
     1  node_modules/relay-hooks/lib/RelayHooksTypes.d.ts:56
     1  packages/@tvui/fx2-transition/src/utils.tsx:173
     1  packages/@tvui/redux/testing/unitTestingEnhancer.ts:8

tvui on ξ‚  nth/ts-4.8 [!⇑] via  v16.16.0 took 10s 

Ξ» time ./tools/tvui/node_modules/.bin/tsc --build packages/tsconfig.json --verbose
[3:52:58 PM] Projects in this build: 
    * packages/tsconfig.json

[3:52:58 PM] Project 'packages/tsconfig.json' is up to date but needs to update timestamps of output files that are older than input files


________________________________________________________
Executed in  550.41 millis    fish           external
   usr time  437.83 millis   50.00 micros  437.78 millis
   sys time  194.10 millis  616.00 micros  193.49 millis

I first noticed this after using yarn to update type-fest in node_modules.

πŸ™‚ Expected behavior

When I run tsc --build on my TS project, I get the same set of TS errors that tsc -p produces.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Aug 31, 2022
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.9.0 milestone Aug 31, 2022
@sheetalkamat sheetalkamat added Needs More Info The issue still hasn't been fully clarified and removed Needs Investigation This issue needs a team member to investigate its status. labels Aug 31, 2022
@sheetalkamat
Copy link
Member

We really need more detailed information on how to reproduce this so we can investigate. Thanks

@NickHeiner
Copy link
Author

Hi – as I mentioned in the original post, I don't intend to provide more details for this issue. I recognize that it's not actionable for y'all in the current state, but I'm leaving it here so if other people run into the same thing, we can consolidate observations and eventually converge on something actionable.

@sheetalkamat
Copy link
Member

From your error it seems like it could be that build doesnt explicitly list that file so its not checked for uptodate ness check with --b and thats the known thing with --build so this very well could be working as intended and i am going to mark it as such. If and when you provide more information we could revisit this.

@sheetalkamat sheetalkamat added Working as Intended The behavior described is the intended behavior; this is not a bug and removed Needs More Info The issue still hasn't been fully clarified labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

3 participants