Skip to content

build: use WEB_GO for web targets and preserve backend dist directory#1671

Merged
wj-xiao merged 1 commit intosipeed:mainfrom
wj-xiao:chore/web_go_toolchain
Mar 17, 2026
Merged

build: use WEB_GO for web targets and preserve backend dist directory#1671
wj-xiao merged 1 commit intosipeed:mainfrom
wj-xiao:chore/web_go_toolchain

Conversation

@wj-xiao
Copy link
Collaborator

@wj-xiao wj-xiao commented Mar 17, 2026

📝 Description

Separate the web Go toolchain from the default project Go toolchain so web targets can enable CGO on Darwin without affecting the rest of the repository. This also preserves web/backend/dist after frontend backend builds by recreating .gitkeep, so the embedded output directory remains tracked.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

N/A

📚 Technical Context (Skip for Docs)

  • Reference URL: N/A (internal build/tooling change)
  • Reasoning: Keep the default root GO toolchain unchanged while allowing web-specific build, test, and vet commands to use CGO_ENABLED=1 on Darwin. Also restore web/backend/dist/.gitkeep after vite build --emptyOutDir so the embedded backend output directory stays tracked in git.

🧪 Test Environment

  • Hardware: PC
  • OS: macOS
  • Model/Provider: N/A (build tooling change)
  • Channels: N/A (build tooling change)

📸 Evidence (Optional)

Click to view Logs/Screenshots
make check
- Go test suite passed
- web/backend tests passed with CGO-enabled web toolchain
- frontend eslint passed

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

Separate web Go commands from the default Go toolchain so web builds,
tests, and vet can enable CGO on Darwin without affecting the rest of
the project. Also ensure frontend backend builds recreate backend/dist
with a .gitkeep file so the embedded output directory remains tracked.
@wj-xiao wj-xiao merged commit 0499cda into sipeed:main Mar 17, 2026
4 checks passed
alexhoshina pushed a commit to alexhoshina/picoclaw that referenced this pull request Mar 17, 2026
…sipeed#1671)

Separate web Go commands from the default Go toolchain so web builds,
tests, and vet can enable CGO on Darwin without affecting the rest of
the project. Also ensure frontend backend builds recreate backend/dist
with a .gitkeep file so the embedded output directory remains tracked.
j0904 pushed a commit to j0904/picoclaw that referenced this pull request Mar 22, 2026
…sipeed#1671)

Separate web Go commands from the default Go toolchain so web builds,
tests, and vet can enable CGO on Darwin without affecting the rest of
the project. Also ensure frontend backend builds recreate backend/dist
with a .gitkeep file so the embedded output directory remains tracked.
@wj-xiao wj-xiao deleted the chore/web_go_toolchain branch March 23, 2026 01:53
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.

3 participants