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 --build/--incremental APIs for build tools #29978

Closed
DanielRosenwasser opened this issue Feb 19, 2019 · 7 comments
Closed

Provide --build/--incremental APIs for build tools #29978

DanielRosenwasser opened this issue Feb 19, 2019 · 7 comments
Assignees
Labels
API Relates to the public API for TypeScript Committed The team has roadmapped this issue Domain: --incremental The issue relates to incremental compilation Domain: tsc -b Issues related to build mode Scenario: Monorepos & Cross-Project References Relates to composite projects (a.k.a references between "medium sized projects") Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

When we added support for composite projects and implemented --build mode (#3469, #25600), we only provided a few APIs, but not enough that 3rd party tools could defer to TypeScript's understanding of composite projects to instruct these tools how to build intelligently.

We'd like to provide some stable API so tools like gulp and Webpack can easily operate over composite projects with project references.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Committed The team has roadmapped this issue API Relates to the public API for TypeScript Scenario: Monorepos & Cross-Project References Relates to composite projects (a.k.a references between "medium sized projects") labels Feb 19, 2019
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 3.5.0 milestone Feb 19, 2019
@dsmilkov
Copy link

dsmilkov commented Mar 19, 2019

This would be great. The TensorFlow.js team is using karma-typescript for testing in the browser, and we can't migrate to composite build yet since the compiler API doesn't work for composite.

const tsconfig = ; // parsed ts config
// tsconfig.fileNames includes only the files mentioned in "include".
ts.createProgram(tsconfig.fileNames, tsconfig.options, compilerHost);
// Failed since `fileNames` doesn't contain files from "referenced projects"

@DanielRosenwasser DanielRosenwasser changed the title Provide --build APIs for build tools to operate on composite projects Provide --build/--incremental APIs for build tools to operate on composite projects Apr 1, 2019
@DanielRosenwasser DanielRosenwasser changed the title Provide --build/--incremental APIs for build tools to operate on composite projects Provide --build/--incremental APIs for build tools Apr 1, 2019
@DanielRosenwasser
Copy link
Member Author

This issue now also tracks --incremental work since they are both related in some capacity.

@DanielRosenwasser DanielRosenwasser added the Domain: tsc -b Issues related to build mode label Apr 2, 2019
@DanielRosenwasser DanielRosenwasser added the Domain: --incremental The issue relates to incremental compilation label Apr 12, 2019
@sheetalkamat
Copy link
Member

Closed by #31432

@MLoughry
Copy link

MLoughry commented Jun 6, 2019

Thanks for the new APIs, @sheetalkamat.

Is there a separate issue open for updating the docs? I know, personally, I've found the docs around the compiler APIs (as opposed to the language itself) to be rather lacking and often out-of-date.

@sheetalkamat
Copy link
Member

Not that I am aware of. @DanielRosenwasser do you want me to keep this open or create new issue for documentation.

@DanielRosenwasser
Copy link
Member Author

@MLoughry @sheetalkamat see #31849.

@ulrichb
Copy link

ulrichb commented Jul 13, 2019

Hmm. This issue has been labeled with 3.5, ... and also has just been moved in the roadmap from 3.6 to 3.5 ... but I cannot find e.g. createIncrementalProgram() in the declarations of typescript@3.5.3.

So what's going on? /cc @DanielRosenwasser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Committed The team has roadmapped this issue Domain: --incremental The issue relates to incremental compilation Domain: tsc -b Issues related to build mode Scenario: Monorepos & Cross-Project References Relates to composite projects (a.k.a references between "medium sized projects") Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants