Commit f280104
fix: resolve TinyGo compilation with file_ops workspace directory
Fixed critical issue where TinyGo couldn't find Go source files due to
sandbox isolation between file_ops and TinyGo actions. Two key fixes:
1. **File ops local execution**: Added `execution_requirements: local: 1`
to file_ops action to ensure output directory is created in execroot
(not in sandbox) where TinyGo can access it.
2. **Absolute path in config**: Changed file_ops_actions.bzl to use
workspace_dir.path (absolute) instead of short_path (relative) so that
when file_ops runs locally, it creates the directory at the exact
location Bazel expects.
3. **Directory permissions**: Made the entire workspace directory tree
writable in the TinyGo wrapper script with `chmod -R +w .`
4. **Source file destinations**: Fixed setup_go_module_action to use
src.basename for destination paths so files are actually copied to
the workspace.
These changes ensure Go module workspaces are properly prepared and
accessible during TinyGo compilation, resolving the "no Go files found"
error while maintaining hermetic builds.
Tests: calculator_component now builds successfully with TinyGo
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent feb1c78 commit f280104
2 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
712 | 713 | | |
713 | 714 | | |
714 | 715 | | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
715 | 728 | | |
716 | 729 | | |
717 | 730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| 235 | + | |
| 236 | + | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
| |||
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
264 | 280 | | |
265 | 281 | | |
266 | 282 | | |
267 | | - | |
| 283 | + | |
268 | 284 | | |
269 | 285 | | |
270 | 286 | | |
| |||
0 commit comments