Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid downloading already available NPM modules. #152

Merged
merged 2 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
48 changes: 48 additions & 0 deletions bazel/emsdk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/bazel/emscripten_deps.bzl b/bazel/emscripten_deps.bzl
index 95801ba..95fdabd 100644
--- a/bazel/emscripten_deps.bzl
+++ b/bazel/emscripten_deps.bzl
@@ -69,31 +69,3 @@ def emscripten_deps(emscripten_version = "latest"):
build_file = "@emsdk//emscripten_toolchain:emscripten.BUILD",
type = "zip",
)
-
- if "emscripten_npm_linux" not in excludes:
- npm_install(
- name = "emscripten_npm_linux",
- package_json = "@emscripten_bin_linux//:emscripten/package.json",
- package_lock_json = "@emscripten_bin_linux//:emscripten/package-lock.json",
- )
-
- if "emscripten_npm_mac" not in excludes:
- npm_install(
- name = "emscripten_npm_mac",
- package_json = "@emscripten_bin_mac//:emscripten/package.json",
- package_lock_json = "@emscripten_bin_mac//:emscripten/package-lock.json",
- )
-
- if "emscripten_npm_mac_arm64" not in excludes:
- npm_install(
- name = "emscripten_npm_mac",
- package_json = "@emscripten_bin_mac_arm64//:emscripten/package.json",
- package_lock_json = "@emscripten_bin_mac_arm64//:emscripten/package-lock.json",
- )
-
- if "emscripten_npm_win" not in excludes:
- npm_install(
- name = "emscripten_npm_win",
- package_json = "@emscripten_bin_win//:emscripten/package.json",
- package_lock_json = "@emscripten_bin_win//:emscripten/package-lock.json",
- )
diff --git a/bazel/emscripten_toolchain/BUILD.bazel b/bazel/emscripten_toolchain/BUILD.bazel
index eb36959..12dba37 100644
--- a/bazel/emscripten_toolchain/BUILD.bazel
+++ b/bazel/emscripten_toolchain/BUILD.bazel
@@ -13,7 +13,6 @@ filegroup(
"env.sh",
"env.bat",
"@emsdk//:binaries",
- "@emsdk//:node_modules",
"@nodejs//:node_files",
],
)
2 changes: 2 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def proxy_wasm_cpp_sdk_repositories():
# v3.1.7 with Bazel fixes
strip_prefix = "emsdk-0ea8f8a8707070e9a7c83fbb4a3065683bcf1799/bazel",
url = "https://github.com/emscripten-core/emsdk/archive/0ea8f8a8707070e9a7c83fbb4a3065683bcf1799.tar.gz",
patches = ["@proxy_wasm_cpp_sdk//bazel:emsdk.patch"],
patch_args = ["-p2"],
)

maybe(
Expand Down