Best practice for Windows Desktop dev with Serverpod on WSL 2? #4537
-
|
Hi everyone, I'm a solo developer building a app (targeting Windows, macOS Desktop & Mobile) using Serverpod. My Setup: Host: Windows 11 Backend and Deployment: I need to develop on WSL2 (Ubuntu) because I have to deploy to Huawei Cloud ECS. The Problem: Running Moving the serverpod_flutter directory to the Windows file system (C:) may solve the compilation/debug issue, but it complicates the monorepo structure. Specifically, syncing the generated serverpod_client (which lives in WSL) to the Windows side becomes a manual "copy-paste" hassle, and I'm worried about Git conflicts and CI/CD pipelines later on. The Question: What is the recommended workflow/best practice for this Hybrid (WSL Backend + Windows Frontend) setup? Dual Git Clones? Should I clone the repo in both WSL and Windows, and rely on git pull to sync the generated client code? Sync Scripts? Is it better to use a script (like rsync) to push generated client code from WSL to Windows locally? Something else? Is there a standard way to handle this without breaking the development loop? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
https://discord.com/channels/1155780586871468093/1458198399206686871/1458386972199358466 Thanks for the suggestion! Using a git reference is definitely a clean way to decouple dependencies. However, since I'm maintaining this as a Monorepo, I decided to go with a 'Dual Clone' strategy on the Windows side and keep using the local Even though the client code is auto-generated, the development loop feels faster this way. With a git reference, I'd have to push to GitHub and run Plus, having the client source code physically present in the local directory makes debugging (Go to Definition etc.) much easier compared to digging into the pub cache. It feels a bit smoother for my specific workflow, so I wanted to leave this as a note for others who might encounter similar issues. |
Beta Was this translation helpful? Give feedback.
https://discord.com/channels/1155780586871468093/1458198399206686871/1458386972199358466
Thanks for the suggestion! Using a git reference is definitely a clean way to decouple dependencies.
However, since I'm maintaining this as a Monorepo, I decided to go with a 'Dual Clone' strategy on the Windows side and keep using the local
pathdependency (../client).Even though the client code is auto-generated, the development loop feels faster this way. With a git reference, I'd have to push to GitHub and run
flutter pub upgradeon Windows for every schema change. With the dual clone setup, a simplegit pullupdates the generated files locally, allowing the compiler to pick them up immediately.P…