Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

Description

The client build completes much faster than the server build, causing the Vite URLs to be scrolled away by server build logs. This changes the execution order from parallel([series([clientBuild, clientStart]), series([serverBuild, serverStart])]) to series([parallel([clientBuild, serverBuild]), parallel([clientStart, serverStart])]).

Changes:

  • Refactored client.ts and server.ts to expose separate build* and start* functions
  • Updated build/index.ts to use Promise.all() for parallel builds, then start both apps
  • Added proper error handling with safe property access for promise rejections
  • Added infinite promise to keep main process alive while child processes run

Both applications now start at roughly the same time, preventing the Vite URLs from being buried in server build output.

Type of change

  • 🐞 Bug fix

Checklist

  • I tested my change in a Wasp app to verify that it works as intended.

  • 🧪 Tests and apps:

    • I added unit tests for my change.
    • (if you fixed a bug) I added a regression test for the bug I fixed.
  • 📜 Documentation:

    • (if you added/updated a feature) I added/updated the documentation in web/docs/.
  • 🆕 Changelog:

    • I updated waspc/ChangeLog.md with a user-friendly description of the change.
    • (if you did a breaking change) I added a step to the current migration guide in web/docs/migration-guides/.
    • I bumped the version in waspc/waspc.cabal to reflect the changes I introduced.
Original prompt

This section details on the original issue you should resolve

<issue_title>wasp-app-runner build: Wait until both builds are done before running them</issue_title>
<issue_description>Right now wasp-app-runner does (pseudo code):

parallel([
  series([ clientBuild, clientStart ]),
  series([ serverBuild, serverStart ])
])

This leads to the client usually being ready much sooner than the server, and the Vite message with the URLs being scrolled out by the server build logs.

I think it'd be much better to do:

series([
  parallel([ clientBuild, serverBuild ]),
  parallel([ clientStart, serverStart ])
])

So both sides start more or less at the same time.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update wasp-app-runner to synchronize builds wasp-app-runner: Run client and server builds in parallel before starting apps Dec 17, 2025
Copilot AI requested a review from cprecioso December 17, 2025 15:33
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.

wasp-app-runner build: Wait until both builds are done before running them

2 participants