TypeStrong / tsify

Browserify plugin for compiling TypeScript
344 stars 75 forks source link

tsconfig-files with `composite` set to true fail to build #269

Open manuth opened 3 years ago

manuth commented 3 years ago

General

When building a TypeScript-project with composite: true TypeScript tries to find a path to store the .tsbuildinfo-file. This process fails with following error-message while running browserify:

Paths must either both be absolute or both be relative

Stacktrace:

[00:13:28] Error: Debug Failure. False expression: Paths must either both be absolute or both be relative
    at Object.getRelativePathFromDirectory (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\typescript\lib\typescript.js:7085:18)
    at Object.getTsBuildInfoEmitOutputFilePath (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\typescript\lib\typescript.js:97136:55)
    at verifyProjectReferences (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\typescript\lib\typescript.js:105057:71)
    at verifyCompilerOptions (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\typescript\lib\typescript.js:104824:13)
    at Object.createProgram (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\typescript\lib\typescript.js:103094:9)
    at Host._compile (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\tsify\lib\Host.js:217:7)
    at Tsifier.compile (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\tsify\lib\Tsifier.js:188:27)
    at Tsifier.generateCache (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\tsify\lib\Tsifier.js:174:8)
    at DestroyableTransform.flush [as _flush] (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\tsify\index.js:88:12)
    at DestroyableTransform.prefinish (C:\Users\Manuel\Documents\GitHub\MarkdownConverter\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:138:10)

Workaround

Set tsBuildInfoFile to any value.

cartant commented 3 years ago

Incremental TypeScript compilation is not supported.

manuth commented 3 years ago

Incremental TypeScript compilation is not supported.

My project contains references and therefore requires composite: true to be set. Are typescript projects with references not supported either?

cartant commented 3 years ago

None of the project related features added in Typescript 3.0 are supported. I've not used tsify for years, now, and don't have the time to add features - or even to investigate whether or not supporting specific features is possible.

manuth commented 3 years ago

Got it! Thanks for taking time to answer to my issue though

CheyenneForbes commented 2 years ago

None of the project related features added in Typescript 3.0 are supported. I've not used tsify for years, now, and don't have the time to add features - or even to investigate whether or not supporting specific features is possible.

@cartant are you open to passing on the project to a new maintainer?

cartant commented 2 years ago

@CheyenneForbes

... are you open to passing on the project to a new maintainer?

It wouldn't be up to me and I doubt it would just be "passed on" - some level of trust would need to first be established.

If you're interested in maintaining the project, my suggestion would be to talk with some of the people in the TypeStrong organization: maybe Blake Embrey or Basarat Ali Syed.

For background, I took over maintaining tsify years ago when I was using it and needed some bug fix PRs I'd opened merged - the project's author had moved on to other things. Blake and Basarat were the people who approved and merged my PRs and, later, decided I might as well maintain it.