graphitation icon indicating copy to clipboard operation
graphitation copied to clipboard

Duct tape compiler not working with Typescript 5

Open sjwilczynski opened this issue 1 year ago • 0 comments

I am trying to integrate the new compiler in 1JS. During that process I stumbled upon error when trying to run the compiler. I was able to reproduce this issue inside graphitation repo by basically bumping TS to version 5 (which is what 1JS is using). The error is during generation is:

➜  apollo-watch-fragments (main) yarn duct-tape-compiler
yarn run v1.22.15
$ duct-tape-compiler --schema ./data/schema.graphql --src ./src --emitQueryDebugComments

Writing ts
ERROR:
Error writing modules:
Error: Debug Failure. Unhandled SyntaxKind: Unknown.
    at pipelineEmitWithHintWorker (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111514:13)  
    at pipelineEmitWithHint (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111058:9)
    at pipelineEmitWithComments (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:114842:7)     
    at pipelineEmit (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111007:7)
    at emit (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:110975:7)
    at emitTypeAliasDeclaration (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:112937:7)     
    at pipelineEmitWithHintWorker (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111244:20)  
    at pipelineEmitWithHint (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111058:9)
    at pipelineEmitWithComments (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:114842:7)     
    at pipelineEmit (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\node_modules\typescript\lib\typescript.js:111007:7)
error Command failed with exit code 100.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Could we get compiler working with TS 5?

sjwilczynski avatar Jul 14 '23 13:07 sjwilczynski