Skip to content

Commit f7bfb2e

Browse files
committed
feat(file-ops): add debug logging to verify AOT usage
Added FILE_OPS_DEBUG environment variable support to help verify that AOT artifacts are being used correctly. Debug output shows: - Platform detection (e.g., darwin_arm64) - AOT artifact path resolution - Whether AOT or fallback WASM is used Usage: FILE_OPS_DEBUG=1 bazel-bin/tools/file_ops_external/file_ops_external config.json Verified in testing: - AOT artifacts extracted correctly for all 6 platforms - Platform detection working (darwin_arm64 detected) - AOT artifact used by default (not fallback) - File operations complete successfully with AOT - Embedded fallback still works when requested
1 parent 119e413 commit f7bfb2e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/file_ops_external/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ func main() {
4545
if err == nil {
4646
if _, err := os.Stat(aotPath); err == nil {
4747
useAOT = true
48+
if os.Getenv("FILE_OPS_DEBUG") != "" {
49+
log.Printf("DEBUG: Using AOT artifact for platform %s at %s", platformName, aotPath)
50+
}
51+
} else if os.Getenv("FILE_OPS_DEBUG") != "" {
52+
log.Printf("DEBUG: AOT artifact not found at %s: %v", aotPath, err)
4853
}
54+
} else if os.Getenv("FILE_OPS_DEBUG") != "" {
55+
log.Printf("DEBUG: Failed to locate AOT artifact: %v", err)
4956
}
5057

5158
// Build wasmtime command

0 commit comments

Comments
 (0)