galaxyproject / galaxyproject/loom

Windows: Squirrel Setup.exe blocked by nuget MAX_PATH on the deeply-nested staged bundle

Open
#343 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14
Forks
12
Avg merge
6d 5h
Merged PRs (30d)
17

Description

Follow-up to #337, which ships Windows as a portable `.zip` and gates the Squirrel installer behind `LOOM_WIN_SQUIRREL=1`.

## Problem
The first real run of the win32 Squirrel maker (in the 0.5.0 release build) fails in two steps:
1. `Authors is required` -- electron-winstaller needs `` in the generated nuspec. Fixed (authors field, folded into #337's gated config).
2. `nuget pack ... The specified path, file name, or both are too long` -- the Win32 260-char MAX_PATH.

## Why it's hard
- The deepest staged path is `@earendil-works/pi-coding-agent/node_modules/@mistralai/mistralai/esm/models/operations/<~98-char auto-generated filename>.js`.
- The Loom CLI ships via `extraResource` as real files (not asar) because it's spawned as a subprocess (`process.resourcesPath/loom/bin/loom.js`), so the depth can't be collapsed into an asar.
- There are two `@mistralai/mistralai` copies at different versions (top-level + nested under pi-coding-agent), so `npm dedupe` can't hoist the nested one.

## Tried, insufficient
- Strip runtime-irrelevant `.ts`/`.map` files from the win32 staged node_modules -> deepest source path down to 254 (< 260), but nuget still fails.
- `LongPathsEnabled` registry + `git config --system core.longpaths true` -- the bundled NuGet (.NET Framework) ignores it.
- Short `TEMP`/`TMP` (`C:\t`) for the destination side -- confirmed applied, still fails.
- A diagnostic (postPackage hook logging the deepest packaged path) confirmed the deepest *source* file is 254. nuget builds a longer *internal* staging path (`lib\net45\` + a package-id dir + the ~215-char relative) that clears 260 on its own.

## Options for the real fix
- Remove unused provider SDKs (Mistral, maybe AWS/Bedrock) from the staged bundle -- but pi statically imports them, so this needs runtime verification that they're lazy-loaded before it's safe.
- Bundle/compile the Loom CLI so it doesn't ship raw `node_modules` (bigger change).
- Switch the Windows installer to a maker that handles long paths (WiX/MSI or NSIS).
- Flatten the nested `@mistralai/mistralai` another way.

## How to iterate
`gh workflow run release.yml --ref ` builds all installers with no publish and no npm; set `LOOM_WIN_SQUIRREL=1` to exercise the Squirrel maker.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with release.yml and the gated Squirrel path, then reproduce the win32 maker with LOOM_WIN_SQUIRREL=1 using the documented gh workflow command. Inspect the staged bundle and NuGet path behavior described in the issue. Done means the Windows Squirrel build completes without the MAX_PATH failure and produces its installer.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
build-system, desktop, release
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.