From 7d5395ccd618342db3acddbca61aeefe90eebd80 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 11 May 2021 09:10:45 +0200 Subject: [PATCH 01/10] Upgrade rules-nodes to version 3.4.2 No particularly strong reason for doing that. I just like staying up2date. changelog_begin changelog_end --- deps.bzl | 4 +- docs/BUILD.bazel | 197 +--------------------- language-support/ts/eslint.bzl | 1 - language-support/ts/packages/package.json | 2 +- language-support/ts/packages/yarn.lock | 8 +- navigator/frontend/BUILD.bazel | 9 +- package.json | 2 +- yarn.lock | 8 +- 8 files changed, 17 insertions(+), 214 deletions(-) diff --git a/deps.bzl b/deps.bzl index 07bcb93d3c6c..e9dfc02d5189 100644 --- a/deps.bzl +++ b/deps.bzl @@ -41,8 +41,8 @@ buildifier_version = "4.0.0" buildifier_sha256 = "0d3ca4ed434958dda241fb129f77bd5ef0ce246250feed2d5a5470c6f29a77fa" zlib_version = "1.2.11" zlib_sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff" -rules_nodejs_version = "2.3.1" -rules_nodejs_sha256 = "121f17d8b421ce72f3376431c3461cd66bfe14de49059edc7bb008d5aebd16be" +rules_nodejs_version = "3.5.0" +rules_nodejs_sha256 = "10f534e1c80f795cffe1f2822becd4897754d18564612510c59b3c73544ae7c6" rules_jvm_external_version = "3.3" rules_jvm_external_sha256 = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab" rules_go_version = "0.23.6" diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 5b4ac151172d..9b0fb0cf4a42 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -40,202 +40,7 @@ genrule( ], ) + [ # we need to list all the transitive dependencies here because of https://github.com/bazelbuild/rules_nodejs/issues/1553 - "@npm//acorn", - "@npm//acorn-node", - "@npm//acorn-walk", - "@npm//ansi-regex", - "@npm//ansi-styles", - "@npm//anymatch", - "@npm//assert", - "@npm//async", - "@npm//async-each", - "@npm//balanced-match", - "@npm//basic-auth", - "@npm//batch", - "@npm//binary-extensions", - "@npm//body", - "@npm//brace-expansion", - "@npm//browserify", - "@npm//browserify-cache-api", - "@npm//browserify-incremental", - "@npm//browserify-zlib", - "@npm//browser-pack", - "@npm//browser-resolve", - "@npm//buffer", - "@npm//buffer-from", - "@npm//bytes", - "@npm//cached-path-relative", - "@npm//chalk", - "@npm//chokidar", - "@npm//coffeescript", - "@npm//color-convert", - "@npm//colors", - "@npm//combine-source-map", - "@npm//concat-map", - "@npm//concat-stream", - "@npm//connect", - "@npm//connect-livereload", - "@npm//console-browserify", - "@npm//constants-browserify", - "@npm//continuable-cache", - "@npm//convert-source-map", - "@npm//core-util-is", - "@npm//cross-spawn", - "@npm//crypto-browserify", - "@npm//dargs", - "@npm//dash-ast", - "@npm//dateformat", - "@npm//defined", - "@npm//depd", - "@npm//deps-sort", - "@npm//destroy", - "@npm//detective", - "@npm//domain-browser", - "@npm//duplexer", - "@npm//duplexer2", - "@npm//ee-first", - "@npm//encodeurl", - "@npm//error", - "@npm//escape-html", - "@npm//escape-string-regexp", - "@npm//etag", - "@npm//eventemitter2", - "@npm//events", - "@npm//exit", - "@npm//fast-safe-stringify", - "@npm//faye-websocket", - "@npm//figures", - "@npm//file-sync-cmp", - "@npm//finalhandler", - "@npm//findup-sync", - "@npm//fresh", - "@npm//fs.realpath", - "@npm//function-bind", - "@npm//gaze", - "@npm//get-assigned-identifiers", - "@npm//getobject", - "@npm//glob", - "@npm//glob-parent", - "@npm//globule", - "@npm//graceful-fs", - "@npm//grunt", - "@npm//grunt-banner", - "@npm//grunt-browserify", - "@npm//grunt-contrib-clean", - "@npm//grunt-contrib-connect", - "@npm//grunt-contrib-copy", - "@npm//grunt-contrib-sass", - "@npm//grunt-contrib-uglify", - "@npm//grunt-contrib-watch", - "@npm//grunt-exec", - "@npm//grunt-legacy-log", - "@npm//grunt-legacy-log-utils", - "@npm//grunt-legacy-util", - "@npm//grunt-open", - "@npm//gzip-size", - "@npm//has", - "@npm//has-ansi", - "@npm//has-flag", - "@npm//hooker", - "@npm//htmlescape", - "@npm//http-errors", - "@npm//http-parser-js", - "@npm//https-browserify", - "@npm//iconv-lite", - "@npm//inflight", - "@npm//inherits", - "@npm//inline-source-map", - "@npm//insert-module-globals", - "@npm//is-binary-path", - "@npm//is-number-like", - "@npm//is-wsl", - "@npm//jsonparse", - "@npm//json-stable-stringify", - "@npm//JSONStream", - "@npm//js-yaml", - "@npm//labeled-stream-splicer", - "@npm//lodash", - "@npm//lodash.isfinite", - "@npm//lodash.memoize", - "@npm//lru-cache", - "@npm//matchdep", - "@npm//maxmin", - "@npm//mime-db", - "@npm//mime-types", - "@npm//minimatch", - "@npm//mkdirp", - "@npm//module-deps", - "@npm//morgan", - "@npm//node-http2", - "@npm//nopt", - "@npm//normalize-path", - "@npm//number-is-nan", - "@npm//object-assign", - "@npm//once", - "@npm//on-finished", - "@npm//on-headers", - "@npm//opn", - "@npm//os-browserify", - "@npm//parents", - "@npm//parseurl", - "@npm//path-browserify", - "@npm//path-dirname", - "@npm//path-is-absolute", - "@npm//path-platform", - "@npm//portscanner", - "@npm//pretty-bytes", - "@npm//process", - "@npm//process-nextick-args", - "@npm//punycode", - "@npm//querystring-es3", - "@npm//raw-body", - "@npm//readable-stream", - "@npm//readdirp", - "@npm//read-only-stream", - "@npm//remove-trailing-separator", - "@npm//rimraf", - "@npm//safe-buffer", - "@npm//safe-json-parse", - "@npm//safer-buffer", - "@npm//send", - "@npm//serve-index", - "@npm//serve-static", - "@npm//setprototypeof", - "@npm//shasum", - "@npm//shasum-object", - "@npm//sprintf-js", - "@npm//statuses", - "@npm//stream-browserify", - "@npm//stream-combiner2", - "@npm//stream-http", - "@npm//stream-splicer", - "@npm//string_decoder", - "@npm//string-template", - "@npm//strip-ansi", - "@npm//supports-color", - "@npm//syntax-error", - "@npm//through", - "@npm//through2", - "@npm//timers-browserify", - "@npm//tiny-lr", - "@npm//tty-browserify", - "@npm//uglify-js", - "@npm//umd", - "@npm//undeclared-identifiers", - "@npm//underscore.string", - "@npm//unpipe", - "@npm//upath", - "@npm//uri-path", - "@npm//url", - "@npm//util", - "@npm//util-deprecate", - "@npm//utils-merge", - "@npm//vm-browserify", - "@npm//watchify", - "@npm//websocket-driver", - "@npm//websocket-extensions", - "@npm//wrappy", - "@npm//xtend", + "@npm//:node_modules", ], outs = ["da_theme.tar.gz"], cmd = """ diff --git a/language-support/ts/eslint.bzl b/language-support/ts/eslint.bzl index d8136eb7e998..09e2f924cd93 100644 --- a/language-support/ts/eslint.bzl +++ b/language-support/ts/eslint.bzl @@ -17,7 +17,6 @@ def eslint_test(name, srcs, tsconfig = ":tsconfig.json", eslintrc = ":.eslintrc. eslint_deps = [ "@language_support_ts_deps//@typescript-eslint", "@language_support_ts_deps//@typescript-eslint/eslint-plugin", - "@language_support_ts_deps//tsutils", ] if not is_windows else [] templated_args = [ "--config", diff --git a/language-support/ts/packages/package.json b/language-support/ts/packages/package.json index 5fe745097939..0be243e64c5e 100644 --- a/language-support/ts/packages/package.json +++ b/language-support/ts/packages/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@bazel/hide-bazel-files": "1.7.0", - "@bazel/typescript": "^2.3.1", + "@bazel/typescript": "^3.4.2", "@types/jest": "^26.0.20", "@types/lodash": "4.14.161", "@types/react": "^16.9.20", diff --git a/language-support/ts/packages/yarn.lock b/language-support/ts/packages/yarn.lock index cb8030a1c233..988c6420e925 100644 --- a/language-support/ts/packages/yarn.lock +++ b/language-support/ts/packages/yarn.lock @@ -294,10 +294,10 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-1.7.0.tgz#7cb140c23c4269d6464c24be0a2acf0241d2a31d" integrity sha512-pvdyRX/EsU8n+oElFb+OZ9i5M48HNFR+Z4D3vc0qDGiJ8oly9fZcUb2gbw4CzyeovJz0IzjSxjqMS6cp5gKoeg== -"@bazel/typescript@^2.3.1": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-2.3.3.tgz#8f238a6d395140cdc6ed6900f0861efb744ca91b" - integrity sha512-tkkrV1wrpMKj7gDlgloo/24lGmW5btHxzg9xqBZsXVvEfhr3HP9dU296bBxtdS1zZuORCxdIhh7D3iPonQDibg== +"@bazel/typescript@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.4.2.tgz#183cb14d1f4149cc67ed2723c4b8a7366da5ec36" + integrity sha512-JtLdPOC7rytALJBxawxTCnxVopGstk2eXFs56zHBy+JWSeqrnwujeWZyK5qZHzpag02/JtIQ/ZKkM/DQtrXC8Q== dependencies: protobufjs "6.8.8" semver "5.6.0" diff --git a/navigator/frontend/BUILD.bazel b/navigator/frontend/BUILD.bazel index 50b08910c5c3..84865e76ac7e 100644 --- a/navigator/frontend/BUILD.bazel +++ b/navigator/frontend/BUILD.bazel @@ -41,12 +41,11 @@ filegroup( # a custom node.js binary that has access to all plugins loaded by webpack at runtime. nodejs_binary( name = "webpack", - entry_point = "@navigator_frontend_deps//:node_modules/webpack/bin/webpack.js", - node_modules = "@navigator_frontend_deps//:node_modules", # The webpack build step requires almost all of the node_modules dependencies - # data = [ - # ... - # ], + data = [ + "@navigator_frontend_deps//:node_modules", + ], + entry_point = "@navigator_frontend_deps//:node_modules/webpack/bin/webpack.js", ) # TODO (drsk) We should switch the frontend rule to use the bazel typescript rules instead of diff --git a/package.json b/package.json index b50a342c5d82..63ea77fc3665 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,6 @@ }, "devDependencies": { "@bazel/hide-bazel-files": "1.7.0", - "@bazel/typescript": "2.0.1" + "@bazel/typescript": "3.4.2" } } diff --git a/yarn.lock b/yarn.lock index bffcc1b314c3..56c48145f418 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,10 +7,10 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-1.7.0.tgz#7cb140c23c4269d6464c24be0a2acf0241d2a31d" integrity sha512-pvdyRX/EsU8n+oElFb+OZ9i5M48HNFR+Z4D3vc0qDGiJ8oly9fZcUb2gbw4CzyeovJz0IzjSxjqMS6cp5gKoeg== -"@bazel/typescript@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-2.0.1.tgz#f99405ce53e2d16a98f9b66da42bff9f5c055c24" - integrity sha512-zoaxp57m8WbBILv8MlNEcRf1xRbtvAyDAy2nekEy2RhvCx96slZ5+JJIQJ7AW6teb37iqvurg1OvNZsO/1bc7Q== +"@bazel/typescript@3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.4.2.tgz#183cb14d1f4149cc67ed2723c4b8a7366da5ec36" + integrity sha512-JtLdPOC7rytALJBxawxTCnxVopGstk2eXFs56zHBy+JWSeqrnwujeWZyK5qZHzpag02/JtIQ/ZKkM/DQtrXC8Q== dependencies: protobufjs "6.8.8" semver "5.6.0" From 71c2eecb38944bf3af3c9f9a8ebac2f82aa23031 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 13:15:55 +0200 Subject: [PATCH 02/10] Patch Windows changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 26 ++++++++++++++++++++ deps.bzl | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 bazel_tools/rules_nodejs_windows_mkdir.patch diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch new file mode 100644 index 000000000000..f751d19684cf --- /dev/null +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -0,0 +1,26 @@ +diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl +index 3c07b3a0..8356e71a 100644 +--- a/internal/npm_install/npm_install.bzl ++++ b/internal/npm_install/npm_install.bzl +@@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): + to_segments = to.split("/") + if len(to_segments) > 1: + dirname = "/".join(to_segments[:-1]) ++ args = ["mkdir", "-p", dirname] if not is_windows_os(repository_ctx) else ["cmd", "/c", "if not exist {dir} mkdir {dir}".format(dir = dirname)] + result = repository_ctx.execute( +- ["mkdir", "-p", dirname], ++ args, + quiet = repository_ctx.attr.quiet, + ) + if result.return_code: +@@ -344,8 +345,9 @@ def _copy_file(repository_ctx, f): + + # copy the file; don't use the repository_ctx.template trick with empty substitution as this + # does not copy over binary files properly ++ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "cp /y {} {}".format(repository_ctx.path(f), to)] + result = repository_ctx.execute( +- ["cp", "-f", repository_ctx.path(f), to], ++ cp_args, + quiet = repository_ctx.attr.quiet, + ) + if result.return_code: diff --git a/deps.bzl b/deps.bzl index e9dfc02d5189..04ad7183afc0 100644 --- a/deps.bzl +++ b/deps.bzl @@ -204,6 +204,8 @@ def daml_deps(): # Work around for https://github.com/bazelbuild/rules_nodejs/issues/1565 "@com_github_digital_asset_daml//bazel_tools:rules_nodejs_npm_cli_path.patch", "@com_github_digital_asset_daml//bazel_tools:rules_nodejs_node_dependency.patch", + # Can be upstreamed + "@com_github_digital_asset_daml//bazel_tools:rules_nodejs_windows_mkdir.patch", ], patch_args = ["-p1"], ) From 25bd1cb9cb104550c4dad2f384abc51e8a04ad71 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 13:36:09 +0200 Subject: [PATCH 03/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index f751d19684cf..b41441c136c5 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..8356e71a 100644 +index 3c07b3a0..13af547e 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -17,7 +17,7 @@ index 3c07b3a0..8356e71a 100644 # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly -+ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "cp /y {} {}".format(repository_ctx.path(f), to)] ++ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format(repository_ctx.path(f), to)] result = repository_ctx.execute( - ["cp", "-f", repository_ctx.path(f), to], + cp_args, From 9998dc29b9badc72b6ae9aedfaffcd06b3f0a9c8 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 13:42:37 +0200 Subject: [PATCH 04/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index b41441c136c5..68908491ba2f 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..13af547e 100644 +index 3c07b3a0..e3e38f1d 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -13,7 +13,7 @@ index 3c07b3a0..13af547e 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: -@@ -344,8 +345,9 @@ def _copy_file(repository_ctx, f): +@@ -344,12 +345,13 @@ def _copy_file(repository_ctx, f): # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly @@ -24,3 +24,8 @@ index 3c07b3a0..13af547e 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: +- fail("cp -f %s %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (repository_ctx.path(f), to, result.stdout, result.stderr)) ++ fail("{} failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (" ".join(cp_args), result.stdout, result.stderr)) + + def _symlink_file(repository_ctx, f): + repository_ctx.symlink(f, _workspace_root_path(repository_ctx, f)) From 5788e2aad43fa45b09396b260e745734df509651 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 13:50:09 +0200 Subject: [PATCH 05/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index 68908491ba2f..6ba24899dac3 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..e3e38f1d 100644 +index 3c07b3a0..0a3adfa3 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -25,7 +25,7 @@ index 3c07b3a0..e3e38f1d 100644 ) if result.return_code: - fail("cp -f %s %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (repository_ctx.path(f), to, result.stdout, result.stderr)) -+ fail("{} failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (" ".join(cp_args), result.stdout, result.stderr)) ++ fail("% failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (" ".join(cp_args), result.stdout, result.stderr)) def _symlink_file(repository_ctx, f): repository_ctx.symlink(f, _workspace_root_path(repository_ctx, f)) From 1a989cd55225a301ad0e43310eea574f61467f24 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 13:57:14 +0200 Subject: [PATCH 06/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index 6ba24899dac3..b41441c136c5 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..0a3adfa3 100644 +index 3c07b3a0..13af547e 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -13,7 +13,7 @@ index 3c07b3a0..0a3adfa3 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: -@@ -344,12 +345,13 @@ def _copy_file(repository_ctx, f): +@@ -344,8 +345,9 @@ def _copy_file(repository_ctx, f): # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly @@ -24,8 +24,3 @@ index 3c07b3a0..0a3adfa3 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: -- fail("cp -f %s %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (repository_ctx.path(f), to, result.stdout, result.stderr)) -+ fail("% failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (" ".join(cp_args), result.stdout, result.stderr)) - - def _symlink_file(repository_ctx, f): - repository_ctx.symlink(f, _workspace_root_path(repository_ctx, f)) From 4d51b6472dcf90b28ea48191c067be996ce830ba Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 14:08:34 +0200 Subject: [PATCH 07/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index b41441c136c5..60113f618e81 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..13af547e 100644 +index 3c07b3a0..d02693ae 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -13,7 +13,7 @@ index 3c07b3a0..13af547e 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: -@@ -344,8 +345,9 @@ def _copy_file(repository_ctx, f): +@@ -344,12 +345,13 @@ def _copy_file(repository_ctx, f): # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly @@ -24,3 +24,8 @@ index 3c07b3a0..13af547e 100644 quiet = repository_ctx.attr.quiet, ) if result.return_code: +- fail("cp -f %s %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (repository_ctx.path(f), to, result.stdout, result.stderr)) ++ fail("cp -f {} {} failed: \nSTDOUT:\n{}\nSTDERR:\n{}, {}".format(repository_ctx.path(f), to, result.stdout, result.stderr, cp_args)) + + def _symlink_file(repository_ctx, f): + repository_ctx.symlink(f, _workspace_root_path(repository_ctx, f)) From 5b1931cb2e9779b94bab3a10f6ece2f03883f04b Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 14:14:32 +0200 Subject: [PATCH 08/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index 60113f618e81..4e98b9acc47c 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..d02693ae 100644 +index 3c07b3a0..b888da2a 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -17,7 +17,7 @@ index 3c07b3a0..d02693ae 100644 # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly -+ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format(repository_ctx.path(f), to)] ++ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\".join(repository_ctx.path(f).split("/")), "\".join(to_segments))] result = repository_ctx.execute( - ["cp", "-f", repository_ctx.path(f), to], + cp_args, From 7e3e266c6ec9f99f17a146c7cbd6b6be9c99f3f6 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 14:16:42 +0200 Subject: [PATCH 09/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index 4e98b9acc47c..30fa82285a73 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..b888da2a 100644 +index 3c07b3a0..c022b960 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -17,7 +17,7 @@ index 3c07b3a0..b888da2a 100644 # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly -+ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\".join(repository_ctx.path(f).split("/")), "\".join(to_segments))] ++ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\\".join(repository_ctx.path(f).split("/")), "\\".join(to_segments))] result = repository_ctx.execute( - ["cp", "-f", repository_ctx.path(f), to], + cp_args, From ff3cdc37ed87517c42c05409527a17c72176c6b1 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 25 May 2021 14:18:46 +0200 Subject: [PATCH 10/10] . changelog_begin changelog_end --- bazel_tools/rules_nodejs_windows_mkdir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_tools/rules_nodejs_windows_mkdir.patch b/bazel_tools/rules_nodejs_windows_mkdir.patch index 30fa82285a73..28218eb802fb 100644 --- a/bazel_tools/rules_nodejs_windows_mkdir.patch +++ b/bazel_tools/rules_nodejs_windows_mkdir.patch @@ -1,5 +1,5 @@ diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl -index 3c07b3a0..c022b960 100644 +index 3c07b3a0..a7b77d9a 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): @@ -17,7 +17,7 @@ index 3c07b3a0..c022b960 100644 # copy the file; don't use the repository_ctx.template trick with empty substitution as this # does not copy over binary files properly -+ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\\".join(repository_ctx.path(f).split("/")), "\\".join(to_segments))] ++ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\\".join(str(repository_ctx.path(f)).split("/")), "\\".join(to_segments))] result = repository_ctx.execute( - ["cp", "-f", repository_ctx.path(f), to], + cp_args,