daml/bazel_tools/client_server/client_server_test.bzl

101 lines
3.4 KiB
Python
Raw Normal View History

# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
load("//bazel_tools/sh:sh.bzl", "sh_inline_test")
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
def _escape_args(args):
return " ".join([
a.replace("'", "'\\''")
for a in args
])
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
def client_server_test(
name,
runner = "//bazel_tools/client_server/runner_with_port_file",
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
runner_args = [],
runner_files = [],
runner_files_prefix = "",
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
client = None,
client_args = [],
client_files = [],
server = None,
server_args = [],
server_files = [],
server_files_prefix = "",
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
data = [],
**kwargs):
"""Create a client-server test.
The rule takes a client and server executables and their
arguments as parameters. The server port is passed via a
temporary file, which is passed to the server executable via the
"--port-file" parameter. This file is parsed and the port number
is passed to the client application via the "--target-port" argument.
The server process is killed after the client process exits.
The client and server executables can be any Bazel target that
is executable, e.g. scala_binary, sh_binary, etc.
The client and server files must be valid arguments to rlocation, as
can be obtained using $(rootpath ...) or $(rootpaths ...). (See
https://docs.bazel.build/versions/master/be/make-variables.html#predefined_label_variables.)
Once expanded using rlocation, those are simply appended to client
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
and server arguments, respectively.
Example:
```bzl
client_server_test(
name = "my_test",
runner_args = [],
client = ":my_client",
client_args = ["--extra-argument"],
client_files = ["$(rootpath :target-for-client)"]
server = ":my_server",
server_args = ["--fast"],
server_files = ["$(rootpath :target-for-client)"]
)
```
"""
sh_inline_test(
name = name,
# Deduplicate in case any of runner, client, server are identical.
data = depset([runner, client, server]).to_list() + data,
cmd = """\
runner=$$(canonicalize_rlocation $$(get_exe $(rootpaths {runner})))
runner_args="{runner_args}"
for file in {runner_files}; do
runner_args+=" {runner_files_prefix}$$(canonicalize_rlocation $$file)"
done
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
client=$$(canonicalize_rlocation $$(get_exe $(rootpaths {client})))
server=$$(canonicalize_rlocation $$(get_exe $(rootpaths {server})))
server_args="{server_args}"
for file in {server_files}; do
server_args+=" {server_files_prefix}$$(canonicalize_rlocation $$file)"
done
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
client_args="$$@"
if [ -z "$$client_args" ]; then
client_args="{client_args}"
for file in {client_files}; do
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
client_args+=" $$(canonicalize_rlocation $$file)"
done
fi
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
$$runner $$client "$$client_args" $$server "$$server_args" "$$runner_args"
""".format(
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
runner = runner,
runner_args = _escape_args(runner_args),
runner_files = _escape_args(runner_files),
runner_files_prefix = runner_files_prefix,
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
client = client,
client_args = _escape_args(client_args),
client_files = _escape_args(client_files),
server = server,
server_args = _escape_args(server_args),
server_files = _escape_args(server_files),
server_files_prefix = server_files_prefix,
),
Update Bazel 2.1.0 --> 3.3.1 (#6761) * Upgrade nixpkgs revision * Remove unused minio It used to be used as a gateway to push the Nix cache to GCS, but has since been replaced by nix-store-gcs-proxy. * Update Bazel on Windows changelog_begin changelog_end * Fix hlint warnings The nixpkgs update implied an hlint update which enabled new warnings. * Fix "Error applying patch" Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files and applying patches has been reversed. The allows users to define patches to these files that will not be immediately overwritten. However, it also means that patches on another repository's original `WORKSPACE` file will likely become invalid. * https://github.com/bazelbuild/bazel/commit/a948eb7255b8418f0bba1c819a58972066577d6f * https://github.com/bazelbuild/bazel/issues/10681 Hint: If you're generating a patch with `git` then you can use the following command to exclude the `WORKSPACE` file. ``` git diff ':(exclude)WORKSPACE' ``` * Update rules_nixpkgs * nixpkgs location expansion escaping * Drop --noincompatible_windows_native_test_wrapper * client_server_test using sh_inline_test client_server_test used to produce an executable shell script in form of a text file output. However, since the removal of `--noincompatible_windows_native_test_wrapper` this no longer works on Windows since `.sh` files are not directly executable on Windows. This change fixes the issue by producing the script file in a dedicated rule and then wrapping it in a `sh_test` rule which also works on Windows. * daml_test using sh_inline_test * daml_doc_test using sh_inline_test * _daml_validate_test using sh_inline_test * damlc_compile_test using sh_inline_test * client_server_test find .exe on Windows * Bump Windows cache for Bazel update Remove `clean --expunge` after merge. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 10:46:04 +03:00
**kwargs
)