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

4.5.0-dev.20211029: Does not throw error TS5056: Cannot write file '/to/file/path' because it would be overwritten by multiple input files. #46577

Closed
sosukesuzuki opened this issue Oct 29, 2021 · 2 comments Β· Fixed by #46787
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@sosukesuzuki
Copy link

Bug Report

πŸ”Ž Search Terms

TS5056, because it would be overwritten by multiple input files

πŸ•— Version & Regression Information

  • This changed between versions 4.4.4 and 4.5.0-dev.20211029

⏯ Playground Link

This bug cannot be reproduced in Playground.

πŸ’» Code

Sorry this bug cannot be reproduced as as simple code. Instead of I've created the repository to reproduce this.

https://github.com/sosukesuzuki-sandbox/ts-4.5-bug-reproduce

πŸ™ Actual behavior

Does not throw error TS5056: Cannot write file '/to/file/path' because it would be overwritten by multiple input files.

πŸ™‚ Expected behavior

Throw error TS5056: Cannot write file '/to/file/path' because it would be overwritten by multiple input files.

@DanielRosenwasser
Copy link
Member

Isn't this correctly catching an error now? The two files would have been written to the same output .js file.

If you're using a bundler or similar build tool that does its own compilation, you can turn --noEmit on and this should work.

@andrewbranch
Copy link
Member

The error is correct and it’s gone from 4.5.

It seems that matchFiles is broken in 4.5; it’s not picking up the TSX file at all. Investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants