aws / language-servers

AWS related Language Servers
Apache License 2.0
23 stars 18 forks source link

Optimise packaging #328

Closed viktorsaws closed 3 months ago

viktorsaws commented 3 months ago

Problem

  1. We use deprecated unsecure vercel/pkg package and mention it as main way of consuming bundled runtime servers, which also takes a lot of time (3-4 minutes per run)
  2. Our github workflows take ~7 minutes in Linux and ~13 minutes on Windows runners to complete. Npm commands called in workflows are wasteful: npm commands in workflow call npm install and npm run compile under the hood 2 or 3 times, which adds up to workflow run times.

Solution

To reduce workflow run times:

  1. Removed using pkg for producing binaries
  2. Removed redundant npm script calls during workflow runs

Result

Run time for all workflows is 3x times faster now, taking ~4 minutes.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ege0zcan commented 3 months ago

Nice change, should we also consider renaming the folder names from -binary to something like -standalone or something else

ege0zcan commented 3 months ago

We also need to update integration tests that make use of executables since they will no longer work:

https://github.com/aws/language-servers/blob/main/app/hello-world-lsp-runtimes/src/tests/helloWorldServerInteg.test.ts#L20-L40

we should instead spawn a child process like node /build/server.js