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

Provide an editor-level warning when including output files #40195

Open
DanielRosenwasser opened this issue Aug 22, 2020 · 3 comments
Open

Provide an editor-level warning when including output files #40195

DanielRosenwasser opened this issue Aug 22, 2020 · 3 comments
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

Something that we noticed with internal codebases, as well as even with RxJS is that tsconfig.jsons are incorrectly configured for editor scenarios and include folders like dist and lib. This means you end up with slower performance, and noisy auto-imports.

We already provide some sort of error here when compiling, but we don't provide the same error in editor scenarios.

Open questions:

  • How is this information presented to the user? How is the editor given notice that it should alert a user about this?
  • What exactly does it mean to include an output file? In the case of RxJS, there are no "output files" getting included in the compilation based on how we determine a file is an an output of input files. Specifically, the root-level tsconfig.json doesn't specify an outDir, so it doesn't know that it should avoid including dist. Maybe we can use some directory-naming heuristics when we find one folder named src and another named dist or lib?
@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. labels Aug 22, 2020
@DanielRosenwasser
Copy link
Member Author

@mjbvz @amcasey you might be interested in this

@DanielRosenwasser
Copy link
Member Author

Related is @andrewbranch's #39267

@mjbvz
Copy link
Contributor

mjbvz commented Aug 25, 2020

Seems useful.

For this first point, TS already generates config file diagnostics. This seems like it would fall under that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants