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

TS types transformer: Throw diagnostics as error on empty emit #8914

Merged
merged 6 commits into from
Apr 17, 2023

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Mar 26, 2023

Closes #8798

Previously, they were logged as warnings and then overwritten (!) by the error thrown by nullthrows(host.outputCode) if the emit failed.

  • Add test
  • Deduplicate diagnostics between ts.getPreEmitDiagnostics(program) and emitResult.diagnostics

@parcel-benchmark
Copy link

parcel-benchmark commented Mar 26, 2023

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.45s +19.00ms
Cached 329.00ms -4.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

React HackerNews ✅

Timings

Description Time Difference
Cold 7.03s +13.00ms
Cached 431.00ms +17.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/PermalinkedComment.60e78a07.js 4.18kb +0.00b 428.00ms +23.00ms ⚠️
dist/UserProfile.c18819ee.js 1.57kb +0.00b 428.00ms +24.00ms ⚠️
dist/NotFound.cfeedbab.js 427.00b +0.00b 429.00ms +25.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 463.02kb +0.00b 1.01s -53.00ms 🚀
dist/PermalinkedComment.60e78a07.js 4.18kb +0.00b 402.00ms +22.00ms ⚠️
dist/UserProfile.c18819ee.js 1.57kb +0.00b 402.00ms +22.00ms ⚠️
dist/NotFound.cfeedbab.js 427.00b +0.00b 402.00ms +22.00ms ⚠️

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.03m +1.03m ⚠️
Cached 2.06s +2.06s ⚠️

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Three.js ✅

Timings

Description Time Difference
Cold 4.93s -99.00ms
Cached 254.00ms -5.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/Three.js 572.22kb +0.00b 903.00ms -76.00ms 🚀

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@mischnic mischnic marked this pull request as ready for review March 27, 2023 16:27
@mischnic mischnic merged commit c5087e4 into v2 Apr 17, 2023
@mischnic mischnic deleted the ts-types-throw-diagnostics branch April 17, 2023 21:59
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 this pull request may close these issues.

@parcel/transformer-typescript-types: Got unexpected undefined
3 participants