Skip to content

Duplicate error message (esp. when pretty: true) #103

@kitsonk

Description

@kitsonk

What happens and why it is wrong

Duplicate semantic errors get logged to the console, which causes confusion. For example:

./node_modules/rollup/bin/rollup -c ../../rollup.config.js -i ../../js/main.ts -o gen/bundle/main.js --silent
[!] (rpt2 plugin) Error: ../../js/main.ts:8:1 - error TS2304: Cannot find name 'confounded'.

8 confounded;
  ~~~~~~~~~~

../../js/main.ts
Error: ../../js/main.ts:8:1 - error TS2304: Cannot find name 'confounded'.

8 confounded;
  ~~~~~~~~~~

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

I am not entirely sure how much this is rollup-plugin-typescript2 and how much of this is just the way rollup behaves, but I couldn't find an answer either way.

Versions

  • typescript: 3.0.1
  • rollup: 0.63.2
  • rollup-plugin-typescript2: 0.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions