From 593a5df61c3f296cf2dd984129708d2ece259bdb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 10 Sep 2026 07:14:28 +0000 Subject: [PATCH] build: make webmcp-types sources genrule cross-platform Replace `sed -i` in-place substitution with direct stdout redirection from the source file to destination outputs. `sed -i` behaves differently between GNU and BSD sed, which caused build failures on macOS. --- packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel b/packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel index 7c8b81f55d5..6c5ab54932b 100644 --- a/packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel +++ b/packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel @@ -11,11 +11,9 @@ genrule( cmd = """ readonly SRC_DIR="$(location //packages/core:node_modules/@mcp-b/webmcp-types/dir)" mkdir -p "$$(dirname "$(location dist/common.d.ts)")" - cp "$${SRC_DIR}/dist/common.d.ts" "$(location dist/common.d.ts)" # Rewrite bare imports of @modelcontextprotocol/server to use the vendored relative path - sed -i 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$(location dist/common.d.ts)" || true - cp "$${SRC_DIR}/dist/json-schema.d.ts" "$(location dist/json-schema.d.ts)" - sed -i 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$(location dist/json-schema.d.ts)" || true + sed 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$${SRC_DIR}/dist/common.d.ts" > "$(location dist/common.d.ts)" + sed 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$${SRC_DIR}/dist/json-schema.d.ts" > "$(location dist/json-schema.d.ts)" cp "$${SRC_DIR}/LICENSE" "$(location LICENSE)" """, )