Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twenty-mangos-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

chore: ignore workerd output (error: CODE_MOVED) not intended for end-user devs
8 changes: 8 additions & 0 deletions packages/wrangler/src/dev/miniflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,9 @@ export function handleRuntimeStdio(stdout: Readable, stderr: Readable) {
isWarning(chunk: string) {
return /\.c\+\+:\d+: warning:/.test(chunk);
},
isCodeMovedWarning(chunk: string) {
return /CODE_MOVED for unknown code block/.test(chunk);
},
};

stdout.on("data", (chunk: Buffer | string) => {
Expand Down Expand Up @@ -780,6 +783,11 @@ export function handleRuntimeStdio(stdout: Readable, stderr: Readable) {
logger.warn(chunk);
}

// known case: "error: CODE_MOVED for unknown code block?", warning for workerd devs, not application devs
else if (classifiers.isCodeMovedWarning(chunk)) {
// ignore entirely, don't even send it to the debug log file
}

// anything not exlicitly handled above should be logged as an error (via stderr)
else {
logger.error(getSourceMappedString(chunk));
Expand Down