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

VS Code Extension for Parcel #8139

Merged
merged 44 commits into from
Jul 31, 2022
Merged

VS Code Extension for Parcel #8139

merged 44 commits into from
Jul 31, 2022

Conversation

thebriando
Copy link
Contributor

@thebriando thebriando commented May 24, 2022

↪️ Pull Request

How it works

image

Parcel LSP Reporter

buildProgress events report information during each Parcel phase and we translate these events into VS Code’s Work Done Progress events.

buildFailure events return an array of Parcel Diagnostic's, which we translate into VS Code Diagnostics.

The reporter will also create a descriptor file that contains information about the Parcel process, and the translated diagnostics will be emitted through the IPC server.

LSP Server

The LSP Server will watch for Parcel descriptors created by the reporter, establish an IPC client connection for each Parcel process, and report the diagnostics that are received from the reporter to each client.

How to use it

https://github.com/parcel-bundler/parcel/blob/vscode-extension/packages/utils/parcelforvscode/README.md

Todo

  • Publish to VS Code Marketplace
  • Hints
  • Quick fix

💻 Examples

Build phase progress messages in VS Code
image

Parcel diagnostics in VS Code
image

🚨 Test instructions

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@mischnic
Copy link
Member

I think it would be nice to always show something in the status bus when the extension is connected to a Parcel instance (similar to the Flow extension, so like a static progress message)?

@parcel-benchmark
Copy link

parcel-benchmark commented May 25, 2022

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 2.36s +372.00ms ⚠️
Cached 406.00ms +29.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 389.00ms +55.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 391.00ms +56.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 391.00ms +55.00ms ⚠️
dist/legacy/index.2c76ad23.js 1.66kb +0.00b 712.00ms +101.00ms ⚠️
dist/legacy/index.8aaa89c9.js 1.20kb +0.00b 712.00ms +100.00ms ⚠️
dist/modern/index.6be20f01.js 1.13kb +0.00b 712.00ms +100.00ms ⚠️
dist/legacy/index.html 826.00b +0.00b 904.00ms +127.00ms ⚠️
dist/modern/index.html 749.00b +0.00b 903.00ms +127.00ms ⚠️
dist/legacy/index.b8ae99ba.css 94.00b +0.00b 408.00ms +64.00ms ⚠️
dist/modern/index.31cedca9.css 94.00b +0.00b 407.00ms +62.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 357.00ms +44.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 357.00ms +44.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 357.00ms +43.00ms ⚠️
dist/legacy/index.2c76ad23.js 1.66kb +0.00b 668.00ms +92.00ms ⚠️
dist/legacy/index.8aaa89c9.js 1.20kb +0.00b 667.00ms +92.00ms ⚠️
dist/modern/index.6be20f01.js 1.13kb +0.00b 667.00ms +92.00ms ⚠️
dist/legacy/index.html 826.00b +0.00b 819.00ms +86.00ms ⚠️
dist/modern/index.html 749.00b +0.00b 818.00ms +85.00ms ⚠️
dist/legacy/index.b8ae99ba.css 94.00b +0.00b 366.00ms +43.00ms ⚠️
dist/modern/index.31cedca9.css 94.00b +0.00b 366.00ms +43.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 11.68s +239.00ms
Cached 507.00ms -7.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 486.39kb +0.00b 6.46s +332.00ms ⚠️
dist/PermalinkedComment.46b19af5.js 4.21kb +0.00b 6.46s +331.00ms ⚠️
dist/UserProfile.f8cd7884.js 1.57kb +0.00b 6.46s +331.00ms ⚠️
dist/NotFound.960ab92b.js 429.00b +0.00b 6.46s +331.00ms ⚠️
dist/logo.c5bb83f1.png 246.00b +0.00b 6.41s +331.00ms ⚠️

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 2.00m -4.18s
Cached 2.97s -361.00ms 🚀

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/index.1fa5b6e7.js 3.33mb +0.00b 38.52s -2.51s 🚀
dist/EmojiPickerComponent.9d8e543c.js 187.29kb +0.00b 38.54s -2.53s 🚀
dist/mobile-upload.b893855e.js 68.22kb +0.00b 38.52s -2.51s 🚀
dist/mobile-upload.bf388fdf.js 8.10kb +0.00b 38.52s -2.51s 🚀
dist/EmojiPickerComponent.16132f88.js 5.54kb +0.00b 38.52s -2.51s 🚀
dist/ResourcedEmojiComponent.bef36b85.js 2.68kb +0.00b 38.52s -2.52s 🚀
dist/date.728667d8.js 2.10kb +0.00b 38.52s -2.52s 🚀
dist/images.0fe0f35c.js 2.05kb +0.00b 38.52s -2.52s 🚀
dist/status.2160efcd.js 1.82kb +0.00b 38.53s -2.52s 🚀
dist/workerHasher.0904bc5b.js 1.72kb +0.00b 38.52s -2.51s 🚀
dist/code.414e2c00.js 1.72kb +0.00b 38.52s -2.52s 🚀
dist/list-number.2be0cd6c.js 1.62kb +0.00b 38.52s -2.52s 🚀
dist/link.1e33efbb.js 1.43kb +0.00b 38.52s -2.52s 🚀
dist/emoji.5404dc09.js 1.40kb +0.00b 38.52s -2.52s 🚀
dist/mention.85e501f2.js 1.24kb +0.00b 38.53s -2.51s 🚀
dist/layout.dde5aa7a.js 1.20kb +0.00b 38.52s -2.52s 🚀
dist/divider.3af42f3a.js 1.20kb +0.00b 38.52s -2.52s 🚀
dist/action.633b1d3a.js 1.17kb +0.00b 38.52s -2.52s 🚀
dist/heading1.216107b4.js 1.17kb +0.00b 38.53s -2.53s 🚀
dist/list.1bd3e768.js 1.14kb +0.00b 38.52s -2.52s 🚀
dist/quote.707178c1.js 1.14kb +0.00b 38.53s -2.52s 🚀
dist/decision.5c187f01.js 1.12kb +0.00b 38.52s -2.52s 🚀
dist/panel-warning.817f153e.js 1.10kb +0.00b 38.53s -2.52s 🚀
dist/table.71e953fa.js 1.08kb +0.00b 38.53s -2.52s 🚀
dist/panel.63b53aef.js 1.02kb +0.00b 38.53s -2.52s 🚀
dist/panel-error.3c204bc9.js 1019.00b +0.00b 38.53s -2.51s 🚀
dist/panel-success.bfed2890.js 960.00b +0.00b 38.53s -2.51s 🚀
dist/panel-note.badaa0b2.js 950.00b +0.00b 38.53s -2.51s 🚀
dist/simpleHasher.2e0de700.js 742.00b +0.00b 38.52s -2.51s 🚀

Three.js ✅

Timings

Description Time Difference
Cold 7.64s -1.06s 🚀
Cached 381.00ms +20.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/Three.js 580.04kb +0.00b 5.35s -890.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/Three.js 580.04kb +0.00b 5.66s -882.00ms 🚀

Click here to view a detailed benchmark overview.

Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we wanna merge this and iterate or is this waiting for something?

@thebriando
Copy link
Contributor Author

@devongovett Yeah we could probably merge this. I think I was just waiting to publish the extension to the Marketplace but I can do that in a separate task

@devongovett devongovett merged commit 56e621e into v2 Jul 31, 2022
@devongovett devongovett deleted the vscode-extension branch July 31, 2022 18:48
gorakong pushed a commit that referenced this pull request Nov 3, 2022
* upstream/v2: (22 commits)
  Cross compile toolchains are built into docker image already
  Also fix release build
  Update centos node version
  v2.7.0
  Changelog for v2.7.0
  Use placeholder expression when replacing unused symbols (#8358)
  Lint (#8359)
  Add support for errorRecovery option in @parcel/transformer-css (#8352)
  VS Code Extension for Parcel (#8139)
  Add multi module compilation for elm (#8076)
  Bump terser from 5.7.2 to 5.14.2 (#8322)
  Bump node-forge from 1.2.1 to 1.3.0 (#8271)
  allow cjs config files on type module projects (#8253)
  inject script for hmr when there is only normal script in html (#8330)
  feat: support react refresh for @emotion/react (#8205)
  Update index.d.ts (#8293)
  remove charset from jsloader script set (#8346)
  Log resolved targets in verbose log level (#8254)
  Fix missing module in large app from Experimental Bundler (#8303)
  [Symbol Propagation] Non-deterministic bundle hashes (#8212)
  ...
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.

7 participants