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

Refactor LSP to use vscode-jsonrpc #8728

Merged
merged 8 commits into from
Jan 4, 2023
Merged

Refactor LSP to use vscode-jsonrpc #8728

merged 8 commits into from
Jan 4, 2023

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Dec 30, 2022

This makes the connection LSP server <-> Parcel reporter plugin typed by using vscode-jsonrpc instead of node-ipc. (Also also makes it individual connections, so that request-based features work as well, as opposed to just broadcasting).

With that, also add diagnostics based on symbol data (these are computed on demand, with a pull-based model when opening a file instead of being pushed on buildSuccess from the reporter). For that to work, the server now tries to find the matching Parcel instance via the longest common prefix between document filepath and the Parcel project root.

Bildschirm­foto 2022-12-31 um 00 24 29

Bildschirm­foto 2022-12-31 um 00 24 35

@parcel-benchmark
Copy link

parcel-benchmark commented Dec 31, 2022

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.43s -2.00ms
Cached 313.00ms -1.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 81.00ms -150.00ms 🚀
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 82.00ms -150.00ms 🚀
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 81.00ms -151.00ms 🚀
dist/legacy/index.html 826.00b +0.00b 484.00ms -29.00ms 🚀
dist/modern/index.html 749.00b +0.00b 483.00ms -29.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 84.00ms -145.00ms 🚀
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 84.00ms -146.00ms 🚀
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 84.00ms -145.00ms 🚀
dist/legacy/index.html 826.00b +0.00b 518.00ms +32.00ms ⚠️
dist/modern/index.html 749.00b +0.00b 517.00ms +31.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 9.36s -3.00ms
Cached 427.00ms +13.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.58m -483.00ms
Cached 2.17s +50.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Three.js ✅

Timings

Description Time Difference
Cold 6.71s -2.00ms
Cached 256.00ms -8.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

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.

lgtm, but maybe someone more familiar with the extension should review

@mischnic mischnic merged commit 3456eaf into v2 Jan 4, 2023
@mischnic mischnic deleted the lsp-refactor branch January 4, 2023 20:20
marcins pushed a commit to marcins/parcel that referenced this pull request Jul 14, 2023
* upstream/v2: (33 commits)
  v2.8.3
  Changelog for v2.8.3
  Address bug by updating an asset reference and merge conditions (parcel-bundler#8762)
  Fix CSS order when merging type change bundles (parcel-bundler#8766)
  fixing failing build for contributors on Linux using Node 18 (parcel-bundler#8763)
  Extension: Importers View and separate LSP protocol package (parcel-bundler#8747)
  Bump swc to fix sourcemaps with Windows line endings (parcel-bundler#8756)
  Apply HMR updates in topological order (parcel-bundler#8752)
  Make extension packaging work (parcel-bundler#8730)
  Typed api.storeResult (parcel-bundler#8732)
  Refactor LSP to use vscode-jsonrpc (parcel-bundler#8728)
  Bump swc (parcel-bundler#8742)
  Recursively check reachability when removing asset graphs from bundles in deduplication (parcel-bundler#6004)
  Fix tsc sourcemaps metadata (parcel-bundler#8734)
  Assigning to `this` in CommonJS (parcel-bundler#8737)
  Don't retarget dependencies if a symbol is imported multiple times with different local names (parcel-bundler#8738)
  Add a note about using flow in CONTRIBUTING.md (parcel-bundler#8731)
  filter out title execArgv to workers (parcel-bundler#8719)
  Document more of the BundleGraph class (parcel-bundler#8711)
  Fixed the hmr connection with host 0.0.0.0 (parcel-bundler#7357)
  ...
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.

None yet

4 participants