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

Parcel config diagnostics #5107

Merged
merged 4 commits into from
Sep 7, 2020
Merged

Parcel config diagnostics #5107

merged 4 commits into from
Sep 7, 2020

Conversation

devongovett
Copy link
Member

Adds diagnostics for errors in .parcelrc files for the following scenarios:

  • When an "extends" field contains one or more invalid references. Includes fuzzy match suggestions if possible for both node_modules and file paths. If there are multiple extended configs that don't exist, multiple code frames will be emitted together.
  • When a parcel plugin referenced in a config cannot be resolved. Shows a code frame for the parcelrc location that referenced it, and includes fuzzy match suggestions if possible. This required passing through key paths in the config around so we can track where a plugin was referenced.
  • When a Parcel plugin is not compatible with the current version of parcel. Shows a code frame for the package.json where the engines.parcel field is defined.

In order to implement the fuzzy matching, I've moved the findAlternativeNodeModules and findAlternativeFiles functions out of the resolver plugin and into @parcel/utils so it can be used in other places.

image

@height
Copy link

height bot commented Sep 6, 2020

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@parcel-benchmark
Copy link

parcel-benchmark commented Sep 6, 2020

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 6.12s -304.00ms
Cached 2.20s -88.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/index.45cccf70.js 1.10kb +0.00b 1.58s -124.00ms 🚀
dist/modern/index.1964d1f6.js 1.10kb +0.00b 1.58s -122.00ms 🚀
dist/legacy/index.b3acc8eb.css 77.00b +0.00b 1.58s -124.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.d5807e82.webp 102.94kb +0.00b 196.00ms -73.00ms 🚀
dist/modern/parcel.d5807e82.webp 102.94kb +0.00b 196.00ms -74.00ms 🚀
dist/legacy/index.45cccf70.js 1.10kb +0.00b 435.00ms -63.00ms 🚀
dist/modern/index.1964d1f6.js 1.10kb +0.00b 434.00ms -63.00ms 🚀
dist/legacy/index.html 701.00b +0.00b 427.00ms -79.00ms 🚀
dist/modern/index.html 701.00b +0.00b 425.00ms -72.00ms 🚀
dist/legacy/index.b3acc8eb.css 77.00b +0.00b 435.00ms -63.00ms 🚀
dist/modern/index.7bc22a8b.css 77.00b +0.00b 434.00ms -63.00ms 🚀

React HackerNews ✅

Timings

Description Time Difference
Cold 29.55s +47.00ms
Cached 2.30s -49.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 478.68kb +0.00b 256.00ms -36.00ms 🚀
dist/logo.24c8bf9e.png 274.00b +0.00b 192.00ms +26.00ms ⚠️

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 2.86m +1.94s
Cached 4.98s -60.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/pdfRenderer.15a6a023.js 1.11mb +3.00b ⚠️ 51.41s -1.03s
dist/EmojiPickerComponent.ae601247.js 75.29kb +0.00b 10.60s +655.00ms ⚠️
dist/card.0313bac8.js 52.78kb +0.00b 53.10s -37.90s 🚀
dist/Modal.19ffed32.js 41.27kb +0.00b 5.44s -548.00ms 🚀
dist/component.54080a26.js 22.50kb +0.00b 5.44s -548.00ms 🚀
dist/DatePicker.0df05dac.js 21.21kb +0.00b 10.60s +667.00ms ⚠️
dist/EmojiPickerComponent.7dc0ebd0.js 18.23kb +0.00b 10.60s +667.00ms ⚠️
dist/js.5733a017.js 16.40kb +0.00b 5.44s -548.00ms 🚀
dist/EmojiTypeAheadComponent.1990d771.js 8.67kb +0.00b 53.97s +43.22s ⚠️
dist/component.77c0f682.js 6.05kb +0.00b 5.44s -548.00ms 🚀
dist/EmojiPickerComponent.627aca6b.js 3.58kb +0.00b 10.60s +667.00ms ⚠️
dist/index.ac562c80.css 3.46kb +0.00b 1.55m +36.92s ⚠️
dist/png-chunks-extract.a844fdb6.js 3.41kb +0.00b 5.44s -548.00ms 🚀
dist/Modal.0304b9ed.js 3.08kb +0.00b 4.42s -621.00ms 🚀
dist/EmojiUploadComponent.d54a1fc6.js 2.18kb +0.00b 53.97s +43.22s ⚠️
dist/ResourcedEmojiComponent.abe8596c.js 2.00kb +0.00b 4.42s -576.00ms 🚀
dist/date.231500d2.js 1.73kb +0.00b 5.92s -596.00ms 🚀
dist/16.d16f14ed.js 1.73kb +0.00b 5.78s -588.00ms 🚀
dist/images.80c92f5e.js 1.67kb +0.00b 6.01s -664.00ms 🚀
dist/16.1b6ca79f.js 1.66kb +0.00b 6.51s -352.00ms 🚀
dist/feedback.d5590b34.js 1.64kb +0.00b 6.50s -43.53s 🚀
dist/workerHasher.6d5b22d7.js 1.54kb +0.00b 53.97s +43.22s ⚠️
dist/workerHasher.fa198233.js 1.54kb +0.00b 55.25s -35.75s 🚀
dist/list-number.c35f9589.js 1.46kb +0.00b 6.16s -627.00ms 🚀
dist/status.8ab4226b.js 1.46kb +0.00b 6.35s -43.67s 🚀
dist/16.9ccb5b28.js 1.38kb +0.00b 5.63s -543.00ms 🚀
dist/code.3dd71280.js 1.38kb +0.00b 5.92s -599.00ms 🚀
dist/16.19c93285.js 1.33kb +0.00b 6.51s -352.00ms 🚀
dist/16.c7751e34.js 1.33kb +0.00b 5.63s -543.00ms 🚀
dist/16.18344f47.js 1.31kb +0.00b 5.92s -599.00ms 🚀
dist/link.2f4427e6.js 1.30kb +0.00b 6.16s -626.00ms 🚀
dist/heading6.fdbbdf4d.js 1.30kb +0.00b 6.49s -546.00ms 🚀
dist/heading3.2113b7a1.js 1.29kb +0.00b 6.35s -682.00ms 🚀
dist/16.2c4c1846.js 1.27kb +0.00b 5.78s -587.00ms 🚀
dist/emoji.93ae61d3.js 1.23kb +0.00b 6.01s -664.00ms 🚀
dist/16.d17ab186.js 1.23kb +0.00b 5.78s -588.00ms 🚀
dist/16.b4da0acb.js 1.19kb +0.00b 5.78s -588.00ms 🚀
dist/16.02c68c4f.js 1.18kb +0.00b 5.92s -599.00ms 🚀
dist/heading5.e195aab1.js 1.17kb +0.00b 6.49s -547.00ms 🚀
dist/expand.450f3aea.js 1.16kb +0.00b 6.92s -3.00s 🚀
dist/16.4e3b0235.js 1.14kb +0.00b 5.63s -543.00ms 🚀
dist/16.9ba230ea.js 1.13kb +0.00b 6.51s -405.00ms 🚀
dist/16.a37df53b.js 1.13kb +0.00b 5.63s -543.00ms 🚀
dist/16.9adb4ec7.js 1.13kb +0.00b 5.63s -543.00ms 🚀
dist/16.eafe1a11.js 1.13kb +0.00b 6.51s -351.00ms 🚀
dist/heading2.a2a1be3f.js 1.11kb +0.00b 6.35s -687.00ms 🚀
dist/16.3920766f.js 1.10kb +0.00b 4.42s -575.00ms 🚀
dist/component.6600f83e.js 1.07kb +0.00b 4.42s -576.00ms 🚀
dist/mention.4d64e059.js 1.07kb +0.00b 6.16s -628.00ms 🚀
dist/heading4.ec980e93.js 1.06kb +0.00b 6.49s -547.00ms 🚀
dist/16.afcb09b6.js 1.05kb +0.00b 5.78s -587.00ms 🚀
dist/layout.52ba15f7.js 1.05kb +0.00b 6.02s -661.00ms 🚀
dist/divider.16defde6.js 1.03kb +0.00b 6.01s -664.00ms 🚀
dist/quote.aa25b83c.js 1.02kb +0.00b 6.24s -622.00ms 🚀
dist/action.9aa72b39.js 1.00kb +0.00b 5.92s -599.00ms 🚀
dist/decision.20244046.js 1010.00b +0.00b 6.01s -664.00ms 🚀
dist/panel-warning.97a0e3b3.js 1008.00b +0.00b 6.24s -627.00ms 🚀
dist/list.c9147a62.js 978.00b +0.00b 6.16s -627.00ms 🚀
dist/heading1.7d899ba5.js 976.00b +0.00b 6.35s -43.67s 🚀
dist/panel-error.8d11e8b7.js 906.00b +0.00b 6.16s -625.00ms 🚀
dist/panel.a28c56ee.js 897.00b +0.00b 6.24s -628.00ms 🚀
dist/table.5a4874ee.js 889.00b +0.00b 6.35s -43.67s 🚀
dist/panel-success.9b923e58.js 845.00b +0.00b 6.24s -627.00ms 🚀
dist/panel-note.97a4d541.js 841.00b +0.00b 6.24s -627.00ms 🚀
dist/media-picker-analytics-error-boundary.f8ddfee3.js 839.00b +0.00b 48.46s +19.58s ⚠️
dist/media-card-analytics-error-boundary.73ba4074.js 835.00b +0.00b 53.23s -37.77s 🚀
dist/EmojiPickerComponent.2e54b9c6.js 535.00b +0.00b 53.97s +43.22s ⚠️
dist/simpleHasher.a29b2a8e.js 528.00b +0.00b 55.25s -35.75s 🚀
dist/index.html 119.00b +0.00b 831.00ms +154.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/index.474ded24.js 2.72mb +4.00b ⚠️ 502.00ms -13.00ms

Three.js x4 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

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

Cached Bundles

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

Click here to view a detailed benchmark overview.

@devongovett devongovett merged commit f29d2a5 into v2 Sep 7, 2020
@devongovett devongovett deleted the parcelrc-diagnostics branch September 7, 2020 18:37
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.

3 participants