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

typescript errors are printed twice during rollup #459

Closed
ry opened this issue Aug 5, 2018 · 1 comment · Fixed by #2825
Closed

typescript errors are printed twice during rollup #459

ry opened this issue Aug 5, 2018 · 1 comment · Fixed by #2825

Comments

@ry
Copy link
Member

ry commented Aug 5, 2018

If you induce some typescript error, the build will fail (as expected) during the "bundle" step, but it will print the error message twice. Example:

~/src/deno> ./tools/build.py
DENO_BUILD_PATH: /Users/rld/src/deno/out/debug
[3/16] ACTION //:bundle(//build/toolchain/mac:clang_x64)
FAILED: gen/bundle/main.js gen/bundle/main.js.map
python ../../tools/run_node.py ./node_modules/rollup/bin/rollup -c ../../rollup.config.js -i ../../js/main.ts -o gen/bundle/main.js --silent --environment BASEPATH:../..
[!] (rpt2 plugin) Error: ../../js/deno.ts:4:26 - error TS2307: Cannot find module './dispatch'.

4 export { pub, sub } from "./dispatch";
                           ~~~~~~~~~~~~

../../js/deno.ts
Error: ../../js/deno.ts:4:26 - error TS2307: Cannot find module './dispatch'.

4 export { pub, sub } from "./dispatch";
                           ~~~~~~~~~~~~

    at error (/Users/rld/src/deno/third_party/node_modules/rollup/dist/rollup.js:3365:15)
    at Object.error (/Users/rld/src/deno/third_party/node_modules/rollup/dist/rollup.js:20727:13)
    at RollupContext.error (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/src/rollupcontext.ts:36:18)
    at lodash_2 (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:37:10)
    at arrayEach (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11)
    at forEach (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9342:14)
    at printDiagnostics (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:9:2)
    at Object.transform (/Users/rld/src/deno/third_party/node_modules/rollup-plugin-typescript2/src/index.ts:238:5)
    at /Users/rld/src/deno/third_party/node_modules/rollup/dist/rollup.js:20750:41
    at <anonymous>

ninja: build stopped: subcommand failed.
Error 1 ~/src/deno>

It would be nice if that error message was only displayed once.

cc @kitsonk

@ry ry added this to the future milestone Aug 7, 2018
@kitsonk
Copy link
Contributor

kitsonk commented Aug 8, 2018

Not entirely sure what is going on and don't know if the plugin is causing the duplication or if that is just the way rollup works. Either way, opened: ezolenko/rollup-plugin-typescript2#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants