Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(desktop): run packaged WSL backend from Linux filesystem #5042

ClosedReyJ94(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/5042/headopened View on GitHub

Showing 9 changed files with 100 additions and 9 deletions (loading 8).

x
0 of 9 viewed, 9 left
100 additions and 9 deletionsapps/desktop/src/backend/DesktopBackendConfiguration.test.tsModified
View file
@@ -176,8 +176,21 @@
const entryPath = path.join(baseDir, "app.asar.unpacked/apps/server/dist/bin.mjs");
yield* fileSystem.makeDirectory(path.dirname(entryPath), { recursive: true });
yield* fileSystem.writeFileString(entryPath, "");
+ const archiveHash = "a".repeat(64);
+ yield* fileSystem.writeFileString(
+ path.join(baseDir, "wsl-runtime.tar.gz.sha256"),
+ archiveHash,
+ );
​
const observedDistros: Array<string | null> = [];
+ const observedWindowsConversions: string[] = [];
+ const observedRuntimePreparations: Array<{
+ readonly distro: string | null;
+ readonly windowsArchivePath: string;
+ readonly archiveHash: string;
+ }> = [];
+ const observedNodePtyRoots: string[] = [];
+ const linuxRepoRoot = `/home/test/.cache/t3code/desktop-wsl-runtime/sha256-${archiveHash}`;
const config = yield* Effect.gen(function* () {
const configuration = yield* DesktopBackendConfiguration.DesktopBackendConfiguration;
return yield* configuration.resolveWsl({ port: 5000, distro: null });
@@ -193,12 +206,22 @@
{ name: "Debian", isDefault: false, version: 2 },
{ name: "Ubuntu", isDefault: true, version: 2 },
- windowsToWslPath: (distro) => {
+ windowsToWslPath: (_distro, windowsPath) => {
+ observedWindowsConversions.push(windowsPath);