You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENT_DOCS/PLANS/BUILD_JOB.md
+48-3Lines changed: 48 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,24 @@ The build system will target the following architectures:
40
40
41
41
## Implementation Plan
42
42
43
+
### Key Technical Challenges and Solutions
44
+
45
+
#### Cross-Platform Binary Embedding
46
+
47
+
**Challenge**: The `go:embed` directive requires files to exist at compile time with exact path matches. On Windows, the ast-grep binary is downloaded as `ast-grep.exe`, but the embed directive looks for `bin/ast-grep`.
48
+
49
+
**Solution**: Platform-specific handling in the GitHub Actions workflow:
50
+
-**Linux/macOS**: Extract binary directly to `cmd/server/bin/ast-grep`
51
+
-**Windows**: Extract to temporary directory, then copy `ast-grep.exe` to `cmd/server/bin/ast-grep` (removing .exe extension)
52
+
53
+
This ensures the embedded binary works across all platforms while maintaining a consistent internal file structure.
54
+
55
+
#### PowerShell Archive Extraction Issues
56
+
57
+
**Challenge**: Initial attempts using `7z` for Windows extraction failed due to PowerShell parameter parsing conflicts.
58
+
59
+
**Solution**: Switched to PowerShell's built-in `Expand-Archive` cmdlet, which is more reliable in the GitHub Actions PowerShell environment and handles parameter parsing correctly.
0 commit comments