instance_id
stringlengths 17
39
| repo
stringclasses 8
values | issue_id
stringlengths 14
34
| pr_id
stringlengths 14
34
| linking_methods
sequencelengths 1
3
| base_commit
stringlengths 40
40
| merge_commit
stringlengths 0
40
⌀ | hints_text
sequencelengths 0
106
| resolved_comments
sequencelengths 0
119
| created_at
unknown | labeled_as
sequencelengths 0
7
| problem_title
stringlengths 7
174
| problem_statement
stringlengths 0
55.4k
| gold_files
sequencelengths 0
10
| gold_files_postpatch
sequencelengths 1
10
| test_files
sequencelengths 0
60
| gold_patch
stringlengths 220
5.83M
| test_patch
stringlengths 386
194k
⌀ | split_random
stringclasses 3
values | split_time
stringclasses 3
values | issue_start_time
timestamp[ns] | issue_created_at
unknown | issue_by_user
stringlengths 3
21
| split_repo
stringclasses 3
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bazelbuild/bazel/8004_9274 | bazelbuild/bazel | bazelbuild/bazel/8004 | bazelbuild/bazel/9274 | [
"timestamp(timedelta=168348.0, similarity=0.8569972656944206)"
] | 902e7e5e79e4ec0530c1e011116763c8061dba31 | 76e8613774ed259bd1cacfc15d9cd1299190e599 | [
"Related to: https://github.com/bazelbuild/bazel/issues/4680",
"Done as of 58d3f17. Follow-up in #8830 "
] | [] | "2019-08-28T16:09:34Z" | [
"type: feature request",
"team-Remote-Exec"
] | Tags to execution requirements propagation in Native Rules | It is not a secret that by default bazel does not propagate tags to the actions' execution requirements, the only exception would be the rules that are specifically adopted to do the propagation (e.g. test related tags are already propagated by the test runner).
Tags should be propagated to the action from targets for Native rules.
Design:
https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit?usp=sharing
Related github issue for Starlark rules: #7766.
See #8830 for details. | [
"src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java"
] | [
"src/test/shell/bazel/tags_propagation_native_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java
index cfc20bcc494691..0a31a9daa54a57 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java
@@ -38,12 +38,15 @@
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.collect.nestedset.Order;
+import com.google.devtools.build.lib.packages.TargetUtils;
import com.google.devtools.build.lib.rules.java.JavaConfiguration.JavaClasspathMode;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
import javax.annotation.Nullable;
/**
@@ -189,7 +192,8 @@ public JavaCompileAction createCompileAction(
Artifact outputJar,
Artifact manifestProtoOutput,
@Nullable Artifact gensrcOutputJar,
- @Nullable Artifact nativeHeaderOutput) {
+ @Nullable Artifact nativeHeaderOutput)
+ throws InterruptedException {
JavaTargetAttributes attributes = getAttributes();
@@ -252,13 +256,19 @@ && getTranslations().isEmpty()) {
return builder.build(ruleContext, semantics);
}
- private ImmutableMap<String, String> getExecutionInfo() {
- return getConfiguration()
- .modifiedExecutionInfo(
- javaToolchain.getJavacSupportsWorkers()
- ? ExecutionRequirements.WORKER_MODE_ENABLED
- : ImmutableMap.of(),
- JavaCompileActionBuilder.MNEMONIC);
+ private ImmutableMap<String, String> getExecutionInfo() throws InterruptedException {
+ Map<String, String> executionInfo = new LinkedHashMap<>();
+ executionInfo.putAll(
+ getConfiguration()
+ .modifiedExecutionInfo(
+ javaToolchain.getJavacSupportsWorkers()
+ ? ExecutionRequirements.WORKER_MODE_ENABLED
+ : ImmutableMap.of(),
+ JavaCompileActionBuilder.MNEMONIC));
+ executionInfo.putAll(
+ TargetUtils.getExecutionInfo(ruleContext.getRule(), ruleContext.isAllowTagsPropagation()));
+
+ return ImmutableMap.copyOf(executionInfo);
}
/** Returns the bootclasspath explicit set in attributes if present, or else the default. */
@@ -352,7 +362,8 @@ private boolean shouldUseHeaderCompilation() {
* for new artifacts.
*/
private Artifact createHeaderCompilationAction(
- Artifact runtimeJar, JavaCompilationArtifacts.Builder artifactBuilder) {
+ Artifact runtimeJar, JavaCompilationArtifacts.Builder artifactBuilder)
+ throws InterruptedException {
Artifact headerJar =
getAnalysisEnvironment()
@@ -628,7 +639,7 @@ public void createSourceJarAction(Artifact outputJar, @Nullable Artifact gensrcJ
* @return the header jar (if requested), or ijar (if requested), or else the class jar
*/
public Artifact createCompileTimeJarAction(
- Artifact runtimeJar, JavaCompilationArtifacts.Builder builder) {
+ Artifact runtimeJar, JavaCompilationArtifacts.Builder builder) throws InterruptedException {
Artifact jar;
boolean isFullJar = false;
if (shouldUseHeaderCompilation()) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java
index 06e0187cdaeec3..90234c95af5b69 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java
@@ -44,6 +44,7 @@
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.collect.nestedset.Order;
+import com.google.devtools.build.lib.packages.TargetUtils;
import com.google.devtools.build.lib.rules.java.JavaCompileAction.ProgressMessage;
import com.google.devtools.build.lib.rules.java.JavaConfiguration.JavaClasspathMode;
import com.google.devtools.build.lib.rules.java.JavaPluginInfoProvider.JavaPluginInfo;
@@ -53,7 +54,9 @@
import com.google.devtools.build.lib.view.proto.Deps;
import java.io.IOException;
import java.io.InputStream;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
import java.util.function.Consumer;
import javax.annotation.Nullable;
@@ -215,7 +218,7 @@ public JavaHeaderCompileActionBuilder setToolsJars(NestedSet<Artifact> toolsJars
}
/** Builds and registers the action for a header compilation. */
- public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavabase) {
+ public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavabase) throws InterruptedException {
checkNotNull(outputDepsProto, "outputDepsProto must not be null");
checkNotNull(sourceFiles, "sourceFiles must not be null");
checkNotNull(sourceJars, "sourceJars must not be null");
@@ -369,9 +372,9 @@ public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavab
/* commandLineLimits= */ ruleContext.getConfiguration().getCommandLineLimits(),
/* isShellCommand= */ false,
/* env= */ actionEnvironment,
- /* executionInfo= */ ruleContext
+ /* executionInfo= */ addTags(ruleContext
.getConfiguration()
- .modifiedExecutionInfo(executionInfo, "Turbine"),
+ .modifiedExecutionInfo(executionInfo, "Turbine")),
/* progressMessage= */ progressMessage,
/* runfilesSupplier= */ CompositeRunfilesSupplier.fromSuppliers(runfilesSuppliers),
/* mnemonic= */ "Turbine",
@@ -417,7 +420,7 @@ public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavab
/* transitiveInputs= */ classpathEntries,
/* directJars= */ directJars,
/* outputs= */ outputs,
- /* executionInfo= */ executionInfo,
+ /* executionInfo= */ addTags(executionInfo),
/* extraActionInfoSupplier= */ null,
/* executableLine= */ executableLine,
/* flagLine= */ commandLine.build(),
@@ -454,9 +457,9 @@ public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavab
/* commandLineLimits= */ ruleContext.getConfiguration().getCommandLineLimits(),
/* isShellCommand= */ false,
/* env= */ actionEnvironment,
- /* executionInfo= */ ruleContext
+ /* executionInfo= */ addTags(ruleContext
.getConfiguration()
- .modifiedExecutionInfo(executionInfo, "JavacTurbine"),
+ .modifiedExecutionInfo(executionInfo, "JavacTurbine")),
/* progressMessage= */ progressMessage,
/* runfilesSupplier= */ CompositeRunfilesSupplier.fromSuppliers(runfilesSuppliers),
/* mnemonic= */ "JavacTurbine",
@@ -465,6 +468,15 @@ public void build(JavaToolchainProvider javaToolchain, JavaRuntimeInfo hostJavab
/* resultConsumer= */ resultConsumer));
}
+ private ImmutableMap<String, String> addTags(ImmutableMap<String, String> executionInfo) throws InterruptedException {
+ Map<String, String> executionInfoBuilder = new LinkedHashMap<>();
+
+ executionInfoBuilder.putAll(executionInfo);
+ executionInfoBuilder.putAll(TargetUtils.getExecutionInfo(ruleContext.getRule(), ruleContext.isAllowTagsPropagation()));
+
+ return ImmutableMap.copyOf(executionInfoBuilder);
+ }
+
/**
* Creates a consumer that reads the produced .jdeps file into memory. Pulled out into a separate
* function to avoid capturing a data member, which would keep the entire builder instance alive.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java
index d5184b75c40e1f..be6208cafe29df 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java
@@ -292,7 +292,7 @@ public JavaInfo createJavaCompileAction(
JavaSemantics javaSemantics,
Location location,
Environment environment)
- throws EvalException {
+ throws EvalException, InterruptedException {
if (sourceJars.isEmpty()
&& sourceFiles.isEmpty()
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java
index ece3c58bfa4570..55326445a553b5 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaLibraryHelper.java
@@ -182,7 +182,7 @@ public JavaCompilationArtifacts build(
JavaRuntimeInfo hostJavabase,
JavaRuleOutputJarsProvider.Builder outputJarsBuilder,
boolean createOutputSourceJar,
- @Nullable Artifact outputSourceJar) {
+ @Nullable Artifact outputSourceJar) throws InterruptedException {
return build(
semantics,
javaToolchainProvider,
@@ -204,7 +204,7 @@ public JavaCompilationArtifacts build(
@Nullable Artifact outputSourceJar,
@Nullable JavaInfo.Builder javaInfoBuilder,
Iterable<JavaGenJarsProvider> transitiveJavaGenJars,
- ImmutableList<Artifact> additionalJavaBaseInputs) {
+ ImmutableList<Artifact> additionalJavaBaseInputs) throws InterruptedException {
Preconditions.checkState(output != null, "must have an output file; use setOutput()");
Preconditions.checkState(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
index da899079159f1d..f4f4ae52933a8c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
@@ -172,7 +172,7 @@ private static class Impl {
"exports", RuleConfiguredTarget.Mode.TARGET, JavaCompilationArgsProvider.class));
}
- void addProviders(ConfiguredAspect.Builder aspect) {
+ void addProviders(ConfiguredAspect.Builder aspect) throws InterruptedException {
JavaInfo.Builder javaInfo = JavaInfo.Builder.create();
// Represents the result of compiling the code generated for this proto, including all of its
// dependencies.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
index 93ac592dd93965..98df054f5eeef5 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
@@ -192,7 +192,7 @@ private static class Impl {
JavaCompilationArgsProvider.class));
}
- void addProviders(ConfiguredAspect.Builder aspect) {
+ void addProviders(ConfiguredAspect.Builder aspect) throws InterruptedException {
// Represents the result of compiling the code generated for this proto, including all of its
// dependencies.
JavaInfo.Builder javaInfo = JavaInfo.Builder.create();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java
index 422ce7b994398c..5318467f4c1d0e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspectCommon.java
@@ -108,7 +108,7 @@ public JavaCompilationArgsProvider createJavaCompileAction(
String injectingRuleKind,
Artifact sourceJar,
Artifact outputJar,
- JavaCompilationArgsProvider dep) {
+ JavaCompilationArgsProvider dep) throws InterruptedException {
JavaLibraryHelper helper =
new JavaLibraryHelper(ruleContext)
.setInjectingRuleKind(injectingRuleKind)
| diff --git a/src/test/shell/bazel/tags_propagation_native_test.sh b/src/test/shell/bazel/tags_propagation_native_test.sh
index 7ffee2fab58800..969f3fbf549761 100755
--- a/src/test/shell/bazel/tags_propagation_native_test.sh
+++ b/src/test/shell/bazel/tags_propagation_native_test.sh
@@ -98,6 +98,119 @@ EOF
assert_contains "no-remote:" output1
}
+function test_java_library_tags_propagated() {
+ mkdir -p test
+ cat > test/BUILD <<EOF
+package(default_visibility = ["//visibility:public"])
+java_library(
+ name = 'test',
+ srcs = [ 'Hello.java' ],
+ tags = ["no-cache", "no-remote", "local"]
+)
+EOF
+
+ cat > test/Hello.java <<EOF
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello there");
+ }
+}
+EOF
+
+ bazel aquery --experimental_allow_tags_propagation '//test:test' > output1 2> $TEST_log \
+ || fail "should have generated output successfully"
+
+ assert_contains "ExecutionInfo: {" output1
+ assert_contains "local:" output1
+ assert_contains "no-cache:" output1
+ assert_contains "no-remote:" output1
+}
+
+function test_java_binary_tags_propagated() {
+ mkdir -p test
+ cat > test/BUILD <<EOF
+package(default_visibility = ["//visibility:public"])
+java_binary(
+ name = 'test',
+ srcs = [ 'Hello.java' ],
+ main_class = 'main.Hello',
+ tags = ["no-cache", "no-remote", "local"]
+)
+EOF
+
+ cat > test/Hello.java <<EOF
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello there");
+ }
+}
+EOF
+
+ bazel aquery --experimental_allow_tags_propagation '//test:test' > output1 2> $TEST_log \
+ || fail "should have generated output successfully"
+
+ assert_contains "ExecutionInfo: {" output1
+ assert_contains "local:" output1
+ assert_contains "no-cache:" output1
+ assert_contains "no-remote:" output1
+}
+
+function write_hello_library_files() {
+ local -r pkg="$1"
+ mkdir -p $pkg/java/main || fail "mkdir"
+ cat >$pkg/java/main/BUILD <<EOF
+java_binary(
+ name = 'main',
+ deps = ['//$pkg/java/hello_library'],
+ srcs = ['Main.java'],
+ main_class = 'main.Main',
+ tags = ["no-cache", "no-remote", "local"],
+ deploy_manifest_lines = ['k1: v1', 'k2: v2'])
+EOF
+
+ cat >$pkg/java/main/Main.java <<EOF
+package main;
+import hello_library.HelloLibrary;
+public class Main {
+ public static void main(String[] args) {
+ HelloLibrary.funcHelloLibrary();
+ System.out.println("Hello, World!");
+ }
+}
+EOF
+
+ mkdir -p $pkg/java/hello_library || fail "mkdir"
+ cat >$pkg/java/hello_library/BUILD <<EOF
+package(default_visibility=['//visibility:public'])
+java_library(name = 'hello_library',
+ srcs = ['HelloLibrary.java']);
+EOF
+
+ cat >$pkg/java/hello_library/HelloLibrary.java <<EOF
+package hello_library;
+public class HelloLibrary {
+ public static void funcHelloLibrary() {
+ System.out.print("Hello, Library!;");
+ }
+}
+EOF
+}
+
+function test_java_header_tags_propagated() {
+ local -r pkg="${FUNCNAME[0]}"
+ mkdir "$pkg" || fail "mkdir $pkg"
+ write_hello_library_files "$pkg"
+
+ bazel aquery --experimental_allow_tags_propagation --java_header_compilation=true //$pkg/java/main:main > output1 2> $TEST_log \
+ || fail "should have generated output successfully"
+
+ assert_contains "ExecutionInfo: {" output1
+ assert_contains "local:" output1
+ assert_contains "no-cache:" output1
+ assert_contains "no-remote:" output1
+
+}
+
function test_genrule_tags_propagated() {
mkdir -p test
cat > test/BUILD <<EOF
@@ -193,4 +306,31 @@ EOF
assert_not_contains "no-remote:" output1
}
-run_suite "tags propagation: skylark rule tests"
+function test_java_tags_not_propagated_when_incompatible_flag_off() {
+ mkdir -p test
+ cat > test/BUILD <<EOF
+package(default_visibility = ["//visibility:public"])
+java_library(
+ name = 'test',
+ srcs = [ 'Hello.java' ],
+ tags = ["no-cache", "no-remote", "local"]
+)
+EOF
+
+ cat > test/Hello.java <<EOF
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello there");
+ }
+}
+EOF
+
+ bazel aquery --experimental_allow_tags_propagation=false '//test:test' > output1 2> $TEST_log \
+ || fail "should have generated output successfully"
+
+ assert_not_contains "local:" output1
+ assert_not_contains "no-cache:" output1
+ assert_not_contains "no-remote:" output1
+}
+
+run_suite "tags propagation: native rule tests"
| val | train | 2019-08-30T14:08:23 | "2019-04-11T12:25:19Z" | ishikhman | test |
bazelbuild/bazel/8005_8075 | bazelbuild/bazel | bazelbuild/bazel/8005 | bazelbuild/bazel/8075 | [
"timestamp(timedelta=0.0, similarity=0.9048184539213349)"
] | 0e8c8a9aefb5290cc03571477c5c01d507eb02e0 | 0af34a59ba15725dc5bcb5e077844bf6e88e5279 | [
"Mostly out of curiosity because I was filing https://github.com/bazelbuild/bazel/issues/10245 and this bug turned out as suggested.\r\n\r\nHow was this fixed? If I'm reading things correctly, Bazel now kills the process group on Windows, right? But do you wait for the subprocesses at all? If not, you'd be subject to the same issues I reported.",
"If a test times out, Bazel terminates the process tree. We don't wait for subprocesses in this case, so they could leave stale state behind.",
"As best as I know, processes can't signal each other on Windows as they can on Linux, so there's no generic graceful termination mechanism like SIGINT or SIGTERM, just the blunt TerminateProcess (like SIGKILL).\r\n\r\nPostQuitMessage comes to mind for windowed applications (which the majority of Bazel-ran tools aren't), but that requires cooperation from the process (running a message processing loop).",
"Note that the `process-wrapper` on Unix systems doesn't allow processes to terminate gracefully either, in the general case: it just sends everything a `SIGKILL`. So what you are doing on Windows seems very similar."
] | [] | "2019-04-17T10:28:52Z" | [
"type: bug",
"P2",
"area-Windows",
"team-OSS"
] | Windows: native test wrapper waits for all grandchild processes | ### Description of the problem / feature request:
The Windows-native test wrapper waits for all subprocesses of the test to terminate, even after the test itself terminated.
I believe the test wrapper should use job objects: https://github.com/bazelbuild/bazel/blob/c6c303009c207dae2e6342eee9b8a25e37ca20ca/src/main/native/windows/processes-jni.cc#L370
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
`BUILD`:
```
java_test(
name = "sleepy",
main_class = "Sleepy",
srcs = ["Sleepy.java"],
timeout = "short",
use_testrunner = 0,
)
```
`Sleepy.java`:
```
public class Sleepy {
public static void main(String[] args) throws Exception {
new ProcessBuilder("C:/msys64/usr/bin/sleep.exe", "15").inheritIO().start();
}
}
```
Without test wrapper:
```
C:\src\tmp>c:\src\bazel\bazel-bin\src\bazel.exe test -t- --noincompatible_windows_native_test_wrapper //:sleepy
(...)
//:sleepy PASSED in 1.8s
```
With test wrapper:
```
C:\src\tmp>c:\src\bazel\bazel-bin\src\bazel.exe test -t- --incompatible_windows_native_test_wrapper //:sleepy
(...)
//:sleepy PASSED in 15.7s
INFO: Build completed successfully, 2 total actions
```
### What operating system are you running Bazel on?
Windows 10
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
Built from source at https://github.com/bazelbuild/bazel/commit/c6c303009c207dae2e6342eee9b8a25e37ca20ca | [
"src/main/native/windows/process.cc",
"src/main/native/windows/process.h",
"src/main/native/windows/processes-jni.cc"
] | [
"src/main/native/windows/process.cc",
"src/main/native/windows/process.h",
"src/main/native/windows/processes-jni.cc"
] | [
"tools/test/BUILD",
"tools/test/windows/tw.cc"
] | diff --git a/src/main/native/windows/process.cc b/src/main/native/windows/process.cc
index 82fec19a2150cc..5b7976add1a9f2 100644
--- a/src/main/native/windows/process.cc
+++ b/src/main/native/windows/process.cc
@@ -33,6 +33,7 @@ bool WaitableProcess::Create(const std::wstring& argv0,
const std::wstring& argv_rest, void* env,
const std::wstring& wcwd, HANDLE stdin_process,
HANDLE stdout_process, HANDLE stderr_process,
+ LARGE_INTEGER* opt_out_start_time,
std::wstring* error) {
std::wstring cwd;
std::wstring error_msg(AsShortPath(wcwd, &cwd));
@@ -177,11 +178,22 @@ bool WaitableProcess::Create(const std::wstring& argv0,
return false;
}
+ if (opt_out_start_time) {
+ QueryPerformanceCounter(opt_out_start_time);
+ }
*error = L"";
return true;
}
-int WaitableProcess::WaitFor(int64_t timeout_msec, std::wstring* error) {
+int WaitableProcess::WaitFor(
+ int64_t timeout_msec, LARGE_INTEGER* opt_out_end_time,
+ std::wstring* error) {
+ struct Defer {
+ LARGE_INTEGER* t;
+ Defer(LARGE_INTEGER* cnt) : t(cnt) {}
+ ~Defer() { if (t) { QueryPerformanceCounter(t); } }
+ } defer_query_end_time(opt_out_end_time);
+
DWORD win32_timeout = timeout_msec < 0 ? INFINITE : timeout_msec;
int result;
switch (WaitForSingleObject(process_, win32_timeout)) {
diff --git a/src/main/native/windows/process.h b/src/main/native/windows/process.h
index e750f465608bfc..de0e1e4fda3888 100644
--- a/src/main/native/windows/process.h
+++ b/src/main/native/windows/process.h
@@ -42,9 +42,10 @@ class WaitableProcess {
bool Create(const std::wstring& argv0, const std::wstring& argv_rest,
void* env, const std::wstring& wcwd, HANDLE stdin_process,
HANDLE stdout_process, HANDLE stderr_process,
- std::wstring* error);
+ LARGE_INTEGER* opt_out_start_time, std::wstring* error);
- int WaitFor(int64_t timeout_msec, std::wstring* error);
+ int WaitFor(int64_t timeout_msec, LARGE_INTEGER* opt_out_end_time,
+ std::wstring* error);
int GetExitCode(std::wstring* error);
diff --git a/src/main/native/windows/processes-jni.cc b/src/main/native/windows/processes-jni.cc
index e3bb480791a1de..f58397e2a2be2d 100644
--- a/src/main/native/windows/processes-jni.cc
+++ b/src/main/native/windows/processes-jni.cc
@@ -314,7 +314,7 @@ class NativeProcess {
return proc_.Create(
wpath, bazel::windows::GetJavaWstring(env, java_argv_rest),
env_map.ptr(), bazel::windows::GetJavaWpath(env, java_cwd),
- stdin_process, stdout_process, stderr_process, &error_);
+ stdin_process, stdout_process, stderr_process, nullptr, &error_);
}
void CloseStdin() {
@@ -325,7 +325,7 @@ class NativeProcess {
// Wait for this process to exit (or timeout).
int WaitFor(int64_t timeout_msec) {
- return proc_.WaitFor(timeout_msec, &error_);
+ return proc_.WaitFor(timeout_msec, nullptr, &error_);
}
// Returns the exit code of the process if it has already exited. If the
| diff --git a/tools/test/BUILD b/tools/test/BUILD
index 6deb7dde275004..d259336de9c535 100644
--- a/tools/test/BUILD
+++ b/tools/test/BUILD
@@ -79,6 +79,7 @@ cc_library(
"//src/main/cpp/util:filesystem",
"//src/main/cpp/util:strings",
"//src/main/native/windows:lib-file",
+ "//src/main/native/windows:lib-process",
"//src/main/native/windows:lib-util",
"//src/tools/launcher/util",
"//third_party/ijar:zip",
diff --git a/tools/test/windows/tw.cc b/tools/test/windows/tw.cc
index d65312bc3dae58..ac9eab288410b1 100644
--- a/tools/test/windows/tw.cc
+++ b/tools/test/windows/tw.cc
@@ -42,6 +42,7 @@
#include "src/main/cpp/util/path_platform.h"
#include "src/main/cpp/util/strings.h"
#include "src/main/native/windows/file.h"
+#include "src/main/native/windows/process.h"
#include "src/main/native/windows/util.h"
#include "src/tools/launcher/util/launcher_util.h"
#include "third_party/ijar/common.h"
@@ -1098,7 +1099,7 @@ bool CreateCommandLine(const Path& path, const std::wstring& args,
bool StartSubprocess(const Path& path, const std::wstring& args,
const Path& outerr, std::unique_ptr<Tee>* tee,
LARGE_INTEGER* start_time,
- bazel::windows::AutoHandle* process) {
+ bazel::windows::WaitableProcess* process) {
SECURITY_ATTRIBUTES inheritable_handle_sa = {sizeof(SECURITY_ATTRIBUTES),
NULL, TRUE};
@@ -1139,16 +1140,6 @@ bool StartSubprocess(const Path& path, const std::wstring& args,
return false;
}
- // Create an attribute object that specifies which particular handles shall
- // the subprocess inherit. We pass this object to CreateProcessW.
- std::unique_ptr<bazel::windows::AutoAttributeList> attr_list;
- std::wstring werror;
- if (!bazel::windows::AutoAttributeList::Create(
- devnull_read, pipe_write, pipe_write_dup, &attr_list, &werror)) {
- LogError(__LINE__, werror);
- return false;
- }
-
// Open a handle to the test log file. The "tee" thread will write everything
// into it that the subprocess writes to the pipe.
bazel::windows::AutoHandle test_outerr;
@@ -1177,57 +1168,13 @@ bool StartSubprocess(const Path& path, const std::wstring& args,
return false;
}
- PROCESS_INFORMATION process_info;
- STARTUPINFOEXW startup_info;
- attr_list->InitStartupInfoExW(&startup_info);
-
- std::unique_ptr<WCHAR[]> cmdline;
- if (!CreateCommandLine(path, args, &cmdline)) {
- return false;
- }
-
- QueryPerformanceCounter(start_time);
- if (CreateProcessW(NULL, cmdline.get(), NULL, NULL, TRUE,
- CREATE_UNICODE_ENVIRONMENT | EXTENDED_STARTUPINFO_PRESENT,
- NULL, NULL, &startup_info.StartupInfo,
- &process_info) != 0) {
- CloseHandle(process_info.hThread);
- *process = process_info.hProcess;
- return true;
- } else {
- DWORD err = GetLastError();
- LogErrorWithValue(
- __LINE__,
- (std::wstring(L"CreateProcessW failed (") + cmdline.get() + L")")
- .c_str(),
- err);
+ std::wstring werror;
+ if (!process->Create(path.Get(), args, nullptr, L"", devnull_read, pipe_write,
+ pipe_write_dup, start_time, &werror)) {
+ LogError(__LINE__, werror);
return false;
}
-}
-
-int WaitForSubprocess(HANDLE process, LARGE_INTEGER* end_time) {
- DWORD result = WaitForSingleObject(process, INFINITE);
- QueryPerformanceCounter(end_time);
- switch (result) {
- case WAIT_OBJECT_0: {
- DWORD exit_code;
- if (!GetExitCodeProcess(process, &exit_code)) {
- DWORD err = GetLastError();
- LogErrorWithValue(__LINE__, "GetExitCodeProcess failed", err);
- return 1;
- }
- return exit_code;
- }
- case WAIT_FAILED: {
- DWORD err = GetLastError();
- LogErrorWithValue(__LINE__, "WaitForSingleObject failed", err);
- return 1;
- }
- default:
- LogErrorWithValue(
- __LINE__, "WaitForSingleObject returned unexpected result", result);
- return 1;
- }
+ return true;
}
bool ArchiveUndeclaredOutputs(const UndeclaredOutputs& undecl) {
@@ -1385,14 +1332,27 @@ bool TeeImpl::MainFunc() const {
int RunSubprocess(const Path& test_path, const std::wstring& args,
const Path& test_outerr, Duration* test_duration) {
std::unique_ptr<Tee> tee;
- bazel::windows::AutoHandle process;
+ bazel::windows::WaitableProcess process;
LARGE_INTEGER start, end, freq;
if (!StartSubprocess(test_path, args, test_outerr, &tee, &start, &process)) {
LogError(__LINE__, std::wstring(L"Failed to start test process \"") +
test_path.Get() + L"\"");
return 1;
}
- int result = WaitForSubprocess(process, &end);
+
+ std::wstring werror;
+ int wait_res = process.WaitFor(-1, &end, &werror);
+ if (wait_res != bazel::windows::WaitableProcess::kWaitSuccess) {
+ LogErrorWithValue(__LINE__, werror, wait_res);
+ return 1;
+ }
+
+ werror.clear();
+ int result = process.GetExitCode(&werror);
+ if (!werror.empty()) {
+ LogError(__LINE__, werror);
+ return 1;
+ }
QueryPerformanceFrequency(&freq);
end.QuadPart -= start.QuadPart;
| train | train | 2019-04-17T11:37:34 | "2019-04-11T13:56:41Z" | laszlocsomor | test |
bazelbuild/bazel/8061_9062 | bazelbuild/bazel | bazelbuild/bazel/8061 | bazelbuild/bazel/9062 | [
"timestamp(timedelta=0.0, similarity=0.9152128395372776)"
] | 2c046486f5febb9e475a5589b59abae77f14245e | d45bff50170be3bf8936b36603e079672ee0a744 | [
"Hi @ishikhman, just in the improbable case you didn't see it, we have a page with infomation how to roll out breaking changes over at https://bazel.build/breaking-changes-guide.html. There are some minor things missing in this issue (title format, missing migration-ready label)\r\n\r\nThanks!",
"thanks @hlopko! updated the issue accordingly. ",
"@ishikhman Any plans to remove incompatible_tls_enabled_removed flag completely? The problem is that with bazel at HEAD when you specify all_incompatible_changes to do a migration the flag incompatible_tls_enabled_removed gets also set displaying the following warning.\r\n\r\n`WARNING: Option 'incompatible_tls_enabled_removed' is deprecated: No-op. See #8061 for details.`"
] | [] | "2019-08-02T15:02:47Z" | [
"incompatible-change",
"team-Remote-Exec"
] | incompatible_tls_enabled_removed: flip it and enable tls by default while deprecating tls_enabled flag | `--tls_enabled` flag is deprecated and should be removed in one of the next releases.
If `--incompatible_tls_enabled_removed` flag set to true, an error is rised in case tls_enabled is still in use.
**Migration**
* gRPC + enabled TLS:
Replace `--tls_enabled=true` and `--remote_cache=localhost:1234` with : `--remote_cache=grpcs://localhost:1234` or `--remote_cache=localhost:1234`
* gRPC + disabled TLS:
Replace `--tls_enabled=false` and `--remote_cache=localhost:1234` with : `--remote_cache=grpc://localhost:1234`
**Note**: the same migration plan applies to all of the following flags: `-remote_cache`, `--remote_executor `or `--bes_backend`. Use `--incompatible_tls_enabled_removed=true` to test.
**Note2**: http cache/executor is not affected
**Expected timeline**
Released with Bazel 0.26 (May 2019), off by default
Enabled by default with Bazel 0.30 (September 2019) | [
"src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java",
"src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java"
] | [
"src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java",
"src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java"
] | [
"src/test/shell/bazel/remote/remote_execution_tls_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java b/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
index 1a0540b4c3f0b2..a92454d8a5ebc1 100644
--- a/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
@@ -67,25 +67,26 @@ public class AuthAndTLSOptions extends OptionsBase {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
deprecationWarning =
- "Deprecated. Please specify a valid protocol in the URL (https or grpcs).",
+ "No-op. See #8061 for details.",
effectTags = {OptionEffectTag.UNKNOWN},
help =
- "DEPRECATED. Specifies whether to use TLS for remote execution/caching and "
- + "the build event service (BES). See #8061 for details.")
+ "No-op. See #8061 for details.")
public boolean tlsEnabled;
+ @Deprecated
@Option(
name = "incompatible_tls_enabled_removed",
- defaultValue = "false",
+ defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ deprecationWarning =
+ "No-op. See #8061 for details.",
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
- "If set to true, bazel will handle --tls_enabled as a not existing flag."
- + "See #8061 for details.")
+ "No-op. See #8061 for details.")
public boolean incompatibleTlsEnabledRemoved;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
index d68f608599cccb..735d65d9b755b9 100644
--- a/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
@@ -86,18 +86,11 @@ private static String convertTargetScheme(String target) {
return target.replace("grpcs://", "").replace("grpc://", "");
}
- // TODO(ishikhman) remove options.tlsEnabled flag usage when an incompatible flag is flipped
private static boolean isTlsEnabled(String target, AuthAndTLSOptions options) {
- if (options.incompatibleTlsEnabledRemoved && options.tlsEnabled) {
- throw new IllegalArgumentException("flag --tls_enabled was not found");
- }
- if (options.incompatibleTlsEnabledRemoved) {
- // 'grpcs://' or empty prefix => TLS-enabled
- // when no schema prefix is provided in URL, bazel will treat it as a gRPC request with TLS
- // enabled
- return !target.startsWith("grpc://");
- }
- return target.startsWith("grpcs") || options.tlsEnabled;
+ // 'grpcs://' or empty prefix => TLS-enabled
+ // when no schema prefix is provided in URL, bazel will treat it as a gRPC request with TLS
+ // enabled
+ return !target.startsWith("grpc://");
}
private static SslContext createSSlContext(@Nullable String rootCert) throws IOException {
| diff --git a/src/test/shell/bazel/remote/remote_execution_tls_test.sh b/src/test/shell/bazel/remote/remote_execution_tls_test.sh
index 9766a25fabb99c..c9205b93caeeee 100755
--- a/src/test/shell/bazel/remote/remote_execution_tls_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_tls_test.sh
@@ -86,16 +86,15 @@ function test_remote_grpcs_cache() {
|| fail "Failed to build //a:foo with grpcs remote cache"
}
-function test_remote_grpc_cache_with_legacy_tls_enabled() {
- # Test that if default scheme for --remote_cache flag with --tls_enabled, remote cache works.
+function test_remote_grpc_cache() {
+ # Test that if default scheme for --remote_cache flag, remote cache works.
_prepareBasicRule
bazel build \
--remote_cache=localhost:${worker_port} \
- --tls_enabled=true \
--tls_certificate="${cert_path}/ca.crt" \
//a:foo \
- || fail "Failed to build //a:foo with grpc --tls_enabled remote cache"
+ || fail "Failed to build //a:foo with grpc remote cache"
}
function test_remote_https_cache() {
@@ -109,50 +108,12 @@ function test_remote_https_cache() {
|| fail "Failed to build //a:foo with https remote cache"
}
-function test_remote_cache_with_incompatible_tls_enabled_removed_default_scheme() {
- # Test that if default scheme for --remote_cache flag with --incompatible_tls_enabled_removed, remote cache works.
- _prepareBasicRule
-
- bazel build \
- --remote_cache=localhost:${worker_port} \
- --incompatible_tls_enabled_removed=true \
- --tls_certificate="${cert_path}/ca.crt" \
- //a:foo \
- || fail "Failed to build //a:foo with default(grpcs) remote cache"
-}
-
-function test_remote_cache_with_incompatible_tls_enabled_removed_grpcs_scheme() {
- # Test that if 'grpcs' scheme for --remote_cache flag with --incompatible_tls_enabled_removed, remote cache works.
- _prepareBasicRule
-
- bazel build \
- --remote_cache=grpcs://localhost:${worker_port} \
- --incompatible_tls_enabled_removed=true \
- --tls_certificate="${cert_path}/ca.crt" \
- //a:foo \
- || fail "Failed to build //a:foo with grpcs remote cache"
-}
-
function test_remote_cache_with_incompatible_tls_enabled_removed_grpc_scheme() {
- # Test that if 'grpc' scheme for --remote_cache flag with --incompatible_tls_enabled_removed, remote cache fails.
- _prepareBasicRule
-
- bazel build \
- --remote_cache=grpc://localhost:${worker_port} \
- --incompatible_tls_enabled_removed=true \
- --tls_certificate="${cert_path}/ca.crt" \
- //a:foo \
- && fail "Expected test failure" || true
-}
-
-function test_remote_cache_with_incompatible_tls_enabled_removed() {
- # Test that if --incompatible_tls_enabled_removed=true and --tls_enabled=true an error is thrown
+ # Test that if 'grpc' scheme for --remote_cache flag, remote cache fails.
_prepareBasicRule
bazel build \
--remote_cache=grpc://localhost:${worker_port} \
- --tls_enabled=true \
- --incompatible_tls_enabled_removed=true \
--tls_certificate="${cert_path}/ca.crt" \
//a:foo \
&& fail "Expected test failure" || true
| train | train | 2019-08-02T16:16:20 | "2019-04-16T13:03:47Z" | ishikhman | test |
bazelbuild/bazel/8111_8112 | bazelbuild/bazel | bazelbuild/bazel/8111 | bazelbuild/bazel/8112 | [
"timestamp(timedelta=0.0, similarity=0.9391538612296311)"
] | 2419cb3d7d8b5dd8f1a8bad7b57760d276730c4d | 019fbf3d5df715272eb2fc353d0d2075136c0719 | [
"We could accept this. Could you please send a PR?",
"@oquenchil, there is a linked PR, I've just updated it to resolve a conflict."
] | [] | "2019-04-23T07:03:50Z" | [
"P3",
"team-Rules-CPP"
] | Accept .h++ as an extension for C++ headers | ### Description of the problem / feature request:
This is very similar to #302. I am trying to build an existing project ([libconfig](https://github.com/hyperrealm/libconfig)) which uses `.h++` as the extension for C++ header files but this extension is not supported by Bazel. This would affect anyone else working with a legacy code base using that naming.
For me, the error looks like this:
> ERROR: /private/var/tmp/_bazel_mark/85b990e918dfdf17ac335343d25f30e0/external/libconfig/BUILD.bazel:4:9: in srcs attribute of cc_library rule @libconfig//:lib: source file '@libconfig//:lib/libconfig.h++' is misplaced here (expected .cc, .cpp, .cxx, .c++, .C, .c, .h, .hh, .hpp, .ipp, .hxx, .inc, .inl, .H, .S, .s, .asm, .a, .lib, .pic.a, .lo, .lo.lib, .pic.lo, .so, .dylib, .dll, .o, .obj or .pic.o)
Ideally, I would be able to build libconfig with Bazel (without modifying the libconfig source).
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Here is `WORKSPACE`, I expect there are other issues affecting the build:
```
http_archive(
name = "libconfig",
urls = [ "https://github.com/hyperrealm/libconfig/archive/v1.7.2.zip" ],
build_file_content = """
cc_library(
name = "lib",
srcs= glob([
"lib/*.c",
"lib/*.c++",
"lib/*.h",
"lib/*.h++"
]),
hdrs = [\"lib/libconfig.h++\"],
visibility = [\"//visibility:public\"]
)
""",
sha256 = "a3ae202153fafb40558c26831429ce39845b2395ad8d30269a50e309a7585a8c",
strip_prefix = "libconfig-1.7.2",
)
```
The issue can be triggered by specifying libconfig as a dependency:
```
cc_library(
...,
deps = [
...,
"@libconfig//:lib"
],
)
```
### What operating system are you running Bazel on?
MacOS and Ubuntu Xenial.
### What's the output of `bazel info release`?
release 0.24.1
### Have you found anything relevant by searching the web?
I found #302 which is the same issue but for files with `.c++` extension. I have not found anything related to header files. I imagine that this naming system is fairly rare.
| [
"src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
index 1ccaf58a3ee020..2db8ed95ca1de7 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
@@ -41,7 +41,7 @@ public final class CppFileTypes {
FileTypeSet.of(CppFileTypes.CPP_SOURCE, CppFileTypes.C_SOURCE);
public static final FileType CPP_HEADER =
- FileType.of(".h", ".hh", ".hpp", ".ipp", ".hxx", ".inc", ".inl", ".tlh", ".tli", ".H");
+ FileType.of(".h", ".hh", ".hpp", ".ipp", ".hxx", ".h++", ".inc", ".inl", ".tlh", ".tli", ".H");
public static final FileType PCH = FileType.of(".pch");
public static final FileTypeSet OBJC_HEADER = FileTypeSet.of(CPP_HEADER, PCH);
| null | train | train | 2019-06-06T10:23:25 | "2019-04-23T07:01:37Z" | macbutch | test |
bazelbuild/bazel/8124_9377 | bazelbuild/bazel | bazelbuild/bazel/8124 | bazelbuild/bazel/9377 | [
"timestamp(timedelta=0.0, similarity=0.8410558750698534)"
] | 41a8dfd2c511933a8d7d7b5014da1258b8e5b07d | bb8563909ec0dacce2ef8040b270f2a9bd718d48 | [] | [] | "2019-09-12T21:04:34Z" | [
"P2",
"team-Rules-Java"
] | Unclear documentation for JavaInfo transitive | https://docs.bazel.build/versions/master/skylark/lib/JavaInfo.html
It is unclear what the difference is between `transitive_compile_time_jars` and `transitive_deps`.
It is unclear what the difference is between `transitive_runtime_deps` and `transitive_runtime_jars`. | [
"src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java"
] | [
"src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java
index e05196d42418c1..1ccb862e7bf738 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/java/JavaInfoApi.java
@@ -35,60 +35,63 @@
*/
@SkylarkModule(
name = "JavaInfo",
- doc = "Encapsulates all information provided by Java rules.",
+ doc = "A provider encapsulating information about Java and Java-like targets.",
category = SkylarkModuleCategory.PROVIDER)
public interface JavaInfoApi <FileT extends FileApi> extends StructApi {
@SkylarkCallable(
name = "transitive_runtime_jars",
- doc = "Depset of runtime jars required by this target",
+ doc = "Returns a transitive set of Jars required on the target's runtime classpath. Returns the same as "
+ + "<code><a class=\"anchor\" href=\"JavaInfo.html#transitive_runtime_deps\">JavaInfo.transitive_runtime_deps</a></code> "
+ + "for legacy reasons.",
structField = true
)
public SkylarkNestedSet getTransitiveRuntimeJars();
@SkylarkCallable(
name = "transitive_compile_time_jars",
- doc =
- "Depset of compile time jars recursively required by this target. See `compile_jars` "
- + "for more details.",
+ doc = "Returns the transitive set of Jars required to build the target. Returns the same as "
+ + "<code><a class=\"anchor\" href=\"JavaInfo.html#transitive_deps\">JavaInfo.transitive_deps</a></code> "
+ + "for legacy reasons.",
structField = true)
public SkylarkNestedSet getTransitiveCompileTimeJars();
@SkylarkCallable(
name = "compile_jars",
doc =
- "Returns the compile time jars required by this target directly. They can be: <ul><li>"
- + " interface jars (ijars), if an ijar tool was used</li><li> normal full jars, if"
- + " no ijar action was requested</li><li> both ijars and normal full jars, if this"
- + " provider was created by merging two or more providers created with different"
- + " ijar requests </li> </ul>",
+ "Returns the Jars required by this target directly at compile time. They can be interface jars "
+ + "(ijar or hjar), regular jars or both, depending on whether rule implementations chose to create "
+ + "interface jars or not.",
structField = true)
public SkylarkNestedSet getCompileTimeJars();
@SkylarkCallable(
name = "full_compile_jars",
doc =
- "Returns the full compile time jars required by this target directly. They can be"
- + " <ul><li> the corresponding normal full jars of the ijars returned by"
- + " `compile_jars`</li><li> the normal full jars returned by"
- + " `compile_jars`</li></ul>Note: `compile_jars` can return a mix of ijars and"
- + " normal full jars. In that case, `full_compile_jars` returns the corresponding"
- + " full jars of the ijars and the remaining normal full jars in `compile_jars`.",
+ "Returns the regular, full compile time Jars required by this target directly. They can be"
+ + " <ul><li> the corresponding regular Jars of the interface Jars returned by"
+ + " <code><a class=\"anchor\" href=\"JavaInfo.html#compile_jars\">JavaInfo.compile_jars</a></code></li>"
+ + "<li> the regular (full) Jars returned by"
+ + " <code><a class=\"anchor\" href=\"JavaInfo.html#compile_jars\">JavaInfo.compile_jars</a></code></li></ul>"
+ + "<p>Note: <code><a class=\"anchor\" href=\"JavaInfo.html#compile_jars\">JavaInfo.compile_jars</a></code> "
+ + "can return a mix of interface Jars and regular Jars."
+ + "<p>Only use this method if interface Jars don't work with your rule set(s) (e.g. some Scala targets)"
+ + " If you're working with Java-only targets it's preferable to use interface Jars via "
+ + "<code><a class=\"anchor\" href=\"JavaInfo.html#compile_jars\">JavaInfo.compile_jars</a></code></li>",
structField = true)
public SkylarkNestedSet getFullCompileTimeJars();
@SkylarkCallable(
name = "source_jars",
- doc = "Returns a list of jar files containing all the uncompiled source files (including "
- + "those generated by annotations) from the target itself, i.e. NOT including the sources of "
- + "the transitive dependencies",
+ doc = "Returns a list of Jars with all the source files (including those generated by annotations) of the target "
+ + " itself, i.e. NOT including the sources of the transitive dependencies.",
structField = true
)
public SkylarkList<FileT> getSourceJars();
@SkylarkCallable(
name = "outputs",
- doc = "Returns information about outputs of this Java target.",
+ doc = "Returns information about outputs of this Java/Java-like target.",
structField = true,
allowReturnNones = true
)
@@ -98,7 +101,7 @@ public interface JavaInfoApi <FileT extends FileApi> extends StructApi {
name = "annotation_processing",
structField = true,
allowReturnNones = true,
- doc = "Returns information about annotation processing for this Java target."
+ doc = "Returns information about annotation processing for this Java/Java-like target."
)
public JavaAnnotationProcessingApi<?> getGenJarsProvider();
@@ -106,34 +109,37 @@ public interface JavaInfoApi <FileT extends FileApi> extends StructApi {
name = "compilation_info",
structField = true,
allowReturnNones = true,
- doc = "Returns compilation information for this Java target."
+ doc = "Returns compilation information for this Java/Java-like target."
)
public JavaCompilationInfoProviderApi<?> getCompilationInfoProvider();
@SkylarkCallable(
name = "runtime_output_jars",
- doc = "Returns the runtime output jars provided by this Java target.",
+ doc = "Returns a list of runtime Jars created by this Java/Java-like target.",
structField = true)
public SkylarkList<FileT> getRuntimeOutputJars();
@SkylarkCallable(
name = "transitive_deps",
- doc = "Returns the transitive set of Jars required to build the target.",
+ doc = "Returns the transitive set of Jars required to build the target. Returns the same as "
+ + "<code><a class=\"anchor\" href=\"JavaInfo.html#transitive_compile_time_jars\">JavaInfo.transitive_compile_time_jars</a></code> "
+ + "for legacy reasons.",
structField = true
)
public NestedSet<FileT> getTransitiveDeps();
@SkylarkCallable(
name = "transitive_runtime_deps",
- doc = "Returns the transitive set of Jars required on the target's runtime classpath.",
+ doc = "Returns the transitive set of Jars required on the target's runtime classpath. Returns the same as "
+ + "<code><a class=\"anchor\" href=\"JavaInfo.html#transitive_runtime_jars\">JavaInfo.transitive_runtime_jars</a></code>"
+ + " for legacy reasons.",
structField = true
)
public NestedSet<FileT> getTransitiveRuntimeDeps();
@SkylarkCallable(
name = "transitive_source_jars",
- doc = "Returns the Jars containing Java source files for the target "
- + "and all of its transitive dependencies.",
+ doc = "Returns the Jars containing source files of the current target and all of its transitive dependencies.",
structField = true
)
public NestedSet<FileT> getTransitiveSourceJars();
@@ -141,7 +147,7 @@ public interface JavaInfoApi <FileT extends FileApi> extends StructApi {
@SkylarkCallable(
name = "transitive_exports",
structField = true,
- doc = "Returns transitive set of labels that are being exported from this rule."
+ doc = "Returns a set of labels that are being exported from this rule transitively."
)
public NestedSet<Label> getTransitiveExports();
| null | train | train | 2019-09-12T20:45:16 | "2019-04-24T02:07:59Z" | pauldraper | test |
bazelbuild/bazel/8136_9105 | bazelbuild/bazel | bazelbuild/bazel/8136 | bazelbuild/bazel/9105 | [
"timestamp(timedelta=1533.0, similarity=0.9142795228005521)"
] | 320e45abe7bb12b954cb6e4566084bdbd45985eb | fd08307b6e5feb2a717365e4ed8355946b9631ba | [
"According to https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/191#annotation-flags_ready_to_flip this is ready to go after 0.29 is cut.",
"This flag is now flipped."
] | [] | "2019-08-07T14:03:47Z" | [
"team-Configurability",
"incompatible-change"
] | incompatible_disallow_rule_execution_platform_constraints_allowed: Disallow the execution_platform_constraints_allowed attribute to rule | As part of #8134, we need to remove the `execution_platform_constraints_allowed` attribute to Starlark's `rule()` function. After the attribute is removed, all targets will be able to use `exec_compatible_with` to add restrictions on the execution platform.
# Migration
Remove any existing uses of `execution_platform_constraints_allowed` from rules. All rules will be able to use `execution_platform_constraints`.
# Timeline
Flag added: Bazel 0.26
Flag flipped: Bazel 0.27 (expected)
| [
"src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java",
"src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java",
"src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java"
] | [
"src/test/shell/bazel/toolchain_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
index 0b28c8635390e1..ed59d033834f2c 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
@@ -386,7 +386,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl
@Option(
name = "incompatible_disallow_rule_execution_platform_constraints_allowed",
- defaultValue = "False",
+ defaultValue = "True",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
index 9865368bd63ecd..58fe2c502c62de 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
@@ -276,7 +276,7 @@ public static Builder builderWithDefaults() {
.incompatibleDisallowLegacyJavaProvider(false)
.incompatibleDisallowLegacyJavaInfo(false)
.incompatibleDisallowOldStyleArgsAdd(true)
- .incompatibleDisallowRuleExecutionPlatformConstraintsAllowed(false)
+ .incompatibleDisallowRuleExecutionPlatformConstraintsAllowed(true)
.incompatibleDisallowStructProviderSyntax(false)
.incompatibleDisallowUnverifiedHttpDownloads(true)
.incompatibleExpandDirectories(true)
| diff --git a/src/test/shell/bazel/toolchain_test.sh b/src/test/shell/bazel/toolchain_test.sh
index 5b4f707b4c5905..1b75ce1155fa5d 100755
--- a/src/test/shell/bazel/toolchain_test.sh
+++ b/src/test/shell/bazel/toolchain_test.sh
@@ -1003,7 +1003,6 @@ sample_rule = rule(
implementation = _impl,
attrs = {},
toolchains = ['//toolchain:test_toolchain'],
- execution_platform_constraints_allowed = True,
)
EOF
@@ -1074,7 +1073,6 @@ sample_rule = rule(
'//platforms:value2',
],
toolchains = ['//toolchain:test_toolchain'],
- execution_platform_constraints_allowed = True,
)
EOF
@@ -1453,7 +1451,6 @@ sample_rule = rule(
attrs = {
"dep": attr.label(cfg = 'exec'),
},
- execution_platform_constraints_allowed = True,
)
def _display_platform_impl(ctx):
| train | train | 2019-08-07T16:37:42 | "2019-04-24T18:47:20Z" | katre | test |
bazelbuild/bazel/8216_9338 | bazelbuild/bazel | bazelbuild/bazel/8216 | bazelbuild/bazel/9338 | [
"timestamp(timedelta=0.0, similarity=0.8506912288053868)"
] | d3f8efca72a0e2013467c033df1bf58dd76e8a10 | b74767dab209b193181af25af79c866178cb71ac | [
"I agree. disk cache should always be read/write and the `remote_upload_local_results` flag should only apply to remote caching.",
"Hey @ishikhman! Have you had a chance to look any further into this?",
"@SrodriguezO we love contributions :)",
"We're happy to help! Just wanted to avoid duplicate efforts, since the issue's assigned. We can start looking into it next week.",
"We'll still hold off to hear back from @ishikhman though (to avoid duplicate efforts)",
"> We'll still hold off to hear back from @ishikhman though (to avoid duplicate efforts)\r\n\r\nunfortunately, not yet. That would be really great if you could look into it! Removed myself from the assignment ;) ",
"Silly me.. I just realized this won't actually solve our problem :( \r\n\r\nWe're exploring a move to RBE and are hoping to utilize its remote cache, but it isn't compatible with local disk caching in the first place :/",
"@SrodriguezO it's just not been implemented yet. It should be a straightforward PR. Would also love your contribution :)",
"@buchgr I dug around a bit and it seems a bit involved. I opened a draft PR to test things out as well as a feature request to formalize the process and to get some input. I'd love your feedback. https://github.com/bazelbuild/bazel/issues/8690\r\n",
"@buchgr any chance we could mark this as a blocker for 1.0?",
"I am hopeful that we'll get this fixed before 1.0 (September 2nd). However, I don't think that it qualifies as a blocker. Why do you think so?",
"It just seems like this feature is dead in the water until this is fixed",
"@meteorcloudy it seems like we're missing the `incompatible-change` tracking issue for flipping the default value of --incompatible_remote_results_ignore_disk to true? Can you create it?",
"@coeuvre Can you help create the tracking issue for this remote execution flag? https://bazel.build/contribute/breaking-changes",
"Created #15148."
] | [
"Suggested rephrasing:\r\n\r\n\"If set to true, --noremote_upload_local_results will not apply to the disk cache. If a combined cache is used, --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. See #8216 for details.\"",
"Thanks.",
"I find the following version a bit more readable, but it's up to you: to change it or not :)\r\n `if (options.incompatibleUploadLocalResultsDiskOnly && !options.remoteUploadLocalResults)`",
"You'd need to negate the entire clause for those to be equivalent: \r\n`!(options.incompatibleUploadLocalResultsDiskOnly && !options.remoteUploadLocalResults)`\r\n\r\nI think either way works, but I prefer the original : )",
"I agree with @SrodriguezO, also prefer the original. More suggestions are welcome.",
"How come you removed this?",
"hmm I see that you moved the progress status down to the other block, but will the logic between here and there cause a delay?",
"Can we move the `options.diskCache != null && !options.diskCache.isEmpty())` part to a helper `usesDiskCache` method? ",
"Can we rename to `incompatible_remote_results_flags_ignore_disk`? The current name makes me think this flag makes remote results flags apply to the disk cache only (which is the opposite of what they do)",
"It passes the tests. I don't see a strong reason to keep it separate. I might be wrong. @ishikhman do you have more context on it?",
"```\r\n+ \"If a combined cache is used: \"\r\n+ \"\\n\\t--noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache\"\r\n+ \"\\n\\t--noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache.\"\r\n+ \"See #8216 for details.\"\r\n```",
"Good idea.",
"Sounds good. I prefer just `incompatible_remote_results_ignore_disk` to make it a bit shorter.",
"Done.",
"It wouldn't cause tests to fail, the message might just not show up right away",
"I don't see a bit difference to be honest. Should be fine both ways."
] | "2019-09-05T19:20:55Z" | [
"type: bug",
"team-Remote-Exec"
] | --disk_cache overrides --noremote_upload_local_results | ### Description of the feature request:
I would like to be able to use the `--disk_cache` as a read/write cache, but the remote cache as a read-only cache. I thought `--noremote_upload_local_results` would do this, but it seems that flag is just overridden by the `--disk_cache` option. It seems this is the expected behavior, since in #7512, I see it says:
>On put, Bazel will store items in both the disk and the HTTP cache.
Could this be changed to support this mixed use case?
### What underlying problem are you trying to solve with this feature?
We are still in the process of moving our build to bazel, and not all builds on dev machines are safe to be pushed to the shared remote cache, so we only populate the remote cache from CI builds. Being able to have a local cache is very helpful when switching between dev branches for super fast builds. Our current workaround is to run a remote cache on every machine that acts as a proxy to the real shared cache, but we would like to move away from all of that overhead. | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/disk/BUILD",
"src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java",
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/disk/BUILD",
"src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java",
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java"
] | [
"src/test/shell/bazel/remote/remote_execution_http_test.sh",
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java
index a5944544bf79bc..2a8d9ddd98f7a4 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteCacheClientFactory.java
@@ -47,11 +47,12 @@ public static RemoteCacheClient createDiskAndRemoteClient(
PathFragment diskCachePath,
boolean remoteVerifyDownloads,
DigestUtil digestUtil,
- RemoteCacheClient remoteCacheClient)
+ RemoteCacheClient remoteCacheClient,
+ RemoteOptions options)
throws IOException {
DiskCacheClient diskCacheClient =
createDiskCache(workingDirectory, diskCachePath, remoteVerifyDownloads, digestUtil);
- return new DiskAndRemoteCacheClient(diskCacheClient, remoteCacheClient);
+ return new DiskAndRemoteCacheClient(diskCacheClient, remoteCacheClient, options);
}
public static ReferenceCountedChannel createGrpcChannel(
@@ -159,7 +160,7 @@ private static RemoteCacheClient createDiskAndHttpCache(
RemoteCacheClient httpCache = createHttp(options, cred, digestUtil);
return createDiskAndRemoteClient(
- workingDirectory, diskCachePath, options.remoteVerifyDownloads, digestUtil, httpCache);
+ workingDirectory, diskCachePath, options.remoteVerifyDownloads, digestUtil, httpCache, options);
}
public static boolean isDiskCache(RemoteOptions options) {
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
index 9f4a11ba6ddcda..c589b37446e2d9 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
@@ -298,7 +298,8 @@ public void beforeCommand(CommandEnvironment env) throws AbruptExitException {
remoteOptions.diskCache,
remoteOptions.remoteVerifyDownloads,
digestUtil,
- cacheClient);
+ cacheClient,
+ remoteOptions);
}
RemoteCache remoteCache = new RemoteCache(cacheClient, remoteOptions, digestUtil);
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index 5c25075f592497..b1fa2a977dd09a 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -114,16 +114,11 @@ final class RemoteSpawnCache implements SpawnCache {
public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
throws InterruptedException, IOException, ExecException {
if (!Spawns.mayBeCached(spawn)
- || (!Spawns.mayBeCachedRemotely(spawn) && isRemoteCache(options))) {
+ || (!Spawns.mayBeCachedRemotely(spawn) && useRemoteCache(options))) {
// returning SpawnCache.NO_RESULT_NO_STORE in case the caching is disabled or in case
// the remote caching is disabled and the only configured cache is remote.
return SpawnCache.NO_RESULT_NO_STORE;
}
- boolean checkCache = options.remoteAcceptCached;
-
- if (checkCache) {
- context.report(ProgressStatus.CHECKING_CACHE, "remote-cache");
- }
SortedMap<PathFragment, ActionInput> inputMap = context.getInputMapping(true);
MerkleTree merkleTree =
@@ -150,7 +145,9 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
TracingMetadataUtils.contextWithMetadata(buildRequestId, commandId, actionKey);
Profiler prof = Profiler.instance();
- if (checkCache) {
+ if (options.remoteAcceptCached ||
+ (options.incompatibleRemoteResultsIgnoreDisk && useDiskCache(options))) {
+ context.report(ProgressStatus.CHECKING_CACHE, "remote-cache");
// Metadata will be available in context.current() until we detach.
// This is done via a thread-local variable.
Context previous = withMetadata.attach();
@@ -211,7 +208,8 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
context.prefetchInputs();
- if (options.remoteUploadLocalResults) {
+ if (options.remoteUploadLocalResults ||
+ (options.incompatibleRemoteResultsIgnoreDisk && useDiskCache(options))) {
return new CacheHandle() {
@Override
public boolean hasResult() {
@@ -297,7 +295,11 @@ private void report(Event evt) {
}
}
- private static boolean isRemoteCache(RemoteOptions options) {
+ private static boolean useRemoteCache(RemoteOptions options) {
return !isNullOrEmpty(options.remoteCache);
}
+
+ private static boolean useDiskCache(RemoteOptions options) {
+ return options.diskCache != null && !options.diskCache.isEmpty();
+ }
}
diff --git a/src/main/java/com/google/devtools/build/lib/remote/disk/BUILD b/src/main/java/com/google/devtools/build/lib/remote/disk/BUILD
index 434efb75402db1..97a78cfa7ad1d5 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/disk/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/remote/disk/BUILD
@@ -14,6 +14,7 @@ java_library(
tags = ["bazel"],
deps = [
"//src/main/java/com/google/devtools/build/lib/remote/common",
+ "//src/main/java/com/google/devtools/build/lib/remote/options",
"//src/main/java/com/google/devtools/build/lib/remote/util",
"//src/main/java/com/google/devtools/build/lib/vfs",
"//src/main/java/com/google/devtools/common/options",
diff --git a/src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java b/src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java
index 8307f8de26af11..8380d165005d83 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/disk/DiskAndRemoteCacheClient.java
@@ -21,6 +21,7 @@
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.devtools.build.lib.remote.common.RemoteCacheClient;
+import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.vfs.Path;
import com.google.protobuf.ByteString;
import java.io.IOException;
@@ -37,17 +38,21 @@ public final class DiskAndRemoteCacheClient implements RemoteCacheClient {
private final RemoteCacheClient remoteCache;
private final DiskCacheClient diskCache;
+ private final RemoteOptions options;
- public DiskAndRemoteCacheClient(DiskCacheClient diskCache, RemoteCacheClient remoteCache) {
+ public DiskAndRemoteCacheClient(DiskCacheClient diskCache, RemoteCacheClient remoteCache, RemoteOptions options) {
this.diskCache = Preconditions.checkNotNull(diskCache);
this.remoteCache = Preconditions.checkNotNull(remoteCache);
+ this.options = options;
}
@Override
public void uploadActionResult(ActionKey actionKey, ActionResult actionResult)
throws IOException, InterruptedException {
diskCache.uploadActionResult(actionKey, actionResult);
- remoteCache.uploadActionResult(actionKey, actionResult);
+ if (!options.incompatibleRemoteResultsIgnoreDisk || options.remoteUploadLocalResults) {
+ remoteCache.uploadActionResult(actionKey, actionResult);
+ }
}
@Override
@@ -60,7 +65,9 @@ public void close() {
public ListenableFuture<Void> uploadFile(Digest digest, Path file) {
try {
diskCache.uploadFile(digest, file).get();
- remoteCache.uploadFile(digest, file).get();
+ if (!options.incompatibleRemoteResultsIgnoreDisk || options.remoteUploadLocalResults) {
+ remoteCache.uploadFile(digest, file).get();
+ }
} catch (ExecutionException e) {
return Futures.immediateFailedFuture(e.getCause());
} catch (InterruptedException e) {
@@ -73,7 +80,9 @@ public ListenableFuture<Void> uploadFile(Digest digest, Path file) {
public ListenableFuture<Void> uploadBlob(Digest digest, ByteString data) {
try {
diskCache.uploadBlob(digest, data).get();
- remoteCache.uploadBlob(digest, data).get();
+ if (!options.incompatibleRemoteResultsIgnoreDisk || options.remoteUploadLocalResults) {
+ remoteCache.uploadBlob(digest, data).get();
+ }
} catch (ExecutionException e) {
return Futures.immediateFailedFuture(e.getCause());
} catch (InterruptedException e) {
@@ -130,22 +139,26 @@ public ListenableFuture<Void> downloadBlob(Digest digest, OutputStream out) {
return Futures.immediateFailedFuture(e);
}
- ListenableFuture<Void> download =
- closeStreamOnError(remoteCache.downloadBlob(digest, tempOut), tempOut);
- ListenableFuture<Void> saveToDiskAndTarget =
- Futures.transformAsync(
- download,
- (unused) -> {
- try {
- tempOut.close();
- diskCache.captureFile(tempPath, digest, /* isActionCache= */ false);
- } catch (IOException e) {
- return Futures.immediateFailedFuture(e);
- }
- return diskCache.downloadBlob(digest, out);
- },
- MoreExecutors.directExecutor());
- return saveToDiskAndTarget;
+ if (!options.incompatibleRemoteResultsIgnoreDisk || options.remoteAcceptCached) {
+ ListenableFuture<Void> download =
+ closeStreamOnError(remoteCache.downloadBlob(digest, tempOut), tempOut);
+ ListenableFuture<Void> saveToDiskAndTarget =
+ Futures.transformAsync(
+ download,
+ (unused) -> {
+ try {
+ tempOut.close();
+ diskCache.captureFile(tempPath, digest, /* isActionCache= */ false);
+ } catch (IOException e) {
+ return Futures.immediateFailedFuture(e);
+ }
+ return diskCache.downloadBlob(digest, out);
+ },
+ MoreExecutors.directExecutor());
+ return saveToDiskAndTarget;
+ } else {
+ return Futures.immediateFuture(null);
+ }
}
@Override
@@ -154,16 +167,20 @@ public ListenableFuture<ActionResult> downloadActionResult(ActionKey actionKey)
return diskCache.downloadActionResult(actionKey);
}
- return Futures.transformAsync(
- remoteCache.downloadActionResult(actionKey),
- (actionResult) -> {
- if (actionResult == null) {
- return Futures.immediateFuture(null);
- } else {
- diskCache.uploadActionResult(actionKey, actionResult);
- return Futures.immediateFuture(actionResult);
- }
- },
- MoreExecutors.directExecutor());
+ if (!options.incompatibleRemoteResultsIgnoreDisk || options.remoteAcceptCached) {
+ return Futures.transformAsync(
+ remoteCache.downloadActionResult(actionKey),
+ (actionResult) -> {
+ if (actionResult == null) {
+ return Futures.immediateFuture(null);
+ } else {
+ diskCache.uploadActionResult(actionKey, actionResult);
+ return Futures.immediateFuture(actionResult);
+ }
+ },
+ MoreExecutors.directExecutor());
+ } else {
+ return Futures.immediateFuture(null);
+ }
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
index 88571221363f3a..27c9fc925b91d9 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
@@ -143,6 +143,25 @@ public final class RemoteOptions extends OptionsBase {
help = "Whether to upload locally executed action results to the remote cache.")
public boolean remoteUploadLocalResults;
+ @Option(
+ name = "incompatible_remote_results_ignore_disk",
+ defaultValue = "false",
+ category = "remote",
+ documentationCategory = OptionDocumentationCategory.REMOTE,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ metadataTags = {
+ OptionMetadataTag.INCOMPATIBLE_CHANGE,
+ OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
+ },
+ help =
+ "If set to true, --noremote_upload_local_results and --noremote_accept_cached "
+ + "will not apply to the disk cache. "
+ + "If a combined cache is used:"
+ + "\n\t--noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache."
+ + "\n\t--noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache."
+ + "\nSee #8216 for details.")
+ public boolean incompatibleRemoteResultsIgnoreDisk;
+
@Option(
name = "remote_instance_name",
defaultValue = "",
| diff --git a/src/test/shell/bazel/remote/remote_execution_http_test.sh b/src/test/shell/bazel/remote/remote_execution_http_test.sh
index 2925a1a12a55d2..0bfafd14fc9644 100755
--- a/src/test/shell/bazel/remote/remote_execution_http_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_http_test.sh
@@ -364,6 +364,10 @@ EOF
function test_genrule_combined_disk_http_cache() {
# Test for the combined disk and http cache.
# Built items should be pushed to both the disk and http cache.
+ # If --noremote_upload_local_results flag is set,
+ # built items should only be pushed to the disk cache.
+ # If --noremote_accept_cached flag is set,
+ # built items should only be checked from the disk cache.
# If an item is missing on disk cache, but present on http cache,
# then bazel should copy it from http cache to disk cache on fetch.
@@ -383,11 +387,67 @@ EOF
rm -rf $cache
mkdir $cache
- # Build and push to disk and http cache
- bazel build $disk_flags $http_flags //a:test \
+ # Build and push to disk cache but not http cache
+ bazel build $disk_flags $http_flags --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results //a:test \
|| fail "Failed to build //a:test with combined disk http cache"
cp -f bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected
+ # Fetch from disk cache
+ bazel clean
+ bazel build $disk_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results &> $TEST_log \
+ || fail "Failed to fetch //a:test from disk cache"
+ expect_log "1 remote cache hit" "Fetch from disk cache failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Disk cache generated different result"
+
+ # No cache result from http cache, rebuild target
+ bazel clean
+ bazel build $http_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from http cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ rm -rf $cache
+ mkdir $cache
+
+ # No cache result from http cache, rebuild target, and upload result to http cache
+ bazel clean
+ bazel build $http_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from http cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ # No cache result from http cache, rebuild target, and upload result to disk cache
+ bazel clean
+ bazel build $disk_flags $http_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from http cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ # Fetch from disk cache
+ bazel clean
+ bazel build $disk_flags $http_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_log "1 remote cache hit" "Fetch from disk cache failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Disk cache generated different result"
+
+ rm -rf $cache
+ mkdir $cache
+
+ # Build and push to disk cache and http cache
+ bazel clean
+ bazel build $disk_flags $http_flags //a:test \
+ || fail "Failed to build //a:test with combined disk http cache"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Built target generated different result"
+
# Fetch from disk cache
bazel clean
bazel build $disk_flags //a:test &> $TEST_log \
diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 1ac08c6c6a18e3..90ac4d623182cb 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -1514,6 +1514,10 @@ EOF
function test_genrule_combined_disk_grpc_cache() {
# Test for the combined disk and grpc cache.
# Built items should be pushed to both the disk and grpc cache.
+ # If --noremote_upload_local_results flag is set,
+ # built items should only be pushed to the disk cache.
+ # If --noremote_accept_cached flag is set,
+ # built items should only be checked from the disk cache.
# If an item is missing on disk cache, but present on grpc cache,
# then bazel should copy it from grpc cache to disk cache on fetch.
@@ -1533,11 +1537,67 @@ EOF
rm -rf $cache
mkdir $cache
- # Build and push to disk and grpc cache
- bazel build $disk_flags $grpc_flags //a:test \
+ # Build and push to disk cache but not grpc cache
+ bazel build $disk_flags $grpc_flags --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results //a:test \
|| fail "Failed to build //a:test with combined disk grpc cache"
cp -f bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected
+ # Fetch from disk cache
+ bazel clean
+ bazel build $disk_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results &> $TEST_log \
+ || fail "Failed to fetch //a:test from disk cache"
+ expect_log "1 remote cache hit" "Fetch from disk cache failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Disk cache generated different result"
+
+ # No cache result from grpc cache, rebuild target
+ bazel clean
+ bazel build $grpc_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_upload_local_results &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from grpc cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ rm -rf $cache
+ mkdir $cache
+
+ # No cache result from grpc cache, rebuild target, and upload result to grpc cache
+ bazel clean
+ bazel build $grpc_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from grpc cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ # No cache result from grpc cache, rebuild target, and upload result to disk cache
+ bazel clean
+ bazel build $disk_flags $grpc_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_not_log "1 remote cache hit" "Should not get cache hit from grpc cache"
+ expect_log "1 linux-sandbox" "Rebuild target failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Rebuilt target generated different result"
+
+ # Fetch from disk cache
+ bazel clean
+ bazel build $disk_flags $grpc_flags //a:test --incompatible_remote_results_ignore_disk=true --noremote_accept_cached &> $TEST_log \
+ || fail "Failed to build //a:test"
+ expect_log "1 remote cache hit" "Fetch from disk cache failed"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Disk cache generated different result"
+
+ rm -rf $cache
+ mkdir $cache
+
+ # Build and push to disk cache and grpc cache
+ bazel clean
+ bazel build $disk_flags $grpc_flags //a:test \
+ || fail "Failed to build //a:test with combined disk grpc cache"
+ diff bazel-genfiles/a/test.txt ${TEST_TMPDIR}/test_expected \
+ || fail "Built target generated different result"
+
# Fetch from disk cache
bazel clean
bazel build $disk_flags //a:test &> $TEST_log \
| train | train | 2019-11-29T11:55:32 | "2019-05-01T21:39:17Z" | JaredNeil | test |
bazelbuild/bazel/8224_8914 | bazelbuild/bazel | bazelbuild/bazel/8224 | bazelbuild/bazel/8914 | [
"timestamp(timedelta=1.0, similarity=0.9213581146036626)"
] | 87506825333846359462f37d92b6f7bd2119f109 | 2cbd78014fef74158b94c4accbccba5afa6fc4e6 | [
"This makes sense, and definitely needs to happen. Thanks for catching it.",
"@buchgr did you mean `--remote_default_platform_properties` flag?",
"Yes!"
] | [
"maybe introduce a new reason?",
"sure, just wanted to make sure that it works this way first, and it is!\r\n\r\nI also spend some time trying to avoid using actionKeyContext - no good alternative so far - requires tooo many changes (like a lot). Will try add it to the BuildOptions maybe in the next experiment's round."
] | "2019-07-17T11:16:48Z" | [
"type: bug",
"team-Remote-Exec"
] | --remote_default_host_platform_properties should invalidate actions | If the contents of this flag change then skyframe actions should also be invalidated.
cc @katre | [
"src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java",
"src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java",
"src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java",
"src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java",
"src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java",
"src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"src/main/protobuf/action_cache.proto"
] | [
"src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java",
"src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java",
"src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java",
"src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java",
"src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java",
"src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"src/main/protobuf/action_cache.proto"
] | [
"src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java",
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java b/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java
index ca6195da22a3bc..899e05bb2cc847 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java
@@ -18,6 +18,7 @@
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSortedMap;
import com.google.devtools.build.lib.actions.ActionAnalysisMetadata.MiddlemanType;
import com.google.devtools.build.lib.actions.cache.ActionCache;
import com.google.devtools.build.lib.actions.cache.DigestUtils;
@@ -33,6 +34,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import javax.annotation.Nullable;
/**
@@ -223,7 +225,8 @@ public Token getTokenIfNeedToExecute(
Iterable<Artifact> resolvedCacheArtifacts,
Map<String, String> clientEnv,
EventHandler handler,
- MetadataHandler metadataHandler) {
+ MetadataHandler metadataHandler,
+ Map<String, String> remoteDefaultPlatformProperties) {
// TODO(bazel-team): (2010) For RunfilesAction/SymlinkAction and similar actions that
// produce only symlinks we should not check whether inputs are valid at all - all that matters
// that inputs and outputs are still exist (and new inputs have not appeared). All other checks
@@ -252,7 +255,7 @@ public Token getTokenIfNeedToExecute(
actionInputs = resolvedCacheArtifacts;
}
ActionCache.Entry entry = getCacheEntry(action);
- if (mustExecute(action, entry, handler, metadataHandler, actionInputs, clientEnv)) {
+ if (mustExecute(action, entry, handler, metadataHandler, actionInputs, clientEnv, remoteDefaultPlatformProperties)) {
if (entry != null) {
removeCacheEntry(action);
}
@@ -271,7 +274,8 @@ protected boolean mustExecute(
EventHandler handler,
MetadataHandler metadataHandler,
Iterable<Artifact> actionInputs,
- Map<String, String> clientEnv) {
+ Map<String, String> clientEnv,
+ Map<String, String> remoteDefaultPlatformProperties) {
// Unconditional execution can be applied only for actions that are allowed to be executed.
if (unconditionalExecution(action)) {
Preconditions.checkState(action.isVolatile());
@@ -304,6 +308,12 @@ protected boolean mustExecute(
actionCache.accountMiss(MissReason.DIFFERENT_ENVIRONMENT);
return true;
}
+ if (!entry.getRemoteDefaultPlatformPropertiesDigest().equals(
+ DigestUtils.fromEnv(remoteDefaultPlatformProperties))) {
+ reportDefaultPlatformChanged(handler, action);
+ actionCache.accountMiss(MissReason.DIFFERENT_DEFAULT_PLATFORM);
+ return true;
+ }
entry.getFileDigest();
actionCache.accountHit();
@@ -333,7 +343,8 @@ private static FileArtifactValue getMetadataMaybe(
}
public void updateActionCache(
- Action action, Token token, MetadataHandler metadataHandler, Map<String, String> clientEnv)
+ Action action, Token token, MetadataHandler metadataHandler, Map<String, String> clientEnv,
+ Map<String, String> remoteDefaultPlatformProperties)
throws IOException {
Preconditions.checkState(
cacheConfig.enabled(), "cache unexpectedly disabled, action: %s", action);
@@ -346,7 +357,7 @@ public void updateActionCache(
Map<String, String> usedClientEnv = computeUsedClientEnv(action, clientEnv);
ActionCache.Entry entry =
new ActionCache.Entry(
- action.getKey(actionKeyContext), usedClientEnv, action.discoversInputs());
+ action.getKey(actionKeyContext), usedClientEnv, action.discoversInputs(), ImmutableSortedMap.copyOf(remoteDefaultPlatformProperties));
for (Artifact output : action.getOutputs()) {
// Remove old records from the cache if they used different key.
String execPath = output.getExecPathString();
@@ -473,7 +484,7 @@ protected void checkMiddlemanAction(
// Compute the aggregated middleman digest.
// Since we never validate action key for middlemen, we should not store
// it in the cache entry and just use empty string instead.
- entry = new ActionCache.Entry("", ImmutableMap.<String, String>of(), false);
+ entry = new ActionCache.Entry("", ImmutableMap.<String, String>of(), false, ImmutableSortedMap.of());
for (Artifact input : action.getInputs()) {
entry.addFile(input.getExecPath(), getMetadataMaybe(metadataHandler, input));
}
@@ -531,6 +542,10 @@ private static void reportCorruptedCacheEntry(@Nullable EventHandler handler, Ac
reportRebuild(handler, action, "cache entry is corrupted");
}
+ private static void reportDefaultPlatformChanged(@Nullable EventHandler handler, Action action) {
+ reportRebuild(handler, action, "remote default platform properties were changed");
+ }
+
/** Wrapper for all context needed by the ActionCacheChecker to handle a single action. */
public static final class Token {
private final String cacheKey;
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java b/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java
index c6ab5604a23644..ff38f6f3035db0 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java
@@ -17,6 +17,7 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Lists;
import com.google.devtools.build.lib.actions.FileArtifactValue;
import com.google.devtools.build.lib.actions.cache.Protos.ActionCacheStatistics;
@@ -73,7 +74,7 @@ public interface ActionCache {
final class Entry {
/** Unique instance to represent a corrupted cache entry. */
public static final ActionCache.Entry CORRUPTED =
- new ActionCache.Entry(null, ImmutableMap.<String, String>of(), false);
+ new ActionCache.Entry(null, ImmutableMap.of(), false, ImmutableSortedMap.of());
private final String actionKey;
@Nullable
@@ -83,23 +84,28 @@ final class Entry {
private Map<String, FileArtifactValue> mdMap;
private Md5Digest md5Digest;
private final Md5Digest usedClientEnvDigest;
+ private final Md5Digest remoteDefaultPlatformPropertiesDigest;
- public Entry(String key, Map<String, String> usedClientEnv, boolean discoversInputs) {
+ public Entry(String key, Map<String, String> usedClientEnv, boolean discoversInputs,
+ ImmutableSortedMap<String, String> remoteDefaultPlatformProperties) {
actionKey = key;
this.usedClientEnvDigest = DigestUtils.fromEnv(usedClientEnv);
files = discoversInputs ? new ArrayList<String>() : null;
mdMap = new HashMap<>();
+ remoteDefaultPlatformPropertiesDigest = DigestUtils.fromEnv(remoteDefaultPlatformProperties);
}
public Entry(
String key,
Md5Digest usedClientEnvDigest,
@Nullable List<String> files,
- Md5Digest md5Digest) {
+ Md5Digest md5Digest,
+ Md5Digest remoteDefaultPlatformPropertiesDigest) {
actionKey = key;
this.usedClientEnvDigest = usedClientEnvDigest;
this.files = files;
this.md5Digest = md5Digest;
+ this.remoteDefaultPlatformPropertiesDigest = remoteDefaultPlatformPropertiesDigest;
mdMap = null;
}
@@ -171,6 +177,7 @@ public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(" actionKey = ").append(actionKey).append("\n");
builder.append(" usedClientEnvKey = ").append(usedClientEnvDigest).append("\n");
+ builder.append(" remoteDefaultPlatformDigest = ").append(remoteDefaultPlatformPropertiesDigest).append("\n");
builder.append(" digestKey = ");
if (md5Digest == null) {
builder.append(DigestUtils.fromMetadata(mdMap)).append(" (from mdMap)\n");
@@ -188,6 +195,10 @@ public String toString() {
}
return builder.toString();
}
+
+ public Md5Digest getRemoteDefaultPlatformPropertiesDigest() {
+ return remoteDefaultPlatformPropertiesDigest;
+ }
}
/**
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java b/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java
index f28478fb254b45..a46f9b244da70e 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java
@@ -374,12 +374,14 @@ private static byte[] encode(StringIndexer indexer, ActionCache.Entry entry) {
// + 5 bytes max for the file list length
// + 5 bytes max for each file id
// + 16 bytes for the environment digest
+ // + 16 bytes for the remote default platform properties digest
int maxSize =
VarInt.MAX_VARINT_SIZE
+ actionKeyBytes.length
+ Md5Digest.MD5_SIZE
+ VarInt.MAX_VARINT_SIZE
+ files.size() * VarInt.MAX_VARINT_SIZE
+ + Md5Digest.MD5_SIZE
+ Md5Digest.MD5_SIZE;
ByteArrayOutputStream sink = new ByteArrayOutputStream(maxSize);
@@ -394,6 +396,7 @@ private static byte[] encode(StringIndexer indexer, ActionCache.Entry entry) {
}
DigestUtils.write(entry.getUsedClientEnvDigest(), sink);
+ DigestUtils.write(entry.getRemoteDefaultPlatformPropertiesDigest(), sink);
return sink.toByteArray();
} catch (IOException e) {
@@ -433,11 +436,12 @@ private static ActionCache.Entry decode(StringIndexer indexer, byte[] data) thro
}
Md5Digest usedClientEnvDigest = DigestUtils.read(source);
+ Md5Digest remoteDefaultPlatformPropertiesDigest = DigestUtils.read(source);
if (source.remaining() > 0) {
throw new IOException("serialized entry data has not been fully decoded");
}
- return new ActionCache.Entry(actionKey, usedClientEnvDigest, files, md5Digest);
+ return new ActionCache.Entry(actionKey, usedClientEnvDigest, files, md5Digest, remoteDefaultPlatformPropertiesDigest);
} catch (BufferUnderflowException e) {
throw new IOException("encoded entry data is incomplete", e);
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
index 304cd369e06722..3650584cfab732 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
@@ -138,6 +138,7 @@ public SkyValue compute(SkyKey skyKey, Environment env)
// the value of the flag changes. We are doing this conditionally only in Bazel if remote
// execution is available in order to not introduce additional skyframe edges in Blaze.
PrecomputedValue.REMOTE_OUTPUTS_MODE.get(env);
+ PrecomputedValue.REMOTE_DEFAULT_PLATFORM_PROPERTIES.get(env);
}
// Look up the parts of the environment that influence the action.
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
index 8ce07edf9a0dcb..622842ddfbde57 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
@@ -110,6 +110,9 @@ public static <T> Injected injected(Precomputed<T> precomputed, T value) {
public static final Precomputed<RemoteOutputsMode> REMOTE_OUTPUTS_MODE =
new Precomputed<>(Key.create("remote_outputs_mode"));
+ public static final Precomputed<Map<String, String>> REMOTE_DEFAULT_PLATFORM_PROPERTIES =
+ new Precomputed<>(Key.create("remote_default_platform_properties"));
+
private final Object value;
@AutoCodec.Instantiator
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
index 1726c706ba1f06..397c523572323e 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
@@ -17,6 +17,7 @@
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.ListenableFuture;
@@ -73,6 +74,7 @@
import com.google.devtools.build.lib.actions.SpawnResult.MetadataLog;
import com.google.devtools.build.lib.actions.StoppedScanningActionEvent;
import com.google.devtools.build.lib.actions.TargetOutOfDateException;
+import com.google.devtools.build.lib.actions.UserExecException;
import com.google.devtools.build.lib.actions.cache.MetadataHandler;
import com.google.devtools.build.lib.buildtool.BuildRequestOptions;
import com.google.devtools.build.lib.cmdline.Label;
@@ -639,6 +641,8 @@ Token checkActionCache(
Map<String, String> clientEnv) {
Token token;
try (SilentCloseable c = profiler.profile(ProfilerTask.ACTION_CHECK, action.describe())) {
+ RemoteOptions remoteOptions = this.options.getOptions(RemoteOptions.class);
+ SortedMap<String, String> remoteDefaultProperties = remoteOptions != null ? remoteOptions.getRemoteDefaultExecProperties() : ImmutableSortedMap.of();
token =
actionCacheChecker.getTokenIfNeedToExecute(
action,
@@ -647,7 +651,10 @@ Token checkActionCache(
options.getOptions(BuildRequestOptions.class).explanationPath != null
? reporter
: null,
- metadataHandler);
+ metadataHandler,
+ remoteDefaultProperties);
+ } catch (UserExecException e) {
+ throw new IllegalStateException("failed to check action cache for " + action.prettyPrint(), e);
}
if (token == null) {
boolean eventPosted = false;
@@ -699,8 +706,10 @@ void updateActionCache(
return;
}
try {
- actionCacheChecker.updateActionCache(action, token, metadataHandler, clientEnv);
- } catch (IOException e) {
+ RemoteOptions remoteOptions = this.options.getOptions(RemoteOptions.class);
+ SortedMap<String, String> remoteDefaultProperties = remoteOptions != null ? remoteOptions.getRemoteDefaultExecProperties() : ImmutableSortedMap.of();
+ actionCacheChecker.updateActionCache(action, token, metadataHandler, clientEnv, remoteDefaultProperties);
+ } catch (IOException | UserExecException e) {
// Skyframe has already done all the filesystem access needed for outputs and swallows
// IOExceptions for inputs. So an IOException is impossible here.
throw new IllegalStateException(
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index ad330bfddc6532..b1f254cf7f3cfc 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -63,6 +63,7 @@
import com.google.devtools.build.lib.actions.FilesetOutputSymlink;
import com.google.devtools.build.lib.actions.MetadataProvider;
import com.google.devtools.build.lib.actions.ResourceManager;
+import com.google.devtools.build.lib.actions.UserExecException;
import com.google.devtools.build.lib.analysis.AnalysisProtos.ActionGraphContainer;
import com.google.devtools.build.lib.analysis.AspectCollection;
import com.google.devtools.build.lib.analysis.BlazeDirectories;
@@ -2673,6 +2674,11 @@ public void sync(
? remoteOptions.remoteOutputsMode
// If no value is specified then set it to some value so that it's not null.
: RemoteOutputsMode.ALL);
+ try {
+ setRemoteDefaultPlatformProperties(remoteOptions != null ? remoteOptions.getRemoteDefaultExecProperties() : ImmutableMap.of());
+ } catch (UserExecException e) {
+ throw new IllegalStateException("Failed to initialize the graph", e);
+ }
syncPackageLoading(
packageCacheOptions,
pathPackageLocator,
@@ -2713,6 +2719,10 @@ protected void syncPackageLoading(
invalidateTransientErrors();
}
+ private void setRemoteDefaultPlatformProperties(Map<String, String> remoteDefaultPlatformProperties) {
+ PrecomputedValue.REMOTE_DEFAULT_PLATFORM_PROPERTIES.set(injectable(), remoteDefaultPlatformProperties);
+ }
+
private void getActionEnvFromOptions(CoreOptions opt) {
// ImmutableMap does not support null values, so use a LinkedHashMap instead.
LinkedHashMap<String, String> actionEnvironment = new LinkedHashMap<>();
diff --git a/src/main/protobuf/action_cache.proto b/src/main/protobuf/action_cache.proto
index 5694ebe34aeb0a..50846f73c930f4 100644
--- a/src/main/protobuf/action_cache.proto
+++ b/src/main/protobuf/action_cache.proto
@@ -40,6 +40,7 @@ message ActionCacheStatistics {
CORRUPTED_CACHE_ENTRY = 4;
NOT_CACHED = 5;
UNCONDITIONAL_EXECUTION = 6;
+ DIFFERENT_DEFAULT_PLATFORM = 7;
}
// Detailed information for a particular miss reason.
| diff --git a/src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java b/src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java
index 42ac908cc9f065..8c77f24bb41d52 100644
--- a/src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java
@@ -18,6 +18,7 @@
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSortedMap;
import com.google.devtools.build.lib.actions.ActionCacheChecker.Token;
import com.google.devtools.build.lib.actions.cache.ActionCache;
import com.google.devtools.build.lib.actions.cache.CompactPersistentActionCache;
@@ -107,10 +108,36 @@ private void runAction(Action action, Map<String, String> clientEnv) throws Exce
}
Token token = cacheChecker.getTokenIfNeedToExecute(
- action, null, clientEnv, null, metadataHandler);
+ action, null, clientEnv, null, metadataHandler, ImmutableSortedMap.of());
if (token != null) {
// Real action execution would happen here.
- cacheChecker.updateActionCache(action, token, metadataHandler, clientEnv);
+ cacheChecker.updateActionCache(action, token, metadataHandler, clientEnv, ImmutableSortedMap.of());
+ }
+ }
+
+ private void runAction(Action action, Map<String, String> clientEnv, Map<String, String> platform)
+ throws Exception {
+ MetadataHandler metadataHandler = new FakeMetadataHandler();
+
+ for (Artifact artifact : action.getOutputs()) {
+ Path path = artifact.getPath();
+
+ // Record all action outputs as files to be deleted across tests to prevent cross-test
+ // pollution. We need to do this on a path basis because we don't know upfront which file
+ // system they live in so we cannot just recreate the file system. (E.g. all NullActions
+ // share an in-memory file system to hold dummy outputs.)
+ filesToDelete.add(path);
+
+ if (!path.exists()) {
+ FileSystemUtils.writeContentAsLatin1(path, "");
+ }
+ }
+
+ Token token = cacheChecker.getTokenIfNeedToExecute(
+ action, null, clientEnv, null, metadataHandler, platform);
+ if (token != null) {
+ // Real action execution would happen here.
+ cacheChecker.updateActionCache(action, token, metadataHandler, clientEnv, platform);
}
}
@@ -220,6 +247,36 @@ public Iterable<String> getClientEnvironmentVariables() {
.build());
}
+ @Test
+ public void testDifferentRemoteDefaultPlatform() throws Exception {
+ Action action = new NullAction();
+ Map<String, String> env = new HashMap<>();
+ env.put("unused-var", "1");
+
+ Map<String, String> platform = new HashMap<>();
+ platform.put("some-var", "1");
+ // Not cached.
+ runAction(action, env, platform);
+ // Cache hit because nothing changed.
+ runAction(action, env, platform);
+ // Cache miss because platform changed to an empty from a previous value.
+ runAction(action, env, ImmutableSortedMap.of());
+ // Cache hit with an empty platform.
+ runAction(action, env, ImmutableSortedMap.of());
+ // Cache miss because platform changed to a value from an empty one.
+ runAction(action, env, ImmutableSortedMap.copyOf(platform));
+ platform.put("another-var", "1234");
+ // Cache miss because platform value changed.
+ runAction(action, env, ImmutableSortedMap.copyOf(platform));
+
+ assertStatistics(
+ 2,
+ new MissDetailsBuilder()
+ .set(MissReason.DIFFERENT_DEFAULT_PLATFORM, 3)
+ .set(MissReason.NOT_CACHED, 1)
+ .build());
+ }
+
@Test
public void testDifferentFiles() throws Exception {
Action action = new NullAction();
diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 6b05261919114b..b017af1bce2e6e 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -1373,6 +1373,67 @@ EOF
[[ ! -f bazel-bin/test.runfiles/MANIFEST ]] || fail "expected output manifest to exist"
}
+
+function test_platform_default_properties_invalidation() {
+ # Test that when changing values of --remote_default_platform_properties all actions are
+ # invalidated.
+mkdir -p test
+ cat << EOF >> test/BUILD
+load(":skylark.bzl", "test_rule")
+
+test_rule(
+ name = "test",
+ out = "output.txt",
+ tags = ["no-cache", "no-remote", "local"]
+)
+EOF
+
+ cat << 'EOF' >> test/skylark.bzl
+def _test_impl(ctx):
+ ctx.actions.run_shell(outputs = [ctx.outputs.out],
+ command = ["touch", ctx.outputs.out.path])
+ files_to_build = depset([ctx.outputs.out])
+ return DefaultInfo(
+ files = files_to_build,
+ )
+
+test_rule = rule(
+ implementation=_test_impl,
+ attrs = {
+ "out": attr.output(mandatory = True),
+ },
+)
+EOF
+
+ bazel build \
+ --genrule_strategy=remote \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --remote_default_platform_properties='properties:{name:"build" value:"1234"}' \
+ //test:test >& $TEST_log || fail "Failed to build //a:remote"
+
+ expect_log "1 process: 1 remote"
+
+ bazel build \
+ --genrule_strategy=remote \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --remote_default_platform_properties='properties:{name:"build" value:"88888"}' \
+ //test:test >& $TEST_log || fail "Failed to build //a:remote"
+
+ # Changing --remote_default_platform_properties value should invalidate SkyFrames in-memory
+ # caching and make it re-run the action.
+ expect_log "1 process: 1 remote"
+
+ bazel build \
+ --genrule_strategy=remote \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --remote_default_platform_properties='properties:{name:"build" value:"88888"}' \
+ //test:test >& $TEST_log || fail "Failed to build //a:remote"
+
+ # The same value of --remote_default_platform_properties should NOT invalidate SkyFrames in-memory cache
+ # and make the action should not be re-run.
+ expect_log "0 processes"
+}
+
# TODO(alpha): Add a test that fails remote execution when remote worker
# supports sandbox.
| train | train | 2019-09-19T17:44:36 | "2019-05-02T11:27:05Z" | buchgr | test |
bazelbuild/bazel/8283_8510 | bazelbuild/bazel | bazelbuild/bazel/8283 | bazelbuild/bazel/8510 | [
"timestamp(timedelta=0.0, similarity=0.9104500804793587)"
] | 3290e22356b59371274849ee51297635b9435285 | 35a7e26254007e2736b56339959bcbe78c3456cd | [
"In preparing for the new 64 bit support requirment incoming for August 1st https://developer.android.com/distribute/best-practices/develop/64-bit\r\n\r\nI have come across this issue as well. Is there a recommended workaround? Right now our best option seems to be to generate both versions separately, merge them and sign the resulting APK.",
"Hi, my team has also found this issue. Is there any plan to address this soon/before the August 1st cut off?",
"Bumping this up due to the hard requirement on apps depending on multi-arch splits over 32 and 64 bit native libs.",
"WIP fix: https://github.com/bazelbuild/bazel/pull/8510\r\n\r\nUsing https://github.com/jin/repro/tree/master/8283 as repro:\r\n\r\n```\r\n$ bazel-dev build --fat_apk_cpu=armeabi-v7a,x86 :app && zipinfo bazel-bin/app.apk\r\nINFO: Analyzed target //:app (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nTarget //:app up-to-date:\r\n bazel-bin/app_deploy.jar\r\n bazel-bin/app_unsigned.apk\r\n bazel-bin/app.apk\r\nINFO: Elapsed time: 0.222s, Critical Path: 0.00s\r\nINFO: 0 processes.\r\nINFO: Build completed successfully, 1 total action\r\nArchive: bazel-bin/app.apk\r\nZip file size: 475815 bytes, number of entries: 10\r\n-rw---- 2.0 fat 9 b- stor 10-Jan-01 00:00 nativedeps\r\n-rw---- 2.0 fat 21792 b- defN 10-Jan-01 00:00 lib/armeabi-v7a/libapp.so\r\n-rw---- 2.0 fat 6424 b- defN 10-Jan-01 00:00 lib/x86/libapp.so\r\n-rw---- 2.0 fat 920 bl defN 10-Jan-01 00:00 classes.dex\r\n-rw-rw-rw- 2.3 unx 1168 b- defX 10-Jan-01 00:00 AndroidManifest.xml\r\n?rw------- 2.0 unx 184888 b- stor 10-Jan-01 00:00 lib/armeabi-v7a/libenvoy_aar_jni.so\r\n?rw------- 2.0 unx 268104 b- stor 10-Jan-01 00:00 lib/x86/libenvoy_aar_jni.so\r\n-rw---- 2.0 fat 648 b- defN 10-Jan-01 00:00 META-INF/CERT.SF\r\n-rw---- 2.0 fat 1203 b- defN 10-Jan-01 00:00 META-INF/CERT.RSA\r\n-rw---- 2.0 fat 563 b- defN 10-Jan-01 00:00 META-INF/MANIFEST.MF\r\n```",
"The fix will be in 0.27.",
"Thanks @jin!"
] | [] | "2019-05-29T23:40:54Z" | [
"P1",
"team-Android"
] | `--fat_apk_cpu` doesn't pack multi-arch libraries from aar_import targets | If an aar contains .so files for multiple architectures (e.g. foo and bar), and an android_binary depends on this aar, `--fat_apk_cpu=foo,bar` doesn't pack both so files into the final APK correctly.
The current behavior only packs the .so for one target configuration into the APK. | [
"src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java"
] | [
"src/test/shell/bazel/android/BUILD",
"src/test/shell/bazel/android/aar_integration_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
index 8d85efc9cff4f5..c6d74a62fb3296 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
@@ -37,6 +37,7 @@
import com.google.devtools.build.lib.actions.ParamFileInfo;
import com.google.devtools.build.lib.actions.ParameterFile;
import com.google.devtools.build.lib.actions.ParameterFile.ParameterFileType;
+import com.google.devtools.build.lib.analysis.AnalysisUtils;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
import com.google.devtools.build.lib.analysis.FileProvider;
import com.google.devtools.build.lib.analysis.FilesToRunProvider;
@@ -46,6 +47,7 @@
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.Runfiles;
import com.google.devtools.build.lib.analysis.RunfilesProvider;
+import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.actions.ActionConstructionContext;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine.VectorArg;
@@ -454,8 +456,19 @@ public static RuleConfiguredTargetBuilder createAndroidBinary(
derivedJarFunction,
proguardOutputMap);
- NestedSet<Artifact> nativeLibsAar =
- AndroidCommon.collectTransitiveNativeLibs(ruleContext).build();
+ // Collect all native shared libraries across split transitions. Some AARs contain shared
+ // libraries across multiple architectures, e.g. x86 and armeabi-v7a, and need to be packed
+ // into the APK.
+ NestedSetBuilder<Artifact> transitiveNativeLibs = NestedSetBuilder.naiveLinkOrder();
+ for (Map.Entry<com.google.common.base.Optional<String>,
+ ? extends List<? extends TransitiveInfoCollection>> entry :
+ ruleContext.getSplitPrerequisites("deps").entrySet()) {
+ for (AndroidNativeLibsInfo provider : AnalysisUtils.getProviders(
+ entry.getValue(), AndroidNativeLibsInfo.PROVIDER)) {
+ transitiveNativeLibs.addTransitive(provider.getNativeLibs());
+ }
+ }
+ NestedSet<Artifact> nativeLibsAar = transitiveNativeLibs.build();
DexPostprocessingOutput dexPostprocessingOutput =
androidSemantics.postprocessClassesDexZip(
| diff --git a/src/test/shell/bazel/android/BUILD b/src/test/shell/bazel/android/BUILD
index e630e7f4cd7ca8..f3fd31364bf44e 100644
--- a/src/test/shell/bazel/android/BUILD
+++ b/src/test/shell/bazel/android/BUILD
@@ -55,6 +55,7 @@ sh_test(
srcs = ["aar_integration_test.sh"],
data = [
":android_helper",
+ "//external:android_ndk_for_testing",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
diff --git a/src/test/shell/bazel/android/aar_integration_test.sh b/src/test/shell/bazel/android/aar_integration_test.sh
index 545fff4f5f4453..06fdcd1a0ffe0f 100755
--- a/src/test/shell/bazel/android/aar_integration_test.sh
+++ b/src/test/shell/bazel/android/aar_integration_test.sh
@@ -110,4 +110,31 @@ EOF
assert_one_of $apk_contents "res/layout/mylayout.xml"
}
+function test_android_binary_fat_apk_contains_all_shared_libraries() {
+ create_new_workspace
+ setup_android_sdk_support
+ setup_android_ndk_support
+ # sample.aar contains native shared libraries for x86 and armeabi-v7a
+ cp "${TEST_SRCDIR}/io_bazel/src/test/shell/bazel/android/sample.aar" .
+ cat > AndroidManifest.xml <<EOF
+<manifest package="com.example"/>
+EOF
+ cat > BUILD <<EOF
+aar_import(
+ name = "sample",
+ aar = "sample.aar",
+)
+android_binary(
+ name = "app",
+ custom_package = "com.example",
+ manifest = "AndroidManifest.xml",
+ deps = [":sample"],
+)
+EOF
+ assert_build :app --fat_apk_cpu=x86,armeabi-v7a
+ apk_contents="$(zipinfo -1 bazel-bin/app.apk)"
+ assert_one_of $apk_contents "lib/x86/libapp.so"
+ assert_one_of $apk_contents "lib/armeabi-v7a/libapp.so"
+}
+
run_suite "aar_import integration tests"
| train | train | 2019-05-30T01:35:13 | "2019-05-09T22:14:30Z" | jin | test |
bazelbuild/bazel/8310_8314 | bazelbuild/bazel | bazelbuild/bazel/8310 | bazelbuild/bazel/8314 | [
"timestamp(timedelta=0.0, similarity=0.887577316376066)"
] | cad310fdd047659fb1435ba16bcb1802dabe0ada | 85c96d91f3186f93b2d3ad6ce8890b106e686751 | [
"@meteorcloudy : do you have time to fix this or shall I?",
"Can you fix this? Thanks!",
"Will do, thanks!"
] | [
"Can we set default to None here? If so, we don't need enable_warning = False, either.",
"We can't, because then `_get_path_env_var` fail when SYSTEMROOT is undefined.",
"But we could just set default to `c:\\windows`, let me do that.",
"Sounds good, but for \"BAZEL_VC\" and \"BAZEL_VS\", I guess we can set the default to None? It will make the code a bit cleaner.",
"Done.",
"You're right! Done. Much nicer indeed!"
] | "2019-05-14T11:37:12Z" | [
"type: feature request",
"P2",
"area-Windows",
"team-OSS"
] | Windows: BAZEL_* envvars should support quotes | ### Description of the problem / feature request:
Allow `BAZEL_VC` and other `BAZEL_*` envvars to have quotes in them.
Quotes are never allows in Windows paths, so the quote cannot be part of the path, so de-quoting is safe.
Quotes appear when using TAB-completion in cmd.exe, as one sets the envvar. A tab-completion sequence typically looks like:
1. `C:\>set BAZEL_VC=C:\Progra<TAB><TAB>`
1. `C:\>set BAZEL_VC="C:\Program Files (x86)"`
1. `C:\>set BAZEL_VC="C:\Program Files (x86)"\Micros<TAB>...<TAB>`
1. `C:\>set BAZEL_VC="C:\Program Files (x86)\Microsoft Visual Studio 14.0"`
1. `C:\>set BAZEL_VC="C:\Program Files (x86)\Microsoft Visual Studio 14.0"\V<TAB>`
1. `C:\>set BAZEL_VC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"<ENTER>`
The shell preserves these quotes so they become part of the envvar value, unless I manually delete them, which is annoying. Bazel could do this itself.
### What operating system are you running Bazel on?
Windows 10
### What's the output of `bazel info release`?
0.25.0 | [
"tools/cpp/windows_cc_configure.bzl"
] | [
"tools/cpp/windows_cc_configure.bzl"
] | [] | diff --git a/tools/cpp/windows_cc_configure.bzl b/tools/cpp/windows_cc_configure.bzl
index 84f755b43ea4bb..35d0d664a173db 100644
--- a/tools/cpp/windows_cc_configure.bzl
+++ b/tools/cpp/windows_cc_configure.bzl
@@ -26,6 +26,36 @@ load(
"resolve_labels",
)
+def _get_path_env_var(repository_ctx, name):
+ """Returns a path from an environment variable.
+
+ Removes quotes, replaces '/' with '\', and strips trailing '\'s."""
+ if name in repository_ctx.os.environ:
+ value = repository_ctx.os.environ[name]
+ if value[0] == "\"":
+ if len(value) == 1 or value[-1] != "\"":
+ auto_configure_fail("'%s' environment variable has no trailing quote" % name)
+ value = value[1:-1]
+ if "/" in value:
+ value = value.replace("/", "\\")
+ if value[-1] == "\\":
+ value = value.rstrip("\\")
+ return value
+ else:
+ return None
+
+def _get_temp_env(repository_ctx):
+ """Returns the value of TMP, or TEMP, or if both undefined then C:\Windows."""
+ tmp = _get_path_env_var(repository_ctx, "TMP")
+ if not tmp:
+ tmp = _get_path_env_var(repository_ctx, "TEMP")
+ if not tmp:
+ tmp = "C:\\Windows\\Temp"
+ auto_configure_warning(
+ "neither 'TMP' nor 'TEMP' environment variables are set, using '%s' as default" % tmp,
+ )
+ return tmp
+
def _auto_configure_warning_maybe(repository_ctx, msg):
"""Output warning message when CC_CONFIGURE_DEBUG is enabled."""
if is_cc_configure_debug(repository_ctx):
@@ -33,13 +63,16 @@ def _auto_configure_warning_maybe(repository_ctx, msg):
def _get_escaped_windows_msys_starlark_content(repository_ctx, use_mingw = False):
"""Return the content of msys cc toolchain rule."""
- bazel_sh = get_env_var(repository_ctx, "BAZEL_SH", "", False).replace("\\", "/").lower()
- tokens = bazel_sh.rsplit("/", 1)
msys_root = ""
- if tokens[0].endswith("/usr/bin"):
- msys_root = tokens[0][:len(tokens[0]) - len("usr/bin")]
- elif tokens[0].endswith("/bin"):
- msys_root = tokens[0][:len(tokens[0]) - len("bin")]
+ bazel_sh = _get_path_env_var(repository_ctx, "BAZEL_SH")
+ if bazel_sh:
+ bazel_sh = bazel_sh.replace("\\", "/").lower()
+ tokens = bazel_sh.rsplit("/", 1)
+ if tokens[0].endswith("/usr/bin"):
+ msys_root = tokens[0][:len(tokens[0]) - len("usr/bin")]
+ elif tokens[0].endswith("/bin"):
+ msys_root = tokens[0][:len(tokens[0]) - len("bin")]
+
prefix = "mingw64" if use_mingw else "usr"
tool_path_prefix = escape_string(msys_root) + prefix
tool_bin_path = tool_path_prefix + "/bin"
@@ -69,10 +102,14 @@ def _get_escaped_windows_msys_starlark_content(repository_ctx, use_mingw = False
def _get_system_root(repository_ctx):
"""Get System root path on Windows, default is C:\\\Windows. Doesn't %-escape the result."""
- if "SYSTEMROOT" in repository_ctx.os.environ:
- return escape_string(repository_ctx.os.environ["SYSTEMROOT"])
- _auto_configure_warning_maybe(repository_ctx, "SYSTEMROOT is not set, using default SYSTEMROOT=C:\\Windows")
- return "C:\\Windows"
+ systemroot = _get_path_env_var(repository_ctx, "SYSTEMROOT")
+ if not systemroot:
+ systemroot = "C:\\Windows"
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "SYSTEMROOT is not set, using default SYSTEMROOT=C:\\Windows",
+ )
+ return escape_string(systemroot)
def _add_system_root(repository_ctx, env):
"""Running VCVARSALL.BAT and VCVARSQUERYREGISTRY.BAT need %SYSTEMROOT%\\\\system32 in PATH."""
@@ -85,13 +122,38 @@ def find_vc_path(repository_ctx):
"""Find Visual C++ build tools install path. Doesn't %-escape the result."""
# 1. Check if BAZEL_VC or BAZEL_VS is already set by user.
- if "BAZEL_VC" in repository_ctx.os.environ:
- return repository_ctx.os.environ["BAZEL_VC"]
+ bazel_vc = _get_path_env_var(repository_ctx, "BAZEL_VC")
+ if bazel_vc:
+ if repository_ctx.path(bazel_vc).exists:
+ return bazel_vc
+ else:
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "%BAZEL_VC% is set to non-existent path, ignoring.",
+ )
- if "BAZEL_VS" in repository_ctx.os.environ:
- return repository_ctx.os.environ["BAZEL_VS"] + "\\VC\\"
- _auto_configure_warning_maybe(repository_ctx, "'BAZEL_VC' is not set, " +
- "start looking for the latest Visual C++ installed.")
+ bazel_vs = _get_path_env_var(repository_ctx, "BAZEL_VS")
+ if bazel_vs:
+ if repository_ctx.path(bazel_vs).exists:
+ bazel_vc = bazel_vs + "\\VC"
+ if repository_ctx.path(bazel_vc).exists:
+ return bazel_vc
+ else:
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "No 'VC' directory found under %BAZEL_VS%, ignoring.",
+ )
+ else:
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "%BAZEL_VS% is set to non-existent path, ignoring.",
+ )
+
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "Neither %BAZEL_VC% nor %BAZEL_VS% are set, start looking for the latest Visual C++" +
+ " installed.",
+ )
# 2. Check if VS%VS_VERSION%COMNTOOLS is set, if true then try to find and use
# vcvarsqueryregistry.bat / VsDevCmd.bat to detect VC++.
@@ -108,7 +170,7 @@ def find_vc_path(repository_ctx):
]:
if vscommontools_env not in repository_ctx.os.environ:
continue
- script = repository_ctx.os.environ[vscommontools_env] + "\\" + script
+ script = _get_path_env_var(repository_ctx, vscommontools_env) + "\\" + script
if not repository_ctx.path(script).exists:
continue
repository_ctx.file(
@@ -148,7 +210,13 @@ def find_vc_path(repository_ctx):
# 4. Check default directories for VC installation
_auto_configure_warning_maybe(repository_ctx, "Looking for default Visual C++ installation directory")
- program_files_dir = get_env_var(repository_ctx, "PROGRAMFILES(X86)", default = "C:\\Program Files (x86)", enable_warning = True)
+ program_files_dir = _get_path_env_var(repository_ctx, "PROGRAMFILES(X86)")
+ if not program_files_dir:
+ program_files_dir = "C:\\Program Files (x86)"
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "'PROGRAMFILES(X86)' environment variable is not set, using '%s' as default" % program_files_dir,
+ )
for path in [
"Microsoft Visual Studio\\2019\\Preview\\VC",
"Microsoft Visual Studio\\2019\\BuildTools\\VC",
@@ -266,8 +334,9 @@ def find_llvm_path(repository_ctx):
"""Find LLVM install path."""
# 1. Check if BAZEL_LLVM is already set by user.
- if "BAZEL_LLVM" in repository_ctx.os.environ:
- return repository_ctx.os.environ["BAZEL_LLVM"]
+ bazel_llvm = _get_path_env_var(repository_ctx, "BAZEL_LLVM")
+ if bazel_llvm:
+ return bazel_llvm
_auto_configure_warning_maybe(repository_ctx, "'BAZEL_LLVM' is not set, " +
"start looking for LLVM installation on machine.")
@@ -290,7 +359,13 @@ def find_llvm_path(repository_ctx):
# 3. Check default directories for LLVM installation
_auto_configure_warning_maybe(repository_ctx, "Looking for default LLVM installation directory")
- program_files_dir = get_env_var(repository_ctx, "PROGRAMFILES", default = "C:\\Program Files", enable_warning = True)
+ program_files_dir = _get_path_env_var(repository_ctx, "PROGRAMFILES")
+ if not program_files_dir:
+ program_files_dir = "C:\\Program Files"
+ _auto_configure_warning_maybe(
+ repository_ctx,
+ "'PROGRAMFILES' environment variable is not set, using '%s' as default" % program_files_dir,
+ )
path = program_files_dir + "\\LLVM"
if repository_ctx.path(path).exists:
llvm_dir = path
@@ -416,9 +491,7 @@ def configure_windows_toolchain(repository_ctx):
escaped_paths = escape_string(env["PATH"])
escaped_include_paths = escape_string(env["INCLUDE"])
escaped_lib_paths = escape_string(env["LIB"])
- escaped_tmp_dir = escape_string(
- get_env_var(repository_ctx, "TMP", "C:\\Windows\\Temp").replace("\\", "\\\\"),
- )
+ escaped_tmp_dir = escape_string(_get_temp_env(repository_ctx).replace("\\", "\\\\"))
llvm_path = ""
if _use_clang_cl(repository_ctx):
| null | train | train | 2019-05-14T05:36:38 | "2019-05-14T07:25:54Z" | laszlocsomor | test |
bazelbuild/bazel/8316_9134 | bazelbuild/bazel | bazelbuild/bazel/8316 | bazelbuild/bazel/9134 | [
"timestamp(timedelta=1.0, similarity=0.8444108793819863)"
] | 71288e62330b5a8d3ba174112f4e7ed8fcf86558 | a9c9bbf72faa4b7408a7de24e361e00effbc47e8 | [
"Since this is Windows-specific and @meteorcloudy is in the Windows subteam, can we label this as \"team-Windows\"?",
"This is not entirely Windows specific, we will also enable native patch on other platforms. But since we are doing the work, I don't mind labeling it as \"team-Windows\"",
"Is this on track for 1.0?",
"Yes, waiting to be released in 0.29, then we can try to flip this flag. Will be default in 1.0."
] | [] | "2019-08-09T13:20:45Z" | [
"type: feature request",
"P1",
"area-Windows",
"team-OSS"
] | incompatible_use_native_patch: Use native patch in http_archive and git_repository rules | # Description
Bazel's [repository rules](https://github.com/bazelbuild/bazel/tree/master/tools/build_defs/repo) depends on `patch` and bash tools on all platforms. This requires users to install MSYS2 on Windows. We need to break the bash dependency from repository rule.
To break the dependency on the patch command line tool from repository rules, we implement patch in Bazel-native code and expose `repository_ctx.patch` API. Repository rules can use this API to apply patch file, but at the same time, we also allow fallback to patch command line tool in `http_archive` and `git_repository` rules.
Documentation: https://docs.bazel.build/versions/master/repo/http.html
A subtask of https://github.com/bazelbuild/bazel/issues/4319
# Migration plan
If your project is broken by this flag, it's probably because you're trying to apply an inaccurate patch file. To migrate your project, there are two ways:
- Fix your patch file to match the exact content you want to patch.
- Specify `patch_tool` attribute to `patch` (or a path to the patch tool you want to use), Bazel will fall back to use the patch command line tool instead of the native patch. But in this case, please make sure you have `patch` in PATH (or exist at the path you specified).
# Rollout plan
- Bazel 0.29.0 is expected to support this flag, with default value being false.
- Bazel 1.0 is expected to support this flag, with default value being true. | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
index 8081d54484d4bc..ce2ad4afdabd76 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
@@ -135,7 +135,7 @@ public class RepositoryOptions extends OptionsBase {
@Option(
name = "incompatible_use_native_patch",
- defaultValue = "false",
+ defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
| null | train | train | 2019-08-09T15:00:05 | "2019-05-14T12:45:17Z" | meteorcloudy | test |
bazelbuild/bazel/8340_8341 | bazelbuild/bazel | bazelbuild/bazel/8340 | bazelbuild/bazel/8341 | [
"timestamp(timedelta=0.0, similarity=0.9040380497836834)"
] | eaf066b3b8c2f6533cce1caed559540b1ca10252 | d6677fce4f93f388b436957fc7cf5800eb4d968f | [
"cc @ahumesky "
] | [] | "2019-05-15T22:14:24Z" | [
"team-Android",
"untriaged"
] | Improve build speed by not registering ImportDepsChecker actions in aar_import when --experimental_import_deps_checker is "off" | Since import deps checker is off by default in Bazel, don't register the action and create the jdeps output. Only register it if the levels are `warning` or `error`.
Build profiles for https://github.com/google/google-authenticator-android on a 12 core linux machine:
With importdepschecker:

Without importdepschecker:

The more AARs there are, the larger the impact of this change is.
| [
"src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java"
] | [
"src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
index b532c7dd1b029d..78008faac27e0f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
@@ -38,6 +38,7 @@
import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider;
import com.google.devtools.build.lib.rules.java.JavaCompilationArtifacts;
import com.google.devtools.build.lib.rules.java.JavaConfiguration;
+import com.google.devtools.build.lib.rules.java.JavaConfiguration.ImportDepsCheckingLevel;
import com.google.devtools.build.lib.rules.java.JavaInfo;
import com.google.devtools.build.lib.rules.java.JavaRuleOutputJarsProvider;
import com.google.devtools.build.lib.rules.java.JavaRuntimeInfo;
@@ -45,6 +46,7 @@
import com.google.devtools.build.lib.rules.java.JavaSkylarkApiProvider;
import com.google.devtools.build.lib.rules.java.JavaToolchainProvider;
import com.google.devtools.build.lib.vfs.PathFragment;
+import javax.annotation.Nullable;
/**
* An implementation for the aar_import rule.
@@ -147,29 +149,36 @@ public ConfiguredTarget create(RuleContext ruleContext)
/* bothDeps = */ targets);
javaSemantics.checkRule(ruleContext, common);
- Artifact jdepsArtifact = createAarArtifact(ruleContext, "jdeps.proto");
-
- common.setJavaCompilationArtifacts(
- new JavaCompilationArtifacts.Builder()
- .addRuntimeJar(mergedJar)
- .addCompileTimeJarAsFullJar(mergedJar)
- // Allow direct dependents to compile against un-merged R classes
- .addCompileTimeJarAsFullJar(
- ruleContext.getImplicitOutputArtifact(
- AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR))
- .setCompileTimeDependencies(jdepsArtifact)
- .build());
-
JavaConfiguration javaConfig = ruleContext.getFragment(JavaConfiguration.class);
- ImportDepsCheckActionBuilder.newBuilder()
- .bootclasspath(getBootclasspath(ruleContext))
- .declareDeps(getCompileTimeJarsFromCollection(targets, /*isDirect=*/ true))
- .transitiveDeps(getCompileTimeJarsFromCollection(targets, /*isDirect=*/ false))
- .checkJars(NestedSetBuilder.<Artifact>stableOrder().add(mergedJar).build())
- .importDepsCheckingLevel(javaConfig.getImportDepsCheckingLevel())
- .jdepsOutputArtifact(jdepsArtifact)
- .ruleLabel(ruleContext.getLabel())
- .buildAndRegister(ruleContext);
+ JavaCompilationArtifacts.Builder javaCompilationArtifactsBuilder =
+ new JavaCompilationArtifacts.Builder();
+
+ javaCompilationArtifactsBuilder
+ .addRuntimeJar(mergedJar)
+ .addCompileTimeJarAsFullJar(mergedJar)
+ // Allow direct dependents to compile against un-merged R classes
+ .addCompileTimeJarAsFullJar(
+ ruleContext.getImplicitOutputArtifact(
+ AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR));
+
+ Artifact jdepsArtifact = null;
+ // Don't register import deps checking actions if the level is off. Since it's off, the
+ // check isn't useful anyway, so don't waste resources running it.
+ if (javaConfig.getImportDepsCheckingLevel() != ImportDepsCheckingLevel.OFF) {
+ jdepsArtifact = createAarArtifact(ruleContext, "jdeps.proto");
+ javaCompilationArtifactsBuilder.setCompileTimeDependencies(jdepsArtifact);
+ ImportDepsCheckActionBuilder.newBuilder()
+ .bootclasspath(getBootclasspath(ruleContext))
+ .declareDeps(getCompileTimeJarsFromCollection(targets, /*isDirect=*/ true))
+ .transitiveDeps(getCompileTimeJarsFromCollection(targets, /*isDirect=*/ false))
+ .checkJars(NestedSetBuilder.<Artifact>stableOrder().add(mergedJar).build())
+ .importDepsCheckingLevel(javaConfig.getImportDepsCheckingLevel())
+ .jdepsOutputArtifact(jdepsArtifact)
+ .ruleLabel(ruleContext.getLabel())
+ .buildAndRegister(ruleContext);
+ }
+
+ common.setJavaCompilationArtifacts(javaCompilationArtifactsBuilder.build());
// We pass jdepsArtifact to create the action of extracting ANDROID_MANIFEST. Note that
// this action does not need jdepsArtifact. The only reason is that we need to check the
@@ -251,7 +260,7 @@ private static Action[] createSingleFileExtractorActions(
RuleContext ruleContext,
Artifact aar,
String filename,
- Artifact jdepsOutputArtifact,
+ @Nullable Artifact jdepsOutputArtifact,
Artifact outputArtifact) {
SpawnAction.Builder builder =
new SpawnAction.Builder()
| diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
index 3d5851acb9795e..e9bed20e0df358 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
@@ -265,8 +265,14 @@ public void testDepsCheckerActionExistsForLevelWarning() throws Exception {
}
@Test
- public void testDepsCheckerActionExistsForLevelOff() throws Exception {
- checkDepsCheckerActionExistsForLevel(ImportDepsCheckingLevel.OFF, "silence");
+ public void testDepsCheckerActionDoesNotExistsForLevelOff() throws Exception {
+ useConfiguration("--experimental_import_deps_checking=off");
+ ConfiguredTarget aarImportTarget = getConfiguredTarget("//a:bar");
+ OutputGroupInfo outputGroupInfo = aarImportTarget.get(OutputGroupInfo.SKYLARK_CONSTRUCTOR);
+ NestedSet<Artifact> outputGroup =
+ outputGroupInfo.getOutputGroup(OutputGroupInfo.HIDDEN_TOP_LEVEL);
+ assertThat(outputGroup).hasSize(1);
+ assertThat(ActionsTestUtil.getFirstArtifactEndingWith(outputGroup, "jdeps.proto")).isNull();
}
private void checkDepsCheckerActionExistsForLevel(
@@ -459,6 +465,7 @@ public void testExportsPropagatesResources() throws Exception {
@Test
public void testJavaCompilationArgsProvider() throws Exception {
+ useConfiguration("--experimental_import_deps_checking=ERROR");
ConfiguredTarget aarImportTarget = getConfiguredTarget("//a:bar");
JavaCompilationArgsProvider provider =
| train | train | 2019-05-15T23:14:14 | "2019-05-15T22:13:35Z" | jin | test |
bazelbuild/bazel/8393_8428 | bazelbuild/bazel | bazelbuild/bazel/8393 | bazelbuild/bazel/8428 | [
"timestamp(timedelta=0.0, similarity=0.859437736938755)"
] | ddce7235ef29a0aba727c265eae865d15af4ed09 | 7c7f2fc72bea165971ed2efbe5f616c41ef60d77 | [
"That's not an intended change (@agoulti). I think it should be possible to negate all our flags. WDYT @ishikhman?",
"I agree, we should keep the possibility to negate/disable all flags. It feels to me like a bug in a recent change that introduced a new set of flags.",
"Note that I just discovered that this is broken with `--experimental_execution_log_file` as well, which causes issues for us even without changing to the new flag.",
"I've submitted a fix for this https://github.com/bazelbuild/bazel/pull/8428"
] | [] | "2019-05-21T22:17:12Z" | [
"type: bug",
"team-Remote-Exec"
] | --execution_log_binary_file negation | Using bazel 0.26.0rc10 and `--execution_log_binary_file`, you cannot negate the argument with `--execution_log_binary_file=` as you could with `experimental_execution_log_file`. I'm not sure if it was intentional behavior before but previously passing:
```
bazel build //... --experimental_execution_log_file=foo.log --experimental_execution_log_file=
```
Would not write an execution log file. This is useful for when you have a configuration that implies `experimental_execution_log_file`, but for some reason you don't want to write it just for this build. | [
"src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java"
] | [
"src/test/shell/bazel/bazel_execlog_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java b/src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java
index dea75cf9938187..a2bb9cd30c96dd 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/SpawnLogModule.java
@@ -73,7 +73,7 @@ private void initOutputs(CommandEnvironment env) throws IOException {
FileSystem fileSystem = env.getRuntime().getFileSystem();
Path workingDirectory = env.getWorkingDirectory();
- if (executionOptions.executionLogBinaryFile != null) {
+ if (executionOptions.executionLogBinaryFile != null && !executionOptions.executionLogBinaryFile.isEmpty()) {
outputStreams.addStream(
new BinaryOutputStreamWrapper(
workingDirectory
@@ -81,7 +81,7 @@ private void initOutputs(CommandEnvironment env) throws IOException {
.getOutputStream()));
}
- if (executionOptions.executionLogJsonFile != null) {
+ if (executionOptions.executionLogJsonFile != null && !executionOptions.executionLogJsonFile.isEmpty()) {
outputStreams.addStream(
new JsonOutputStreamWrapper(
workingDirectory
@@ -90,7 +90,7 @@ private void initOutputs(CommandEnvironment env) throws IOException {
}
AsynchronousFileOutputStream outStream = null;
- if (executionOptions.executionLogFile != null) {
+ if (executionOptions.executionLogFile != null && !executionOptions.executionLogFile.isEmpty()) {
rawOutput = workingDirectory.getRelative(executionOptions.executionLogFile);
outStream =
new AsynchronousFileOutputStream(
| diff --git a/src/test/shell/bazel/bazel_execlog_test.sh b/src/test/shell/bazel/bazel_execlog_test.sh
index 6dfbdc251048f8..89b9e8443559d0 100755
--- a/src/test/shell/bazel/bazel_execlog_test.sh
+++ b/src/test/shell/bazel/bazel_execlog_test.sh
@@ -119,4 +119,28 @@ EOF
wc output || fail "no output produced"
}
+function test_negating_flags() {
+ cat > BUILD <<'EOF'
+genrule(
+ name = "rule",
+ outs = ["out.txt"],
+ cmd = "echo hello > $(location out.txt)"
+)
+EOF
+ bazel build //:all --experimental_execution_log_file=output --experimental_execution_log_file= 2>&1 >> $TEST_log || fail "could not build"
+ if [[ -e output ]]; then
+ fail "file shouldn't exist"
+ fi
+
+ bazel build //:all --execution_log_json_file=output --execution_log_json_file= 2>&1 >> $TEST_log || fail "could not build"
+ if [[ -e output ]]; then
+ fail "file shouldn't exist"
+ fi
+
+ bazel build //:all --execution_log_binary_file=output --execution_log_binary_file= 2>&1 >> $TEST_log || fail "could not build"
+ if [[ -e output ]]; then
+ fail "file shouldn't exist"
+ fi
+}
+
run_suite "execlog_tests"
| train | train | 2019-05-22T00:10:20 | "2019-05-17T23:08:34Z" | keith | test |
bazelbuild/bazel/8411_8440 | bazelbuild/bazel | bazelbuild/bazel/8411 | bazelbuild/bazel/8440 | [
"timestamp(timedelta=2039.0, similarity=0.8498988494004115)"
] | 207c24f04453ef026c202f2962e55d2a125e388f | 923c45faecaabd00e0214ff7d178507623958b37 | [] | [
"Can the input `bash_binary` ever be just `bash.exe` for example, which would mean \"whatever is on the PATH\"?",
"I think there are two ways to tell which shell binary to use, `BAZEL_SH` or `--shell_executable`. Both way requires user to set an absolute path. The only case `bash_binary` is a relative path (runfile path) is that when using shell toolchain (similar to python toolchain), but I'm not sure it's implemented.",
"But here, `python_binary` will just be `python` if nothing is specified.. I need to fix this.",
"Thanks, let me know when the PR is ready for another review.",
"Thanks for catching the problem! Please take a look again. ;)",
"Just checking: `bash_binary` can either be an absolute Bash path (from `BAZEL_SH` or `--shell_executable`), or (theoretically perhaps) a bash toolchain's runfiles-relative path. Correct?\r\n\r\nAnd it always ends with \"bash\" or \"bash.exe\" (so just \"bash\" without the extension), right?\r\n\r\nAny other option I'm missing?",
"What other values could `python_binary` have, and in what situations?",
"Everything you said I believe is true, I don't think there's any other option.",
"Similar to shell, we have\r\n\r\n1. `--python_path`, gives an absolute path\r\n2. `--python_top`, gives an runfile path\r\n3. python toolchain (`py_runtime`), gives a runfile path\r\n4. Default if nothing specified: `python`\r\n\r\n@brandjon Can confirm this.",
"Thanks for confirming that!",
"Could you please add a comment about this?",
"Thanks! Waiting for @brandjon to confirm before LGTM. Please add a comment in the code summarizing Jon's answer.",
"Will do that!",
"Oh, just realized I had a typo. It should be `GetBinaryPathWithoutExtension(bash_binary) != L\"bash\")`, `GetBinaryPathWithoutExtension` just strips out the ending `.exe` if there is any. I wanted to check if bash_binary is already `bash` or `bash.exe`. Similar for the python case.",
"Will add comment for this!",
"Both `--python_top` and Python toolchains select a `py_runtime` to use. `py_runtime` provides a runfiles path if its `interpreter` attribute is set, and an absolute path if its `interpreter_path` attribute is set (these attributes are exclusive).\r\n\r\n`--python_path` is validated to be an absolute path. If nothing is specified, the `python` default is passed along the same code path that `--python_path` uses but skips this validation check as a special case. It is intended that both of these approaches are deprecated and replaced by toolchains, with the `python` PATH lookup behavior provided by an autodetecting toolchain.",
"Thanks for the confirmation, I'll add those to comment",
"Rewrite comment as follows:\r\n\r\n> There are three kinds of values for `python_binary`:\r\n> 1. An absolute path to a system interpreter. This is the case if `--python_path` is set by the user, or if a `py_runtime` is used that has `interpreter_path` set.\r\n> 2. A runfile path to an in-workspace interpreter. This is the case if a `py_runtime` is used that has `interpreter` set.\r\n> 3. The special constant, \"python\". This is the default case if neither of the above apply.\r\n> Rlocation resolves runfiles paths to absolute paths, and if given an absolute path it leaves it alone, so it's suitable for cases 1 and 2.\r\n\r\nThere's a slight detail that the default toolchain's py_runtime on windows contains a sentinel value hack that tells bazel to use legacy --python_path, but I don't think we need to mention that in this comment.",
"Thanks for help with the comment!"
] | "2019-05-22T12:24:59Z" | [
"P1",
"type: process",
"team-Rules-Python"
] | Ensure Python tests run under Windows | We [currently disable](https://github.com/bazelbuild/bazel/blob/bdc6c10b674757df38982e71752aab8eddab47a0/src/test/shell/bazel/BUILD#L724-L725) some Python tests under Windows because until recently our CI machines didn't have both Python 2 and Python 3 available. Now that that's resolved, we should enable them.
P1 because this blocks fixing #7947, which in turn is needed to enable toolchains on Windows.
Separate from #6868, which concerns adding or OSSing test cases. | [
"src/tools/launcher/bash_launcher.cc",
"src/tools/launcher/python_launcher.cc"
] | [
"src/tools/launcher/bash_launcher.cc",
"src/tools/launcher/python_launcher.cc"
] | [] | diff --git a/src/tools/launcher/bash_launcher.cc b/src/tools/launcher/bash_launcher.cc
index 0020d5f92d55d3..67f0a5d53a2b51 100644
--- a/src/tools/launcher/bash_launcher.cc
+++ b/src/tools/launcher/bash_launcher.cc
@@ -30,6 +30,14 @@ static constexpr const char* BASH_BIN_PATH = "bash_bin_path";
ExitCode BashBinaryLauncher::Launch() {
wstring bash_binary = this->GetLaunchInfoByKey(BASH_BIN_PATH);
+
+ // If bash_binary is already "bash" or "bash.exe", that means we want to
+ // rely on the shell binary in PATH, no need to do Rlocation.
+ if (GetBinaryPathWithoutExtension(bash_binary) != L"bash") {
+ // Rlocation returns the original path if bash_binary is an absolute path.
+ bash_binary = this->Rlocation(bash_binary, true);
+ }
+
if (DoesFilePathExist(bash_binary.c_str())) {
wstring bash_bin_dir = GetParentDirFromPath(bash_binary);
wstring path_env;
diff --git a/src/tools/launcher/python_launcher.cc b/src/tools/launcher/python_launcher.cc
index c4d2d5c04670fd..be655cf1c4eeb2 100644
--- a/src/tools/launcher/python_launcher.cc
+++ b/src/tools/launcher/python_launcher.cc
@@ -30,6 +30,20 @@ static constexpr const char* WINDOWS_STYLE_ESCAPE_JVM_FLAGS = "escape_args";
ExitCode PythonBinaryLauncher::Launch() {
wstring python_binary = this->GetLaunchInfoByKey(PYTHON_BIN_PATH);
+
+ // There are three kinds of values for `python_binary`:
+ // 1. An absolute path to a system interpreter. This is the case if `--python_path` is set by the
+ // user, or if a `py_runtime` is used that has `interpreter_path` set.
+ // 2. A runfile path to an in-workspace interpreter. This is the case if a `py_runtime` is used
+ // that has `interpreter` set.
+ // 3. The special constant, "python". This is the default case if neither of the above apply.
+ // Rlocation resolves runfiles paths to absolute paths, and if given an absolute path it leaves
+ // it alone, so it's suitable for cases 1 and 2.
+ if (GetBinaryPathWithoutExtension(python_binary) != L"python") {
+ // Rlocation returns the original path if python_binary is an absolute path.
+ python_binary = this->Rlocation(python_binary, true);
+ }
+
// If specified python binary path doesn't exist, then fall back to
// python.exe and hope it's in PATH.
if (!DoesFilePathExist(python_binary.c_str())) {
| null | val | train | 2019-05-22T12:19:28 | "2019-05-20T19:18:33Z" | brandjon | test |
bazelbuild/bazel/8422_8426 | bazelbuild/bazel | bazelbuild/bazel/8422 | bazelbuild/bazel/8426 | [
"timestamp(timedelta=0.0, similarity=0.8609879841428745)"
] | b7a961517f928e6539b62f73bcb5b1c311396559 | 0bcdab22965da92139731bb5c696d1da9ff273f3 | [
"This should have been fixed by https://github.com/bazelbuild/bazel/commit/231270c67d5aa771462245531fa9b2ee7d3d0ae8, you're definitely on 0.25.2? It definitely appears to be in that tag https://github.com/bazelbuild/bazel/blob/0.25.2/tools/osx/xcode_locator.m#L181-L188\r\n\r\ncc @sayrer ",
"> you're definitely on 0.25.2?\r\n\r\nFYI, I'm using `bazelbuild/tap/bazel: stable 0.25.2`.",
"Can you try with the current 0.26.0 RC build? Found here https://releases.bazel.build/0.26.0/rc12/index.html",
"I've tried it but it didn't work:\r\n\r\nError message:\r\n```\r\nStarting local Bazel server and connecting to it...\r\nINFO: Analyzed target //main:hello-world (11 packages loaded, 123 targets configured).\r\nINFO: Found 1 target...\r\nERROR: /Users/soonhok/work/examples/cpp-tutorial/stage1/main/BUILD:1:1: C++ compilation of rule '//main:hello-world' failed: I/O exception during sandboxed execution: Running '/var/tmp/_bazel_soonhok/install/54a04d78acda2a8e5a7014da4e4d54ea/_embedded_binaries/xcode-locator 9.2.0.9C40b' failed.\r\nProcess terminated by signal 6\r\nstdout:\r\nstderr: 2019-05-21 14:53:15.131 xcode-locator[16168:46166] Found bundle com.apple.dt.Xcode in file:///Applications/Xcode.app/; contents on disk: (\r\n \"file:///Applications/Xcode.app/Contents/\"\r\n)\r\n2019-05-21 14:53:15.133 xcode-locator[16168:46166] Version strings for file:///Applications/Xcode.app/: short=9.2, expanded=9.2.0\r\n2019-05-21 14:53:15.134 xcode-locator[16168:46166] -[__NSPlaceholderDictionary initWithContentsOfURL:error:]: unrecognized selector sent to instance 0x7faae0c02200\r\n2019-05-21 14:53:15.134 xcode-locator[16168:46166] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithContentsOfURL:error:]: unrecognized selector sent to instance 0x7faae0c02200'\r\n*** First throw call stack:\r\n(\r\n\t0 CoreFoundation 0x00007fffb2dd065b __exceptionPreprocess + 171\r\n\t1 libobjc.A.dylib 0x00007fffc7c0f48d objc_exception_throw + 48\r\n\t2 CoreFoundation 0x00007fffb2e522d4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132\r\n\t3 CoreFoundation 0x00007fffb2d41cf5 ___forwarding___ + 1061\r\n\t4 CoreFoundation 0x00007fffb2d41848 _CF_forwarding_prep_0 + 120\r\n\t5 xcode-locator 0x0000000104e01c1c FindXcodes + 1692\r\n\t6 xcode-locator 0x0000000104e00c01 main + 289\r\n\t7 libdyld.dylib 0x0000000105663235 start + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\nTarget //main:hello-world failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 7.473s, Critical Path: 0.08s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully\r\n```\r\n\r\nBazel version:\r\n```\r\n> bazel version\r\n\r\nBuild label: 0.26.0rc12\r\nBuild target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar\r\nBuild time: Tue May 21 09:59:36 2019 (1558432776)\r\nBuild timestamp: 1558432776\r\nBuild timestamp as int: 1558432776\r\n```",
"FYI, `bazel-0.24.1` has no problem.",
"I've submitted https://github.com/bazelbuild/bazel/pull/8426 to fix this"
] | [] | "2019-05-21T21:44:32Z" | [
"type: bug",
"P2",
"z-team-Apple"
] | xcode-locator fails in macOS-10.12 | ### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```bash
git clone https://github.com/bazelbuild/examples.git
cd cpp-tutorial/stage1
bazel build //...
```
Error:
```
Starting local Bazel server and connecting to it...
INFO: Analyzed target //main:hello-world (11 packages loaded, 122 targets configured).
INFO: Found 1 target...
ERROR: /Users/soonhok/work/examples/cpp-tutorial/stage1/main/BUILD:1:1: C++ compilation of rule '//main:hello-world' failed: I/O exception during sandboxed execution: Running '/var/tmp/_bazel_soonhok/install/1a037b6c0d8096293d1eecfde6528fbd/_embedded_binaries/xcode-locator 9.2.0.9C40b' failed.
Process terminated by signal 6
stdout:
stderr: 2019-05-21 14:03:01.688 xcode-locator[938:9684] Found bundle com.apple.dt.Xcode in file:///Applications/Xcode.app/; contents on disk: (
"file:///Applications/Xcode.app/Contents/"
)
2019-05-21 14:03:01.691 xcode-locator[938:9684] Version strings for file:///Applications/Xcode.app/: short=9.2, expanded=9.2.0
2019-05-21 14:03:01.691 xcode-locator[938:9684] -[__NSPlaceholderDictionary initWithContentsOfURL:error:]: unrecognized selector sent to instance 0x7fb1a3d01ee0
2019-05-21 14:03:01.692 xcode-locator[938:9684] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithContentsOfURL:error:]: unrecognized selector sent to instance 0x7fb1a3d01ee0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffb2dd065b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffc7c0f48d objc_exception_throw + 48
2 CoreFoundation 0x00007fffb2e522d4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fffb2d41cf5 ___forwarding___ + 1061
4 CoreFoundation 0x00007fffb2d41848 _CF_forwarding_prep_0 + 120
5 xcode-locator 0x0000000107b74c1c FindXcodes + 1692
6 xcode-locator 0x0000000107b73c01 main + 289
7 libdyld.dylib 0x00000001083d8235 start + 1
8 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Target //main:hello-world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 17.985s, Critical Path: 0.12s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
```
### What operating system are you running Bazel on?
macOS 10.12.6 (16G2016)
### What's the output of `bazel info release`?
```
release 0.25.2
```
### Any other information, logs, or outputs that you want to share?
Xcode version: 9.2 (9C40b)
| [
"tools/osx/xcode_locator.m"
] | [
"tools/osx/xcode_locator.m"
] | [] | diff --git a/tools/osx/xcode_locator.m b/tools/osx/xcode_locator.m
index 90c00fafcc5b74..18f77bdab1ac14 100644
--- a/tools/osx/xcode_locator.m
+++ b/tools/osx/xcode_locator.m
@@ -177,16 +177,7 @@ static void AddEntryToDictionary(
url, version, expandedVersion);
NSURL *versionPlistUrl = [url URLByAppendingPathComponent:@"Contents/version.plist"];
-
- // macOS 10.13 changed the signature of initWithContentsOfURL,
- // and deprecated the old one.
- NSDictionary *versionPlistContents;
-#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_12
- versionPlistContents = [[NSDictionary alloc] initWithContentsOfURL:versionPlistUrl error:nil];
-#else
- versionPlistContents = [[NSDictionary alloc] initWithContentsOfURL:versionPlistUrl];
-#endif
-
+ NSDictionary *versionPlistContents = [[NSDictionary alloc] initWithContentsOfURL:versionPlistUrl];
NSString *productVersion = [versionPlistContents objectForKey:@"ProductBuildVersion"];
if (productVersion) {
expandedVersion = [expandedVersion stringByAppendingFormat:@".%@", productVersion];
| null | test | train | 2019-05-21T20:52:46 | "2019-05-21T18:07:09Z" | soonho-tri | test |
bazelbuild/bazel/8475_8480 | bazelbuild/bazel | bazelbuild/bazel/8475 | bazelbuild/bazel/8480 | [
"timestamp(timedelta=0.0, similarity=0.8496345730895418)"
] | 15a67757a3c9d7face58aba5caf74902429d9f60 | 252b34bd042bfb64f497cb21faa816338a035386 | [
"Thanks for working on the fix! :)",
"FYI, this issue also breaks tulsi (https://buildkite.com/bazel/tulsi-bazel-darwin/builds/161). CC @DavidGoldman. Patch release with the fix is being prepared."
] | [] | "2019-05-28T15:10:57Z" | [
"P1",
"breakage"
] | "WORKSPACE file can not be a symlink" exception thrown: backward-incompatible bug | Bazel 0.26,
if the WORKSPACE file is a symlink, an exception is thrown.
This is not intended change, it should be thrown only if managed directories are used in the project. | [
"src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java"
] | [
"src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java"
] | [
"src/test/java/com/google/devtools/build/lib/blackbox/tests/manageddirs/ManagedDirectoriesBlackBoxTest.java",
"src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/WorkspaceBlackBoxTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
index a760a30b578f41..0e474f66a79c44 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
@@ -901,37 +901,34 @@ private boolean refreshWorkspaceHeader(ExtendedEventHandler eventHandler)
WorkspaceFileValue oldValue =
(WorkspaceFileValue) memoizingEvaluator.getExistingValue(workspaceFileKey);
- maybeInvalidateWorkspaceFileStateValue(workspacePath);
+ FileStateValue newFileStateValue = maybeInvalidateWorkspaceFileStateValue(workspacePath);
WorkspaceFileValue newValue =
(WorkspaceFileValue) evaluateSingleValue(workspaceFileKey, eventHandler);
+ if (newValue != null && !newValue.getManagedDirectories().isEmpty()
+ && FileStateType.SYMLINK.equals(newFileStateValue.getType())) {
+ throw new AbruptExitException(
+ "WORKSPACE file can not be a symlink if incrementally updated directories are used.",
+ ExitCode.PARSING_FAILURE);
+ }
return managedDirectoriesKnowledge.workspaceHeaderReloaded(oldValue, newValue);
}
// We only check the FileStateValue of the WORKSPACE file; we do not support the case
// when the WORKSPACE file is a symlink.
- private void maybeInvalidateWorkspaceFileStateValue(RootedPath workspacePath)
+ private FileStateValue maybeInvalidateWorkspaceFileStateValue(RootedPath workspacePath)
throws InterruptedException, AbruptExitException {
SkyKey workspaceFileStateKey = FileStateValue.key(workspacePath);
SkyValue oldWorkspaceFileState = memoizingEvaluator.getExistingValue(workspaceFileStateKey);
- if (oldWorkspaceFileState == null) {
- // no need to invalidate if not cached
- return;
- }
FileStateValue newWorkspaceFileState;
try {
newWorkspaceFileState = FileStateValue.create(workspacePath, tsgm.get());
- if (FileStateType.SYMLINK.equals(newWorkspaceFileState.getType())) {
- throw new AbruptExitException(
- "WORKSPACE file can not be a symlink if incrementally"
- + " updated directories feature is enabled.",
- ExitCode.PARSING_FAILURE);
- }
} catch (IOException e) {
throw new AbruptExitException("Can not read WORKSPACE file.", ExitCode.PARSING_FAILURE, e);
}
- if (!oldWorkspaceFileState.equals(newWorkspaceFileState)) {
+ if (oldWorkspaceFileState != null && !oldWorkspaceFileState.equals(newWorkspaceFileState)) {
recordingDiffer.invalidate(ImmutableSet.of(workspaceFileStateKey));
}
+ return newWorkspaceFileState;
}
private SkyValue evaluateSingleValue(SkyKey key, ExtendedEventHandler eventHandler)
| diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/manageddirs/ManagedDirectoriesBlackBoxTest.java b/src/test/java/com/google/devtools/build/lib/blackbox/tests/manageddirs/ManagedDirectoriesBlackBoxTest.java
index 0c949c8391575e..e3ea58f30afc65 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/tests/manageddirs/ManagedDirectoriesBlackBoxTest.java
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/manageddirs/ManagedDirectoriesBlackBoxTest.java
@@ -22,6 +22,7 @@
import com.google.devtools.build.lib.blackbox.junit.AbstractBlackBoxTest;
import com.google.devtools.build.lib.util.ResourceFileLoader;
import java.io.IOException;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
@@ -331,6 +332,38 @@ public void testRepositoryOverrideChangeToConflictWithManagedDirectories() throw
+ " have managed directories: @generated_node_modules");
}
+ /**
+ * The test to verify that WORKSPACE file can not be a symlink when managed directories are used.
+ *
+ * The test of the case, when WORKSPACE file is a symlink, but not managed directories are used,
+ * is in {@link WorkspaceBlackBoxTest#testWorkspaceFileIsSymlink()}
+ */
+ @Test
+ public void testWorkspaceSymlinkThrowsWithManagedDirectories() throws Exception {
+ generateProject();
+
+ Path workspaceFile = context().getWorkDir().resolve(WORKSPACE);
+ assertThat(workspaceFile.toFile().delete()).isTrue();
+
+ Path tempWorkspace = Files.createTempFile(context().getTmpDir(), WORKSPACE, "");
+ PathUtils.writeFile(tempWorkspace,
+ "workspace(name = \"fine_grained_user_modules\",",
+ "managed_directories = {'@generated_node_modules': ['node_modules']})",
+ "",
+ "load(\":use_node_modules.bzl\", \"generate_fine_grained_node_modules\")",
+ "",
+ "generate_fine_grained_node_modules(",
+ " name = \"generated_node_modules\",",
+ " package_json = \"//:package.json\",",
+ ")");
+ Files.createSymbolicLink(workspaceFile, tempWorkspace);
+
+ ProcessResult result = bazel().shouldFail().build("//...");
+ assertThat(findPattern(result,
+ "WORKSPACE file can not be a symlink if incrementally updated directories are used."))
+ .isTrue();
+ }
+
private void generateProject() throws IOException {
writeProjectFile("BUILD.test", "BUILD");
writeProjectFile("WORKSPACE.test", "WORKSPACE");
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/WorkspaceBlackBoxTest.java b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/WorkspaceBlackBoxTest.java
index 177500e6a94fdb..8700a0e815a515 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/WorkspaceBlackBoxTest.java
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/WorkspaceBlackBoxTest.java
@@ -225,6 +225,32 @@ public void testPathWithSpace() throws Exception {
bazel.help();
}
+ @Test
+ public void testWorkspaceFileIsSymlink() throws Exception {
+ if (isWindows()) {
+ // Do not test file symlinks on Windows.
+ return;
+ }
+ Path repo = context().getTmpDir().resolve(testName.getMethodName());
+ new RepoWithRuleWritingTextGenerator(repo).withOutputText("hi").setupRepository();
+
+ Path workspaceFile = context().getWorkDir().resolve(WORKSPACE);
+ assertThat(workspaceFile.toFile().delete()).isTrue();
+
+ Path tempWorkspace = Files.createTempFile(context().getTmpDir(), WORKSPACE, "");
+ PathUtils.writeFile(tempWorkspace, "workspace(name = 'abc')",
+ String.format(
+ "local_repository(name = 'ext', path = '%s',)",
+ PathUtils.pathForStarlarkFile(repo)));
+ Files.createSymbolicLink(workspaceFile, tempWorkspace);
+
+ BuilderRunner bazel = WorkspaceTestUtils.bazel(context());
+ bazel.build("@ext//:all");
+ PathUtils.append(workspaceFile, "# comment");
+ // At this point, there is already some cache workspace file/file state value.
+ bazel.build("@ext//:all");
+ }
+
private boolean isWindows() {
return OS.WINDOWS.equals(OS.getCurrent());
}
| val | train | 2019-05-28T16:45:31 | "2019-05-28T10:42:40Z" | irengrig | test |
bazelbuild/bazel/8507_8519 | bazelbuild/bazel | bazelbuild/bazel/8507 | bazelbuild/bazel/8519 | [
"timestamp(timedelta=0.0, similarity=0.9806730409642898)"
] | 221c67fc1dceb9f06c4fdbaf8e839f8dfa83e358 | 5e3a794cb4f6077037f61cb5d175590f4e443a2a | [
"I can take a stab at this."
] | [] | "2019-05-30T15:27:33Z" | [
"P1",
"bad error messaging"
] | Improve error message for incompatible_string_join_requires_strings | When the flag `--incompatible_string_join_requires_strings` is enabled, Baze checks that each element is a string (see https://github.com/bazelbuild/bazel/issues/7802).
However, the error message is just a type error. This can be confusing for users who are upgrading Bazel. The error message should at least include the name of the flag.
Since we're flipping the flag in Bazel 0.27, it would be great to improve the error message before that. @jin, @c-parsons, do you have time to do it this week? (tomorrow is public holiday in Germany)
Thanks! | [
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
index 1d4cf1bca70c4f..4e2e46ba5a12be 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
@@ -115,7 +115,11 @@ public String join(String self, SkylarkList<?> elements, Location loc, Environme
if (!(item instanceof String)) {
throw new EvalException(
loc,
- "sequence element must be a string (got '" + EvalUtils.getDataTypeName(item) + "')");
+ "sequence element must be a string (got '"
+ + EvalUtils.getDataTypeName(item)
+ + "'). See https://github.com/bazelbuild/bazel/issues/7802 for information about "
+ + "--incompatible_string_join_requires_strings."
+ );
}
}
}
| null | train | train | 2019-05-30T16:39:34 | "2019-05-29T22:13:30Z" | laurentlb | test |
bazelbuild/bazel/8572_9273 | bazelbuild/bazel | bazelbuild/bazel/8572 | bazelbuild/bazel/9273 | [
"timestamp(timedelta=157322.0, similarity=0.8757402397972228)"
] | c099341dd3426508f940f566c40ac2d3d93e2506 | fe27ce112454077fce1ac3108d94a855406aadf5 | [
"Is there a release candidate available? ",
"@or-shachar the target RC date is in August. ",
"@or-shachar I plan to cut the release on Thursday morning (NYC time).",
"https://github.com/bazelbuild/bazel/issues/6790, deemed a requirement for Bazel 1.0, requires an incompatible flag that has not been submitted yet. \r\n\r\n@scentini @katre please make sure the release is cut after the flag lands.",
"https://github.com/bazelbuild/bazel/issues/9006, deemed a requirement for Bazel 1.0, requires an incompatible flag that has not been submitted yet (but is under review!)\r\n\r\n@brandjon @katre please make sure the release is cut after the flag lands.",
"Let's postpone the cut until we have [clarity on platform situation](https://groups.google.com/d/msg/bazel-dev/F0LPhBlzNKs/dWudPaBZCAAJ). ",
"Re platforms: we decided to make no changes to platforms that need to get in 0.29\r\nWhat is the status of #6790? /cc @scentini @lberki \r\nWhat is the status of #9006? /cc @brandjon @lberki ",
"#9006 is blocked on #9019, which is progressing well. It looks like it just needs to be broken up into multiple PRs (for third_party/ workflow reasons). If there aren't any surprises it'll be submitted today.",
"At this point waiting for tomorrow (August 2) before cutting the release.\r\n\r\n@scentini and @dslomov, please let me know whether I need to wait for #6790, or just cherrypick the fix later.",
"The third_party/ submit dance for #9006 has concluded and the incompatible flag has been added. I've marked that issue `migration-ready`.",
"As per our discussion the day before yesterday, #6790 won't make it into 1.0 (right, @scentini ?)",
"Yes, #6790 won't make it into 1.0.",
"Evaluating 2d5b9f35a859bbeec4df66fc6c2256db299dd56a as a possible baseline: I've started a test run to validate it while I start checking over issues.",
"Test run with 2d5b9f35a859bbeec4df66fc6c2256db299dd56a as baseline is good: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1117\r\n\r\nI am starting the release.\r\n\r\n```\r\n$ scripts/release/release.sh create --force_rc=1 0.29.0 2d5b9f35a859bbeec4df66fc6c2256db299dd56a\r\n```\r\n",
"And the build has failed with python errors building the deb: https://buildkite.com/bazel-trusted/bazel-release/builds/86#5b8ae185-9cb4-46e6-b67e-223b5ea67ce3\r\n\r\nAlso, Windows has failed with errors creating the MSI: https://buildkite.com/bazel-trusted/bazel-release/builds/86#661817f8-ae61-485b-8869-e06f278d71f7",
"I have fixes ready, waiting on https://github.com/bazelbuild/continuous-integration/pull/783 and https://github.com/bazelbuild/continuous-integration/pull/785",
"Trying again. Since 2d5b9f35a859bbeec4df66fc6c2256db299dd56a is being reverted internally, baseline is now 6c5ef5369a3ffceb8a65cc159a2fff1401242810.\r\n\r\n```\r\n$ scripts/release/release.sh create --force_rc=2 0.29.0 6c5ef5369a3ffceb8a65cc159a2fff1401242810\r\n```\r\n",
"[Draft release notes](https://docs.google.com/document/d/1wDvulLlj4NAlPZamdlEVFORks3YXJonCjyuQMUQEmB0/edit#heading=h.2lt9nqq8uh7q) are available for editing.",
"RC2 is available: https://releases.bazel.build/0.29.0/rc2/index.html",
"I feel 0.29 absolutely needs https://github.com/bazelbuild/bazel/pull/9008 (or some other fix for the same underlying issue). Since 0.26, a **single** HTTP connection timeout when fetching artifacts terminates the build. (Bazel stopped retrying fetch attempts.)",
"To add to @beasleyr-vmw's comment, #9015 is equally if not more important as it actually makes Bazel to use alternative `url`(s) as fallback(s).",
"Agreed, #9008 is a regression and needs to be fixed in the 0.29 release. @laurentlb can you review this change please?",
"@buchgr @aehlig @beasleyr-vmw @artem-zinnatullin Please propose specific commits to be cherrypicked and the issues that they resolve.",
"@katre Proposing following two commits addressing #8974 to be cherry-picked\r\n\r\n- https://github.com/bazelbuild/bazel/commit/338829f2633e91ae0492ee4169446465e10b5994 \"Fix retrying of SocketTimeoutExceptions in HttpConnector\", allows HTTP downloads to recover from `SocketTimeoutException`s HTTP connection/headers phase\r\n- https://github.com/bazelbuild/bazel/commit/14651cd86b6fc1d48f56a208a9b5278b3e2dcf75 \"Fallback to next urls if download fails in HttpDownloader\", allows HTTP downloads to recover from `IOException`s during HTTP download (any phase) by falling back to secondary url(s)",
"~Release Blocker: https://github.com/bazelbuild/bazel/issues/9032~",
"~Release blocker: https://github.com/bazelbuild/bazel/issues/9089~\r\n\r\nUpdate: this is not a blocker.",
"cherry pick: b7d300c6be3e130dec0e62a4f19493105f595d57 ... this fixes https://github.com/bazelbuild/bazel/issues/9072",
"Update: #9032 is not a release blocker. It's only that gRPC needs to be updated (for some reason, the breaking change did not break any downstream projects). ",
"Update: https://github.com/bazelbuild/bazel/issues/9089 is NOT a release blocker. The affected file is not embedded into Bazel.",
"> @buchgr @aehlig @beasleyr-vmw @artem-zinnatullin Please propose specific commits to be cherrypicked and the issues that they resolve.\r\n\r\n- #9008 is committed as 338829f2633e91ae0492ee4169446465e10b5994\r\n- #9015 is committed as 14651cd86b6fc1d48f56a208a9b5278b3e2dcf75\r\n\r\nBoth together fix #8974. Your call if this regression fix needs to be cherry-picked.\r\n",
"Creating RC3 with cherrypicks:\r\n```\r\n$ scripts/release/release.sh create --force_rc=3 0.29.0 6c5ef5369a3ffceb8a65cc159a2fff1401242810 338829f2633e91ae0492ee4169446465e10b5994 14651cd86b6fc1d48f56a208a9b5278b3e2dcf75 b7d300c6be3e130dec0e62a4f19493105f595d57\r\n````\r\n\r\nWaiting on tests now.",
"RC3 is available at https://releases.bazel.build/0.29.0/rc3/index.html\r\n\r\nTests are underway: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1127\r\n \r\n\r\n",
"RC3 shows errors in rules_docker and rules_nodejs.",
"I did a rerun for RC3 at https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1129\r\n\r\nThe docker failure went away, I believe it's some infra change that has been fixed. I saw [the same error](https://buildkite.com/bazel/rules-docker-docker/builds/2594) with Bazel 0.28.1 and later it's gone.\r\n\r\nFor the rules_nodejs failure, I noticed it's not failing at HEAD. So I did a bisect, found out 960217631abdcab0a7ed95e2ab10acd55f636639 can fix the problem. We probably need to cherry-pick it into 0.29.0. /cc @lberki can confirm that.",
"I'm just the merciless sheriff who rolls back breaking changes. /cc @buchgr ",
"I can confirm the test fails at 0f0a0d58725603cf2f1c175963360b525718a195 but not at its parent commit. So this is also a breaking change in Bazel.\r\n\r\nThe reason rules_nodejs wasn't failing with RC2 is because the test was only [introduced](https://github.com/bazelbuild/rules_nodejs/commit/04b1137f6ab3697e286b156757daefbc269fad9a) after RC2 was created.",
"So please cherry-pick 9602176 to fix the rules_nodejs breakage.",
"@meteorcloudy Thanks very much for debugging this! I'll create rc4 with that cherrypick today.",
"Creating RC4:\r\n```\r\n$ scripts/release/release.sh create --force_rc=4 0.29.0 6c5ef5369a3ffceb8a65cc159a2fff1401242810 338829f2633e91ae0492ee4169446465e10b5994 14651cd86b6fc1d48f56a208a9b5278b3e2dcf75 b7d300c6be3e130dec0e62a4f19493105f595d57 960217631abdcab0a7ed95e2ab10acd55f636639\r\n```\r\n\r\nWaiting for tests and release stages now.",
"RC4 is available at https://releases.bazel.build/0.29.0/rc4/index.html.\r\n\r\nDownstream tests are running: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1130",
"All downstream tests pass.",
"Not sure if #9116 is a blocker, but it breaks `bazel query` in some situations, and I found this behavior from `0.29.0rc4` all the way back to `0.27.0`. ",
"Blocker: https://github.com/bazelbuild/bazel/issues/9106\r\n\r\nThough not a regression, this bug prevents enabling Bash-less \"bazel run\" in Bazel 1.0, see https://github.com/bazelbuild/bazel/issues/8240. There's a fix under review, and if possible I'd like to get it cherry-picked.",
"https://github.com/bazelbuild/bazel/issues/9115 might also block. We can't build google-cloud-cpp with 0.29.0rc4.",
"@laszlocsomor I agree we should cherrypick the fix for #9106. Let me know when there's a commit.\r\n\r\n@johnedmonds #9115 definitely looks bad. I'll wait on @lberki to triage it, however.",
"@katre: Thanks for waiting! Please cherry-pick https://github.com/bazelbuild/bazel/commit/da557f96c697102ad787e57bbf7db2460f6a60a8 to fix #9106 .",
"#9115 appears to be fixable in google-cloud-cpp, not in Bazel. I'll prepare rc5 on Monday.",
"Creating RC5 (required an edit for the cherrypick on da557f9):\r\n```\r\n$ scripts/release/release.sh create --force_rc=5 0.29.0 6c5ef5369a3ffceb8a65cc159a2fff1401242810 338829f2633e91ae0492ee4169446465e10b5994 14651cd86b6fc1d48f56a208a9b5278b3e2dcf75 b7d300c6be3e130dec0e62a4f19493105f595d57 960217631abdcab0a7ed95e2ab10acd55f636639 da557f96c697102ad787e57bbf7db2460f6a60a8\r\n```\r\n\r\nWaiting for https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1139",
"All downstream tests pass: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1139",
"Created rc6:\r\n```\r\n$ scripts/release/release.sh create --force_rc=6 0.29.0 28f7d8f2d2aa46ec2fa981e6a6c90bf48111747f ef8b6f68cc8ffd2e6523a894034ae383e87ec74c\r\n```\r\n\r\nWaiting for tests: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1143",
"Kindly asking for the fix to https://github.com/bazelbuild/bazel/issues/9078 to be included in the release when it's solved, if possible",
"@steeve: I don't think #9078 is a release blocker, since we aren't yet telling people to enable `--incompatible_enable_cc_toolchain_resolution`. One of the blockers is, specifically, iOS toolchain selection, which is the heart of the issue.\r\n\r\nYour workaround is to continue using the legacy cc toolchain selection mechanism.",
"Given the lack of new bug reports since I sent out RC6, I plan to release Bazel 0.29.0 tomorrow, August 19th. Please update this issue if you know of a release blocker.",
"What is the expectations of \"no breaking changes\"? Is it that all projects that builds with 0.28.1 also should build with 0.29.0?\r\n\r\nIf that's the case, please take a look at https://github.com/zegl/bazel-0-29-incompat-repro. It contains a project that does build with 0.28.1, but not with rc6.\r\n\r\n---\r\n\r\nUpdate: I've narrowed the incompatibility down to `io_grpc_grpc_java` at [v1.20.0](https://github.com/grpc/grpc-java/releases/tag/v1.20.0), it does build with 0.28.1, but not rc6.\r\n\r\n",
"For the \"no breaking changes\" promise, we specifically mean \"no incompatible flags will have their default value changed\". If there are further regressions we will try to find and mitigate them. I will look into the issue with io_grpc_grpc_java.",
"This is the same error that happened in https://github.com/bazelbuild/bazel/issues/9032#issuecomment-518631754 with gRPC.",
"@Yannic Thanks for pointing this out.\r\n\r\n@zegl Given that there is a patch in grpc (https://github.com/grpc/grpc/pull/19860), I don't think there's anything further we need to do.",
"The protobuf issues are because of https://github.com/bazelbuild/bazel/issues/7157. Most, but not all repos have been updated.\r\nFor instance, I just opened a PR for rules_swift: https://github.com/bazelbuild/rules_swift/pull/288\r\n\r\nNothing to do on the bazel side.",
"0.29 removes `--incompatible_disallow_load_labels_to_cross_package_boundaries` which was available in 0.28 (defaulted to true). Is this allowed under the incompatibility policy?\r\n\r\nhttps://github.com/bazelbuild/bazel/commit/4efb6c2563b7d96bfbd9b30175f1ab9b969708da\r\n",
"@dslomov, please clarify the policy for removing incompatible flags.",
"> 0.29 removes --incompatible_disallow_load_labels_to_cross_package_boundaries which was available in 0.28 (defaulted to true). Is this allowed under the incompatibility policy?\r\n\r\nYes. The `--incompatible_` flags themselves are not subject to the policy. Once they have been flipped to on, they can be immediately removed. That is why our guidance is to [never rely on `--incompactible_*` flags for production builds](https://docs.bazel.build/versions/0.28.0/backward-compatibility.html#at-a-glance)",
"> What is the expectations of \"no breaking changes\"?\r\n\r\nProjects that build with 0.28 should build with 0.29, assuming you don't pass any `incompatible_` or `experimental_` flag.\r\n\r\nBy this definition, 0.29 is not compatible with 0.28, as shown by https://github.com/zegl/bazel-0-29-incompat-repro\r\n\r\n```\r\n$ USE_BAZEL_VERSION=0.28.1 bazelisk build ...\r\n(works)\r\n\r\n$ USE_BAZEL_VERSION=0.29.0rc6 bazelisk build ...\r\nERROR: /tmp/repro/bazel-0-29-incompat-repro/src/BUILD:22:1: Action src/service_java_grpc-proto-gensrc.jar failed (Exit 1) protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--plugin=protoc-gen-grpc-java=bazel-out/host/bin/external/io_grpc_grpc_java/compiler/grpc_java_plugin' ... (remaining 4 argument(s) skipped)\r\n\r\nUse --sandbox_debug to see verbose messages from the sandbox\r\ngoogle/protobuf/timestamp.proto: File not found.\r\n```\r\n\r\nI'll defer to @dslomov or @katre to decide whether it needs a cherrypick.",
"> > What is the expectations of \"no breaking changes\"?\r\n> \r\n> Projects that build with 0.28 should build with 0.29, assuming you don't pass any `incompatible_` or `experimental_` flag.\r\n> \r\n> By this definition, 0.29 is not compatible with 0.28, as shown by https://github.com/zegl/bazel-0-29-incompat-repro\r\n> \r\n> ```\r\n> $ USE_BAZEL_VERSION=0.28.1 bazelisk build ...\r\n> (works)\r\n> \r\n> $ USE_BAZEL_VERSION=0.29.0rc6 bazelisk build ...\r\n> ERROR: /tmp/repro/bazel-0-29-incompat-repro/src/BUILD:22:1: Action src/service_java_grpc-proto-gensrc.jar failed (Exit 1) protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--plugin=protoc-gen-grpc-java=bazel-out/host/bin/external/io_grpc_grpc_java/compiler/grpc_java_plugin' ... (remaining 4 argument(s) skipped)\r\n> \r\n> Use --sandbox_debug to see verbose messages from the sandbox\r\n> google/protobuf/timestamp.proto: File not found.\r\n> ```\r\n> \r\n> I'll defer to @dslomov or @katre to decide whether it needs a cherrypick.\r\n\r\nThanks, it does look bad indeed. @lberki or @hlopko, do you know what is going on there?",
"@dslomov most likely because of https://github.com/bazelbuild/bazel/issues/7157, which needed patching rules for proto libraries",
"Given this discussion, I am not going to release 0.29.0 today, while we figure out what needs to be updated.",
"Looks like a few PR are being filed against things for protos for different languages, given the original statement of _This release will have no breaking changes._, this doesn't appear to be the case.\r\n\r\nWhere are the proto changes documented so rule authors can update things? The PRs with references to _virtual_imports_ is all something I can't say I've run into before, and I don't see anything in the release notes to find out more.",
"Updated the draft release notes doc to no longer say the rules python flag is being flipped in 1.0. (Not sure if changes are still being pulled in from that doc.)",
"@brandjon Yes, please continue to update the release notes until I change the status from \"DRAFT\" to \"PUBLISHED\".",
"@thomasvl , I am the culprit! I reshuffled a bit `proto_library` works and was confident in my judgement that it's not a user-visible change. Then it turned out that gRPC relied on the *exact* old source tree layout. \r\n\r\nThe fix is https://github.com/grpc/grpc/commit/e2ba3aa07009292617c3cabe734e8e44099b22ac and I'm ambivalent about it: we didn't change the spec but what if someone depends on implementation details? If we change implementation details, is it a breaking change?",
"...actually, the fix is https://github.com/grpc/grpc-java/commit/b22017851560197a41015acd90f443f7b9519984 . I'm looking at why https://github.com/zegl/bazel-0-29-incompat-repro does not pull that in.",
"Got it. It appears that the above repository pulls the version of `grpc-java` specified here:\r\n\r\nhttps://github.com/stackb/rules_proto/blob/master/deps.bzl#L327\r\n\r\nwhich is https://github.com/grpc/grpc-java/commit/3c24dc6fe1b8f3e5c89b919c38a4eefe216397d3, a version from 2019 March 9. So I'm afraid the only answer I have is either to patch https://github.com/grpc/grpc-java/commit/b22017851560197a41015acd90f443f7b9519984 or update your `grpc-java` and apologize for the unintended breakage :(",
"> So I'm afraid the only answer I have is either to patch grpc/grpc-java@b220178 or update your grpc-java and apologize for the unintended breakage :(\r\n\r\nI don't think that a good enough answer. If a fix for #7157 is a breaking change, it should have followed the policy. Is there a way to make it so? (If there is, I am willing to accept a cherry-pick to 0.29)",
"Yeah, thanks for keeping me honest :)\r\n\r\nI think you have the wrong link (https://github.com/bazelbuild/bazel/pull/7175 is a random pull request), but I'll cook something up. Fortunately, it'll be easily cherry-pickable if the gods don't frown upon me today.\r\n",
"I meant #7157 (updated)",
"Well, that'll be collateral damage :( I will roll forward the fix as soon as it lands so that the time frame for regressing on that is as small as possible.",
"Once @lberki submits the rollback of behavior, I'll cut a new RC and we can test that out.\r\n\r\nThanks, everyone!",
"Proto rollback here: https://github.com/bazelbuild/bazel/commit/209175ff8ffeb05628ed8a187dd414a3d2935c55",
"Created rc7:\r\n```\r\n$ scripts/release/release.sh create --force_rc=7 0.29.0 ad9f7608230dade9d00f694cfad903684dbcc627 209175ff8ffeb05628ed8a187dd414a3d2935c55\r\n```\r\n\r\nWaiting for release jobs and tests.",
"So we should close https://github.com/bazelbuild/rules_swift/pull/288 as not need thanks to the rollback?\r\n\r\nIs this change going to happen again? Any docs on what it will be some rule teams can read up/understand it in advance?\r\n",
"ps - should changes to the grpc repos also get rolled back then?",
"Downstream testing for rc7: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1155",
"rules_go is failing with an error related to proto import paths: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1155#3154f4a3-c377-4ed1-a9cc-0fdb27008fb1\r\n\r\n@lberki is this due to your commit, and if so, does this mean we need to roll back changes in rules_go or elsewhere?",
"Confirmed: the rules_go failure is due to `proto_library` failing when \"--incompatible_generated_protos_in_virtual_imports\" is disabled.",
"I've filed https://github.com/bazelbuild/bazel/issues/9219 as a release blocker while I investigate the problem.",
"@lberki is finding a fix for #9219: once that is ready I'll create rc8.",
"Please waiting for a fix for https://github.com/bazelbuild/bazel/issues/9222",
"@katre Please cherry-pick https://github.com/bazelbuild/bazel/commit/644060b7a4bc98384b66e3d2343b950b875b5e35 to fix #9222 , thanks!",
"\nAnother relevant fix is pending as https://bazel-review.googlesource.com/c/bazel/+/111374/\n\n-- \nKlaus Aehlig\nGoogle Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen\nRegistergericht und -nummer: Hamburg, HRB 86891\nSitz der Gesellschaft: Hamburg\nGeschaeftsfuehrer: Paul Terence Manicle, Halimah DeLaine Prado\n",
"> So we should close bazelbuild/rules_swift#288 as not need thanks to the rollback?\r\n\r\n> Is this change going to happen again? Any docs on what it will be some rule teams can read up/understand it in advance?\r\n\r\nThe change will now be guarded under [`--incompatible_generated_protos_in_virtual_imports`](https://github.com/bazelbuild/bazel/issues/9215) that we expect to flip in the next release. Please follow up on #9215 if migration steps are not clear.\r\n",
"Waiting for https://bazel-review.googlesource.com/c/bazel/+/111374/ before I create RC8.",
"@thomasvl the PR should be safe to apply wether or not the flag is flipped, and I can confirm it's working (currently using rc6 atm, can't test on rc7 because of rules_go breakage)",
"> Waiting for https://bazel-review.googlesource.com/c/bazel/+/111374/ before I create RC8.\r\n\r\n https://bazel-review.googlesource.com/c/bazel/+/111374/ has been submitted as 76ed014e77d7b862f6eb2894600ae525ea570f11.",
"Created RC8:\r\n```\r\n$ scripts/release/release.sh create --force_rc=8 0.29.0 a4e7a7a5235f415eea5515b49121ec79a95b78ad 644060b7a4bc98384b66e3d2343b950b875b5e35 067040d7bcb3b24a88432e210a96adacee3f37b4 76ed014e77d7b862f6eb2894600ae525ea570f11\r\n```\r\n\r\nWaiting for tests to complete the release process.\r\n\r\nAssuming no new issues, this needs to bake until next Tuesday (August 27) before it can be released.",
"RC8 is available for testing: https://releases.bazel.build/0.29.0/rc8/index.html\r\n\r\nDownstream tests are running: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1159",
"Downstream tests all pass.",
"Barring any last minute release blockers, I plan to finish the release of 0.29.0 later today.",
"Still working to finalize the release announcement: at this point the release is probably tomorrow.",
"Starting the release.",
"The release has now been pushed to https://github.com/bazelbuild/bazel/releases/tag/0.29.0\r\n\r\n@vbatts, @petemounce, and @excitoon, can you please update your builds?",
"The [blog post](https://blog.bazel.build/2019/08/27/bazel-0.29.0.html) is available, and docs should be propagating shortly.",
"Fedora & Centos build:\nhttps://copr.fedorainfracloud.org/coprs/build/1023211\n\n",
"While upgrading a build from 0.27 to 0.29, I discovered there was a regression in v0.28 for git_repository pulling at a tagged commit. The fix is merged in https://github.com/bazelbuild/bazel/pull/9059, would it be possible to cherry-pick this into v0.29.1 ?",
"Pushed to chocolatey.",
"@jmillikin-stripe Please open an issue and assign it to me so I can track fixing the regression.",
"Filed #9293 to track the 0.29.1 point release: since 0.29.0 is finished I am closing this issue. ",
"Thanks @petemounce !"
] | [] | "2019-08-28T15:00:22Z" | [
"release"
] | Release 0.29 - August 2019 (stable) | Target RC date - August 1st, 2019.
This release will have no [breaking changes](https://docs.bazel.build/versions/master/backward-compatibility.html).
See the [blog post](https://blog.bazel.build/2019/06/06/Bazel-Semantic-Versioning.html) for some details | [
"scripts/docs/doc_versions.bzl",
"site/_config.yml"
] | [
"scripts/docs/doc_versions.bzl",
"site/_config.yml"
] | [] | diff --git a/scripts/docs/doc_versions.bzl b/scripts/docs/doc_versions.bzl
index 45fbb43e6e0471..5d57e0a89822a1 100644
--- a/scripts/docs/doc_versions.bzl
+++ b/scripts/docs/doc_versions.bzl
@@ -22,6 +22,10 @@
"""This module contains the versions and hashes of Bazel's documentation tarballs."""
DOC_VERSIONS = [
+ {
+ "version": "0.29.0",
+ "sha256": "99d7a6bf9ef0145c59c54b4319fb31cb855681782080a5490909c4a5463c7215",
+ },
{
"version": "0.28.0",
"sha256": "64b3fc267fb1f4c56345d96f0ad9f07a2efe43bd15361f818368849cf941b3b7",
diff --git a/site/_config.yml b/site/_config.yml
index 067bee0ce21507..53ca7b60ed173a 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -11,11 +11,12 @@ sass:
gems: [jekyll-paginate]
# Update this to the newest release for the default docs.bazel.build version.
-version: "0.28.0"
+version: "0.29.0"
# This must be kept in sync with //scripts/docs:doc_versions.bzl
doc_versions:
- master
+ - 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
| null | train | train | 2019-08-28T16:36:11 | "2019-06-06T08:35:43Z" | dslomov | test |
bazelbuild/bazel/8596_8600 | bazelbuild/bazel | bazelbuild/bazel/8596 | bazelbuild/bazel/8600 | [
"timestamp(timedelta=0.0, similarity=0.9495789907343556)"
] | 10a42618daec9596969d32cf5189197b7610326a | 23e2f6e4551850a7014d407d5ef2a706a7086a56 | [
"CC @katre, @gregce, @aiuto."
] | [
"Is this deterministic? (IIRC we set the timestamps to some constant on the final zip call, but it would be nice to get change pruning in this step, too)",
"This looks somewhat complicated... (I'm not sure if there is a simpler way to cut the first few path segments, though)",
"+1!\r\n",
"Which part worries you? That files coming from the http_archive will change timestamps but not their content? Let's address that on bazelbuild/platforms releases pipeline then?",
"I was shooting for the simplest possible thing that could work. I can remove external/platforms in the genrule above creating the archive, but this looked simpler to me.",
"I assume this is a comment to simplify the test, right?",
"Okie. Greenlight then.",
"No, this is a comment expressing my enthusiasm that you do test this. Move on!",
"Does the filename need to be opaque?",
"Nope, but I didn't care here, the filename will make sense once we have an actual release archive of bazelbuild/platforms.",
"SGTM.",
"Is it worth doing a quick 0.1.0 release of platforms to clean the name up now.\r\nIf not, it makes it harder to find and update line 174 ( \"d91995f1a9497602a02d11db41a7ffa5551147be.zip\": ) than it would be if it were \"platforms-0.1.0.tar.gz\"",
"and you won't need the strip prefix at line 514",
"I think it's deterministic, see https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/repository/ZipDecompressor.java;l=165",
"nit: last time I checked, it already was 2019",
":)",
"I decided not to block submission of this PR on setting up release pipeline for platforms. We definitely have to set up releases for platforms repository. I filed https://github.com/bazelbuild/continuous-integration/issues/715."
] | "2019-06-11T12:53:54Z" | [
"type: feature request",
"P1",
"team-Configurability"
] | Embed a release of @platforms into the Bazel binary | This is a tracking issue implementing the effort described at [Migrating @bazel_tools to @platforms](https://docs.google.com/document/d/1EArrWYUDugqJzBcb0-OxY5BH1FFPYV3jxLIXbJpD9RY/edit?pli=1#heading=h.5mcn15i0e1ch) design doc.
The main goal is to bundle a snapshot of [@platforms](https://github.com/bazelbuild/platforms) into Bazel binary into implicit external repository named `@platforms`. This effort unblocks:
* Migration of rules to Starlark (e.g. [rules_cc](https://github.com/bazelbuild/bazel/issues/7643)).
* Migration of rules into toolchains/platforms (e.g. [rules_cc](https://github.com/bazelbuild/bazel/issues/6516)). | [
"WORKSPACE",
"src/BUILD",
"src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE",
"src/package-bazel.sh"
] | [
"WORKSPACE",
"src/BUILD",
"src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE",
"src/package-bazel.sh"
] | [
"src/test/shell/bazel/BUILD",
"src/test/shell/bazel/platforms_test.sh"
] | diff --git a/WORKSPACE b/WORKSPACE
index 18156c2ca601a7..05b16806e0b133 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -117,6 +117,8 @@ distdir_tar(
"8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz",
"0.16.2.zip",
"android_tools_pkg-0.5.tar.gz",
+ # bazelbuild/platforms
+ "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip"
],
dirname = "derived/distdir",
sha256 = {
@@ -130,6 +132,8 @@ distdir_tar(
"8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898",
"0.16.2.zip": "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0",
"android_tools_pkg-0.5.tar.gz": "b3aaa5c4544b9da8d226be3f5103e4469bd8cc9be07f93cdfabcfe5249d11378", # built at 86955316258c883daf0c135c8bc09ba8415f7ee7
+ # bazelbuild/platforms
+ "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip": "c36e154b40b2495c7d82dfae5977aa46ad0a20628659e136f7a511504cee7b14",
},
urls = {
"e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": [
@@ -167,6 +171,10 @@ distdir_tar(
"android_tools_pkg-0.5.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.5.tar.gz",
],
+ "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip": [
+ "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
+ "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
+ ],
},
)
@@ -496,6 +504,16 @@ http_archive(
],
)
+http_archive(
+ name = "platforms",
+ sha256 = "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
+ "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip",
+ ],
+ strip_prefix = "platforms-441afe1bfdadd6236988e9cac159df6b5a9f5a98"
+)
+
load("@io_bazel_skydoc//:setup.bzl", "skydoc_repositories")
skydoc_repositories()
diff --git a/src/BUILD b/src/BUILD
index c20d6505259a19..164a8f66b98c37 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -328,10 +328,11 @@ filegroup(
name = "package-zip" + suffix,
srcs = ([":embedded_tools" + suffix + ".zip"] if embed else []) + [
# The script assumes that the embedded tools zip (if exists) is the
- # first item here, the deploy jar the second and install base key is the
- # third
+ # first item here, the deploy jar the second, install base key is the
+ # third, and platforms archive is the fourth.
"//src/main/java/com/google/devtools/build/lib:bazel/BazelServer_deploy.jar",
"install_base_key" + suffix,
+ ":platforms_archive",
":libunix",
"//src/main/tools:build-runfiles",
"//src/main/tools:process-wrapper",
@@ -355,6 +356,13 @@ filegroup(
("_nojdk", True),
]]
+genrule(
+ name = "platforms_archive",
+ srcs = ["@platforms//:srcs"],
+ outs = ["platforms.zip"],
+ cmd = "zip -qX $@ $$(echo $(SRCS) | sort)",
+)
+
[genrule(
name = "bazel-bin" + suffix,
srcs = [
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE b/src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE
index d0ce5b75dba567..d345d0b521578a 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/local_config_platform.WORKSPACE
@@ -1,1 +1,6 @@
+local_repository(
+ name = "platforms",
+ path = __embedded_dir__ + "/platforms",
+)
+
local_config_platform(name = "local_config_platform")
diff --git a/src/package-bazel.sh b/src/package-bazel.sh
index 632b1335404130..0bdfd8e00855db 100755
--- a/src/package-bazel.sh
+++ b/src/package-bazel.sh
@@ -16,16 +16,15 @@
set -euo pipefail
-# This script bootstraps building a Bazel binary without Bazel then
-# use this compiled Bazel to bootstrap Bazel itself. It can also
-# be provided with a previous version of Bazel to bootstrap Bazel
-# itself.
+# This script creates the Bazel archive that Bazel client unpacks and then
+# starts the server from.
WORKDIR=$(pwd)
OUT=$1
EMBEDDED_TOOLS=$2
DEPLOY_JAR=$3
INSTALL_BASE_KEY=$4
+PLATFORMS_ARCHIVE=$5
shift 4
TMP_DIR=${TMPDIR:-/tmp}
@@ -66,4 +65,15 @@ if [ -n "${EMBEDDED_TOOLS}" ]; then
(cd ${PACKAGE_DIR}/embedded_tools && unzip -q "${WORKDIR}/${EMBEDDED_TOOLS}")
fi
+# Unzip platforms.zip into platforms/, move files up from external/platforms
+# subdirectory, and cleanup after itself
+( \
+ cd ${PACKAGE_DIR} && \
+ unzip -q -d platforms platforms.zip && \
+ rm platforms.zip && \
+ cd platforms && \
+ mv external/platforms/* . && \
+ rmdir -p external/platforms \
+)
+
(cd ${PACKAGE_DIR} && find . -type f | sort | zip -q9DX@ "${WORKDIR}/${OUT}")
| diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 86868870eb1b78..391bcb4f397c1d 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -1080,6 +1080,12 @@ sh_test(
deps = ["@bazel_tools//tools/bash/runfiles"],
)
+sh_test(
+ name = "platforms_test",
+ srcs = ["platforms_test.sh"],
+ data = [":test-deps"],
+)
+
sh_test(
name = "platform_mapping_test",
srcs = ["platform_mapping_test.sh"],
diff --git a/src/test/shell/bazel/platforms_test.sh b/src/test/shell/bazel/platforms_test.sh
new file mode 100755
index 00000000000000..585f490c604f33
--- /dev/null
+++ b/src/test/shell/bazel/platforms_test.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# Copyright 2017 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Test related to @platforms embedded repository
+#
+
+set -euo pipefail
+
+# Load the test setup defined in the parent directory
+CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+source "${CURRENT_DIR}/../integration_test_setup.sh" \
+ || { echo "integration_test_setup.sh not found!" >&2; exit 1; }
+
+function test_platforms_repository_builds_itself() {
+ # We test that a built-in @platforms repository is buildable.
+ bazel build @platforms//:all &> $TEST_log \
+ || fail "Build failed unexpectedly"
+}
+
+function test_platforms_can_be_overridden() {
+ # We test that a custom repository can override @platforms in their
+ # WORKSPACE file.
+ mkdir -p platforms_can_be_overridden || fail "couldn't create directory"
+ touch platforms_can_be_overridden/BUILD || \ fail "couldn't touch BUILD file"
+ cat > platforms_can_be_overridden/WORKSPACE <<EOF
+local_repository(
+ name = 'platforms',
+ path = '../override',
+)
+EOF
+
+ mkdir -p override || fail "couldn't create override directory"
+ touch override/WORKSPACE || fail "couldn't touch override/WORKSPACE"
+ cat > override/BUILD <<EOF
+filegroup(name = 'yolo')
+EOF
+
+ cd platforms_can_be_overridden || fail "couldn't cd into workspace"
+ bazel build @platforms//:yolo &> $TEST_log || \
+ fail "Bazel failed to build @platforms"
+}
+
+run_suite "platform mapping test"
+
| train | train | 2019-06-11T14:41:28 | "2019-06-11T09:16:45Z" | hlopko | test |
bazelbuild/bazel/8623_8661 | bazelbuild/bazel | bazelbuild/bazel/8623 | bazelbuild/bazel/8661 | [
"timestamp(timedelta=98643.0, similarity=0.8408936388185629)"
] | 479cf339d1e3a2638fa3e8af4e8654a46b5def9a | null | [
"@philwo found out this important fix is lost after refactoring: https://github.com/bazelbuild/bazel/commit/39688b2454965eb45aa2f02a3f078adeee06ccd1",
"The breakage has been fixed by rollback"
] | [] | "2019-06-18T11:43:57Z" | [
"type: bug",
"P1",
"breakage",
"team-ExternalDeps"
] | Bazel CI: Downstream jobs are broken by git_repository refactoring | ERROR: type should be string, got "https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1035\r\n\r\nBazel Codelabs\r\n```\r\nERROR: An error occurred during the fetch of repository 'org_golang_google_grpc':\r\n--\r\n | Traceback (most recent call last):\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 158\r\n | _clone_or_update(ctx)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git.bzl\", line 31, in _clone_or_update\r\n | git_repo(ctx, directory)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 91, in git_repo\r\n | _update(ctx, git_repo)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 104, in _update\r\n | reset(ctx, git_repo)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 124, in reset\r\n | _git(ctx, git_repo, \"reset\", \"--hard\", git_re...)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 142, in _git\r\n | _error(ctx.name, (start + list(args)), st.s...)\r\n | File \"/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/9dba31623650bde83bfd5e4fc944f26a/external/bazel_tools/tools/build_defs/repo/git_worker.bzl\", line 164, in _error\r\n | fail((\"error running '%s' while worki...)))\r\n | error running 'git reset --hard 2fdaae294f38ed9a121193c51ec99fecd3b13eb7' while working with @org_golang_google_grpc:\r\n | fatal: Could not parse object '2fdaae294f38ed9a121193c51ec99fecd3b13eb7'.\r\n\r\n```\r\nCulprit: 50a2d6c9b9c55776ec747a656a2edd971e723771\r\nhttps://buildkite.com/bazel/culprit-finder/builds/165\r\n\r\n/cc @irengrig \r\n\r\nFYI @buchgr for Green Team rotation." | [
"tools/build_defs/repo/git.bzl"
] | [
"tools/build_defs/repo/git.bzl",
"tools/build_defs/repo/git_worker.bzl"
] | [
"src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestContext.java",
"src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/BUILD",
"src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryBlackBoxTest.java",
"src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryHelper.java",
"src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/RepoWithRuleWritingTextGenerator.java",
"src/test/shell/bazel/skylark_git_repository_test.sh"
] | diff --git a/tools/build_defs/repo/git.bzl b/tools/build_defs/repo/git.bzl
index 22692baf618b9d..22c07918bc39c7 100644
--- a/tools/build_defs/repo/git.bzl
+++ b/tools/build_defs/repo/git.bzl
@@ -13,7 +13,8 @@
# limitations under the License.
"""Rules for cloning external git repositories."""
-load(":utils.bzl", "patch", "update_attrs", "workspace_and_buildfile")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "patch", "update_attrs", "workspace_and_buildfile")
+load("@bazel_tools//tools/build_defs/repo:git_worker.bzl", "git_repo")
def _clone_or_update(ctx):
if ((not ctx.attr.tag and not ctx.attr.commit and not ctx.attr.branch) or
@@ -21,102 +22,22 @@ def _clone_or_update(ctx):
(ctx.attr.tag and ctx.attr.branch) or
(ctx.attr.commit and ctx.attr.branch)):
fail("Exactly one of commit, tag, or branch must be provided")
- shallow = ""
- if ctx.attr.commit:
- ref = ctx.attr.commit
- elif ctx.attr.tag:
- ref = "tags/" + ctx.attr.tag
- shallow = "--depth=1"
- else:
- ref = ctx.attr.branch
- shallow = "--depth=1"
- directory = str(ctx.path("."))
+
+ root = ctx.path(".")
+ directory = str(root)
if ctx.attr.strip_prefix:
directory = directory + "-tmp"
- if ctx.attr.shallow_since:
- if ctx.attr.tag:
- fail("shallow_since not allowed if a tag is specified; --depth=1 will be used for tags")
- if ctx.attr.branch:
- fail("shallow_since not allowed if a branch is specified; --depth=1 will be used for branches")
- shallow = "--shallow-since=%s" % ctx.attr.shallow_since
-
- ctx.report_progress("Cloning %s of %s" % (ref, ctx.attr.remote))
- if (ctx.attr.verbose):
- print("git.bzl: Cloning or updating %s repository %s using strip_prefix of [%s]" %
- (
- " (%s)" % shallow if shallow else "",
- ctx.name,
- ctx.attr.strip_prefix if ctx.attr.strip_prefix else "None",
- ))
- bash_exe = ctx.os.environ["BAZEL_SH"] if "BAZEL_SH" in ctx.os.environ else "bash"
- st = ctx.execute([bash_exe, "-c", """
-cd {working_dir}
-set -ex
-( cd {working_dir} &&
- if ! ( cd '{dir_link}' && [[ "$(git rev-parse --git-dir)" == '.git' ]] ) >/dev/null 2>&1; then
- rm -rf '{directory}' '{dir_link}'
- git clone '{shallow}' '{remote}' '{directory}' || git clone '{remote}' '{directory}'
- fi
- git -C '{directory}' reset --hard {ref} || \
- ((git -C '{directory}' fetch '{shallow}' origin {ref}:{ref} || \
- git -C '{directory}' fetch origin {ref}:{ref}) && git -C '{directory}' reset --hard {ref})
- git -C '{directory}' clean -xdf )
- """.format(
- working_dir = ctx.path(".").dirname,
- dir_link = ctx.path("."),
- directory = directory,
- remote = ctx.attr.remote,
- ref = ref,
- shallow = shallow,
- )], environment = ctx.os.environ)
- if st.return_code:
- fail("error cloning %s:\n%s" % (ctx.name, st.stderr))
+ git_ = git_repo(ctx, directory)
if ctx.attr.strip_prefix:
dest_link = "{}/{}".format(directory, ctx.attr.strip_prefix)
if not ctx.path(dest_link).exists:
fail("strip_prefix at {} does not exist in repo".format(ctx.attr.strip_prefix))
+ ctx.delete(root)
+ ctx.symlink(dest_link, root)
- ctx.symlink(dest_link, ctx.path("."))
- if ctx.attr.init_submodules:
- ctx.report_progress("Updating submodules")
- st = ctx.execute([bash_exe, "-c", """
-set -ex
-( git -C '{directory}' submodule update --init --checkout --force )
- """.format(
- directory = ctx.path("."),
- )], environment = ctx.os.environ)
- if st.return_code:
- fail("error updating submodules %s:\n%s" % (ctx.name, st.stderr))
-
- ctx.report_progress("Recording actual commit")
-
- # After the fact, determine the actual commit and its date
- actual_commit = ctx.execute([
- bash_exe,
- "-c",
- "(git -C '{directory}' log -n 1 --pretty='format:%H')".format(
- directory = ctx.path("."),
- ),
- ]).stdout
- shallow_date = ctx.execute([
- bash_exe,
- "-c",
- "(git -C '{directory}' log -n 1 --pretty='format:%cd' --date=raw)".format(
- directory = ctx.path("."),
- ),
- ]).stdout
- return {"commit": actual_commit, "shallow_since": shallow_date}
-
-def _remove_dot_git(ctx):
- # Remove the .git directory, if present
- bash_exe = ctx.os.environ["BAZEL_SH"] if "BAZEL_SH" in ctx.os.environ else "bash"
- ctx.execute([
- bash_exe,
- "-c",
- "rm -rf '{directory}'".format(directory = ctx.path(".git")),
- ])
+ return {"commit": git_.commit, "shallow_since": git_.shallow_since}
def _update_git_attrs(orig, keys, override):
result = update_attrs(orig, keys, override)
@@ -227,13 +148,13 @@ def _new_git_repository_implementation(ctx):
update = _clone_or_update(ctx)
workspace_and_buildfile(ctx)
patch(ctx)
- _remove_dot_git(ctx)
+ ctx.delete(ctx.path(".git"))
return _update_git_attrs(ctx.attr, _new_git_repository_attrs.keys(), update)
def _git_repository_implementation(ctx):
update = _clone_or_update(ctx)
patch(ctx)
- _remove_dot_git(ctx)
+ ctx.delete(ctx.path(".git"))
return _update_git_attrs(ctx.attr, _common_attrs.keys(), update)
new_git_repository = repository_rule(
diff --git a/tools/build_defs/repo/git_worker.bzl b/tools/build_defs/repo/git_worker.bzl
new file mode 100644
index 00000000000000..c7e9148f148daa
--- /dev/null
+++ b/tools/build_defs/repo/git_worker.bzl
@@ -0,0 +1,169 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Code for interacting with git binary to get the file tree checked out at the specified revision.
+"""
+
+_GitRepoInfo = provider(
+ doc = "Provider to organize precomputed arguments for calling git.",
+ fields = {
+ "directory": "Working directory path",
+ "shallow": "Defines the depth of a fetch. Either empty, --depth=1, or --shallow-since=<>",
+ "reset_ref": """Reference to use for resetting the git repository.
+Either commit hash, tag or branch.""",
+ "fetch_ref": """Reference for fetching. Can be empty (HEAD), tag or branch.
+Can not be a commit hash, since typically it is forbidden by git servers.""",
+ "remote": "URL of the git repository to fetch from.",
+ "init_submodules": """If True, submodules update command will be called after fetching
+and resetting to the specified reference.""",
+ },
+)
+
+def git_repo(ctx, directory):
+ """ Fetches data from git repository and checks out file tree.
+
+ Called by git_repository or new_git_repository rules.
+
+ Args:
+ ctx: Context of the calling rules, for reading the attributes.
+ Please refer to the git_repository and new_git_repository rules for the description.
+ directory: Directory where to check out the file tree.
+ Returns:
+ The struct with the following fields:
+ commit: Actual HEAD commit of the checked out data.
+ shallow_since: Actual date and time of the HEAD commit of the checked out data.
+ """
+ if ctx.attr.shallow_since:
+ if ctx.attr.tag:
+ fail("shallow_since not allowed if a tag is specified; --depth=1 will be used for tags")
+ if ctx.attr.branch:
+ fail("shallow_since not allowed if a branch is specified; --depth=1 will be used for branches")
+
+ shallow = "--depth=1"
+ if ctx.attr.commit:
+ # We can not use the commit value in --shallow-since;
+ # And since we are fetching HEAD in this case, we can not use --depth=1
+ shallow = ""
+
+ # Use shallow-since if given
+ if ctx.attr.shallow_since:
+ shallow = "--shallow-since=%s" % ctx.attr.shallow_since
+
+ reset_ref = ""
+ fetch_ref = ""
+ if ctx.attr.commit:
+ reset_ref = ctx.attr.commit
+ elif ctx.attr.tag:
+ reset_ref = "tags/" + ctx.attr.tag
+ fetch_ref = "tags/" + ctx.attr.tag + ":tags/" + ctx.attr.tag
+ elif ctx.attr.branch:
+ reset_ref = "origin/" + ctx.attr.branch
+ fetch_ref = ctx.attr.branch
+
+ git_repo = _GitRepoInfo(
+ directory = ctx.path(directory),
+ shallow = shallow,
+ reset_ref = reset_ref,
+ fetch_ref = fetch_ref,
+ remote = ctx.attr.remote,
+ init_submodules = ctx.attr.init_submodules,
+ )
+
+ ctx.report_progress("Cloning %s of %s" % (reset_ref, ctx.attr.remote))
+ if (ctx.attr.verbose):
+ print("git.bzl: Cloning or updating %s repository %s using strip_prefix of [%s]" %
+ (
+ " (%s)" % shallow if shallow else "",
+ ctx.name,
+ ctx.attr.strip_prefix if ctx.attr.strip_prefix else "None",
+ ))
+
+ _update(ctx, git_repo)
+ ctx.report_progress("Recording actual commit")
+ actual_commit = _get_head_commit(ctx, git_repo)
+ shallow_date = _get_head_date(ctx, git_repo)
+
+ return struct(commit = actual_commit, shallow_since = shallow_date)
+
+def _update(ctx, git_repo):
+ ctx.delete(git_repo.directory)
+
+ init(ctx, git_repo)
+ add_origin(ctx, git_repo, ctx.attr.remote)
+ fetch(ctx, git_repo)
+ reset(ctx, git_repo)
+ clean(ctx, git_repo)
+
+ if git_repo.init_submodules:
+ ctx.report_progress("Updating submodules")
+ update_submodules(ctx, git_repo)
+
+def init(ctx, git_repo):
+ cl = ["git", "init", git_repo.directory]
+ st = ctx.execute(cl, environment = ctx.os.environ)
+ if st.return_code != 0:
+ _error(ctx.name, cl, st.stderr)
+
+def add_origin(ctx, git_repo, remote):
+ _git(ctx, git_repo, "remote", "add", "origin", remote)
+
+def fetch(ctx, git_repo):
+ if not git_repo.fetch_ref:
+ # We need to explicitly specify to fetch all branches, otherwise only HEAD-reachable
+ # is fetched.
+ _git_maybe_shallow(ctx, git_repo, "fetch", "--all")
+ else:
+ _git_maybe_shallow(ctx, git_repo, "fetch", "origin", git_repo.fetch_ref)
+
+def reset(ctx, git_repo):
+ _git(ctx, git_repo, "reset", "--hard", git_repo.reset_ref)
+
+def clean(ctx, git_repo):
+ _git(ctx, git_repo, "clean", "-xdf")
+
+def update_submodules(ctx, git_repo):
+ _git(ctx, git_repo, "submodule", "update", "--init", "--checkout", "--force")
+
+def _get_head_commit(ctx, git_repo):
+ return _git(ctx, git_repo, "log", "-n", "1", "--pretty=format:%H")
+
+def _get_head_date(ctx, git_repo):
+ return _git(ctx, git_repo, "log", "-n", "1", "--pretty=format:%cd", "--date=raw")
+
+def _git(ctx, git_repo, command, *args):
+ start = ["git", command]
+ st = _execute(ctx, git_repo, start + list(args))
+ if st.return_code != 0:
+ _error(ctx.name, start + list(args), st.stderr)
+ return st.stdout
+
+def _git_maybe_shallow(ctx, git_repo, command, *args):
+ start = ["git", command]
+ args_list = list(args)
+ if git_repo.shallow:
+ st = _execute(ctx, git_repo, start + [git_repo.shallow] + args_list)
+ if st.return_code == 0:
+ return
+ st = _execute(ctx, git_repo, start + args_list)
+ if st.return_code != 0:
+ _error(ctx.name, start + args_list, st.stderr)
+
+def _execute(ctx, git_repo, args):
+ return ctx.execute(
+ args,
+ environment = ctx.os.environ,
+ working_directory = str(git_repo.directory),
+ )
+
+def _error(name, command, stderr):
+ fail("error running '%s' while working with @%s:\n%s" % (" ".join(command).strip(), name, stderr))
| diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestContext.java b/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestContext.java
index 0525f34f82533f..98583f05b7fee9 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestContext.java
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestContext.java
@@ -1,16 +1,17 @@
-// Copyright 2018 The Bazel Authors. All rights reserved.
+// Copyright 2019 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
+//
package com.google.devtools.build.lib.blackbox.framework;
@@ -224,6 +225,32 @@ public BuilderRunner bazel() {
workDir, binaryPath, getProcessTimeoutMillis(-1), commonEnv, executorService);
}
+ /**
+ * Runs external binary in the specified working directory. See {@link BuilderRunner}
+ *
+ * @param workingDirectory working directory for running the binary
+ * @param processToRun path to the binary to run
+ * @param expectEmptyError if <code>true</code>, no text is expected in the error stream,
+ * otherwise, ProcessRunnerException is thrown.
+ * @param arguments arguments to pass to the binary
+ * @return ProcessResult execution result
+ */
+ public ProcessResult runBinary(Path workingDirectory,
+ String processToRun,
+ boolean expectEmptyError,
+ String... arguments)
+ throws Exception {
+ ProcessParameters parameters =
+ ProcessParameters.builder()
+ .setWorkingDirectory(workingDirectory.toFile())
+ .setName(processToRun)
+ .setTimeoutMillis(getProcessTimeoutMillis(-1))
+ .setArguments(arguments)
+ .setExpectedEmptyError(expectEmptyError)
+ .build();
+ return new ProcessRunner(parameters, executorService).runSynchronously();
+ }
+
/**
* Take the value from environment variable and assert that it is a path, and the file or
* directory, specified by this path, exists.
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/BUILD b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/BUILD
index ecf953667d55f6..349610d63496a1 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/BUILD
@@ -51,11 +51,30 @@ java_test(
],
)
+java_test(
+ name = "GitRepositoryBlackBoxTest",
+ timeout = "moderate",
+ srcs = [
+ "GitRepositoryBlackBoxTest.java",
+ "GitRepositoryHelper.java",
+ "RepoWithRuleWritingTextGenerator.java",
+ "WorkspaceTestUtils.java",
+ ],
+ tags = ["black_box_test"],
+ deps = common_deps + [
+ "//src/main/java/com/google/devtools/build/lib:build-base",
+ "//src/main/java/com/google/devtools/build/lib:bazel-repository",
+ "//src/main/java/com/google/devtools/build/lib/vfs",
+ "//src/test/java/com/google/devtools/build/lib:foundations_testutil",
+ ],
+)
+
test_suite(
name = "ws_black_box_tests",
tags = ["black_box_test"],
tests = [
"BazelEmbeddedSkylarkBlackBoxTest",
+ "GitRepositoryBlackBoxTest",
"RepoWithRuleWritingTextGeneratorTest",
"WorkspaceBlackBoxTest",
],
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryBlackBoxTest.java b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryBlackBoxTest.java
new file mode 100644
index 00000000000000..2ba2d43a9470ab
--- /dev/null
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryBlackBoxTest.java
@@ -0,0 +1,200 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package com.google.devtools.build.lib.blackbox.tests.workspace;
+
+import static com.google.devtools.build.lib.blackbox.tests.workspace.RepoWithRuleWritingTextGenerator.callRule;
+import static com.google.devtools.build.lib.blackbox.tests.workspace.RepoWithRuleWritingTextGenerator.loadRule;
+
+import com.google.devtools.build.lib.blackbox.framework.BlackBoxTestContext;
+import com.google.devtools.build.lib.blackbox.framework.BuilderRunner;
+import com.google.devtools.build.lib.blackbox.framework.PathUtils;
+import com.google.devtools.build.lib.blackbox.junit.AbstractBlackBoxTest;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import org.junit.Test;
+
+/**
+ * Black box tests for git_repository/new_git_repository.
+ * On Windows, runs without MSYS {@link WorkspaceTestUtils#bazel}
+ *
+ * General approach to testing:
+ *
+ * We use {@link GitRepositoryHelper} and {@link RepoWithRuleWritingTextGenerator} helper classes.
+ *
+ * 1. We are creating some git repository with the preset contents, which will be used for
+ * fetching contents for the test. We plan to fetch contents specifying either commit hash,
+ * tag, or branch.
+ * For all test variants, we are creating the same repository, as the same HEAD commit
+ * is marked with a tag, and can be addressed with commit hash, master branch, and tag name.
+ *
+ * 2. The contents of the git repository working tree is generated by
+ * {@link RepoWithRuleWritingTextGenerator}. We pass some certain text to that generator;
+ * that exact text should appear as a result of the build of the generated target
+ * "call_write_text" in the file "out.txt".
+ *
+ * 3. We generate the new_git_repository repository rule, which refers to the git repository,
+ * created in #1, specifying different git repository attributes in each test.
+ * We call 'bazel build' for the "call_write_text" target of the external repository,
+ * and asserting the contents in the "out.txt" file.
+ */
+public class GitRepositoryBlackBoxTest extends AbstractBlackBoxTest {
+
+ private static final String HELLO_FROM_EXTERNAL_REPOSITORY = "Hello from GIT repository!";
+ private static final String HELLO_FROM_BRANCH = "Hello from branch!";
+
+ /**
+ * Tests usage of new_git_repository workspace rule with the "tag" attribute.
+ * Please see the general approach description in the class javadoc comment.
+ */
+ @Test
+ public void testCloneAtTag() throws Exception {
+ Path repo = context().getTmpDir().resolve("ext_repo");
+ setupGitRepository(context(), repo);
+
+ String buildFileContent = String.format("%s\n%s",
+ loadRule(""),
+ callRule("call_write_text", "out.txt", HELLO_FROM_EXTERNAL_REPOSITORY));
+ context().write("WORKSPACE",
+ "load(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"new_git_repository\")",
+ "new_git_repository(",
+ " name='ext',",
+ String.format(" remote='%s',", PathUtils.pathToFileURI(repo.resolve(".git"))),
+ " tag='first',",
+ String.format(" build_file_content=\"\"\"%s\"\"\",", buildFileContent),
+ ")");
+
+ // This creates Bazel without MSYS, see implementation for details.
+ BuilderRunner bazel = WorkspaceTestUtils.bazel(context());
+ bazel.build("@ext//:call_write_text");
+ Path outPath = context().resolveBinPath(bazel, "external/ext/out.txt");
+ WorkspaceTestUtils.assertLinesExactly(outPath, HELLO_FROM_EXTERNAL_REPOSITORY);
+ }
+
+ /**
+ * Tests usage of new_git_repository workspace rule with the "commit" attribute.
+ * Please see the general approach description in the class javadoc comment.
+ */
+ @Test
+ public void testCloneAtCommit() throws Exception {
+ Path repo = context().getTmpDir().resolve("ext_repo");
+ String commit = setupGitRepository(context(), repo);
+
+ String buildFileContent = String.format("%s\n%s",
+ loadRule(""),
+ callRule("call_write_text", "out.txt", HELLO_FROM_EXTERNAL_REPOSITORY));
+ context().write("WORKSPACE",
+ "load(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"new_git_repository\")",
+ "new_git_repository(",
+ " name='ext',",
+ String.format(" remote='%s',", PathUtils.pathToFileURI(repo.resolve(".git"))),
+ String.format(" commit='%s',", commit),
+ String.format(" build_file_content=\"\"\"%s\"\"\",", buildFileContent),
+ ")");
+
+ // This creates Bazel without MSYS, see implementation for details.
+ BuilderRunner bazel = WorkspaceTestUtils.bazel(context());
+ bazel.build("@ext//:call_write_text");
+ Path outPath = context().resolveBinPath(bazel, "external/ext/out.txt");
+ WorkspaceTestUtils.assertLinesExactly(outPath, HELLO_FROM_EXTERNAL_REPOSITORY);
+ }
+
+ /**
+ * Tests usage of new_git_repository workspace rule with the "branch" attribute.
+ * Please see the general approach description in the class javadoc comment.
+ */
+ @Test
+ public void testCloneAtMaster() throws Exception {
+ Path repo = context().getTmpDir().resolve("ext_repo");
+ setupGitRepository(context(), repo);
+
+ String buildFileContent = String.format("%s\n%s",
+ loadRule(""),
+ callRule("call_write_text", "out.txt", HELLO_FROM_EXTERNAL_REPOSITORY));
+ context().write("WORKSPACE",
+ "load(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"new_git_repository\")",
+ "new_git_repository(",
+ " name='ext',",
+ String.format(" remote='%s',", PathUtils.pathToFileURI(repo.resolve(".git"))),
+ " branch='master',",
+ String.format(" build_file_content=\"\"\"%s\"\"\",", buildFileContent),
+ ")");
+
+ // This creates Bazel without MSYS, see implementation for details.
+ BuilderRunner bazel = WorkspaceTestUtils.bazel(context());
+ bazel.build("@ext//:call_write_text");
+ Path outPath = context().resolveBinPath(bazel, "external/ext/out.txt");
+ WorkspaceTestUtils.assertLinesExactly(outPath, HELLO_FROM_EXTERNAL_REPOSITORY);
+ }
+
+ @Test
+ public void testCheckoutOfCommitFromBranch() throws Exception {
+ Path repo = context().getTmpDir().resolve("branch_repo");
+ GitRepositoryHelper gitRepository = initGitRepository(context(), repo);
+
+ context().write(repo.resolve("master.marker").toString());
+ gitRepository.addAll();
+ gitRepository.commit("Initial commit");
+
+ gitRepository.createNewBranch("demonstrate_branch");
+
+ RepoWithRuleWritingTextGenerator generator = new RepoWithRuleWritingTextGenerator(repo);
+ generator.withOutputText(HELLO_FROM_BRANCH).setupRepository();
+
+ gitRepository.addAll();
+ gitRepository.commit("Commit in branch");
+ String branchCommitHash = gitRepository.getHead();
+
+ gitRepository.checkout("master");
+ generator.withOutputText(HELLO_FROM_EXTERNAL_REPOSITORY).setupRepository();
+ gitRepository.addAll();
+ gitRepository.commit("Commit in master");
+
+ context().write("WORKSPACE",
+ "load(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")",
+ "git_repository(",
+ " name='ext',",
+ String.format(" remote='%s',", PathUtils.pathToFileURI(repo.resolve(".git"))),
+ String.format(" commit='%s',", branchCommitHash),
+ ")");
+
+ // This creates Bazel without MSYS, see implementation for details.
+ BuilderRunner bazel = WorkspaceTestUtils.bazel(context());
+ bazel.build("@ext//:write_text");
+ Path outPath = context().resolveBinPath(bazel, "external/ext/out");
+ WorkspaceTestUtils.assertLinesExactly(outPath, HELLO_FROM_BRANCH);
+ }
+
+ private static String setupGitRepository(BlackBoxTestContext context, Path repo) throws Exception {
+ GitRepositoryHelper gitRepository = initGitRepository(context, repo);
+
+ RepoWithRuleWritingTextGenerator generator = new RepoWithRuleWritingTextGenerator(repo);
+ generator.skipBuildFile().setupRepository();
+
+ gitRepository.addAll();
+ gitRepository.commit("Initial commit");
+ gitRepository.tag("first");
+ return gitRepository.getHead();
+ }
+
+ private static GitRepositoryHelper initGitRepository(BlackBoxTestContext context, Path repo)
+ throws Exception {
+ PathUtils.deleteTree(repo);
+ Files.createDirectories(repo);
+ GitRepositoryHelper gitRepository = new GitRepositoryHelper(context, repo);
+ gitRepository.init();
+ return gitRepository;
+ }
+}
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryHelper.java b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryHelper.java
new file mode 100644
index 00000000000000..5b3000bdbaef05
--- /dev/null
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/GitRepositoryHelper.java
@@ -0,0 +1,122 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package com.google.devtools.build.lib.blackbox.tests.workspace;
+
+import com.google.devtools.build.lib.blackbox.framework.BlackBoxTestContext;
+import com.google.devtools.build.lib.blackbox.framework.ProcessResult;
+import java.nio.file.Path;
+
+/**
+ * Helper class for working with local git repository in tests.
+ * Should not be used outside ot tests.
+ */
+class GitRepositoryHelper {
+ private final BlackBoxTestContext context;
+ private final Path root;
+
+ /**
+ * Constructs the helper.
+ * @param context {@link BlackBoxTestContext} for running git process
+ * @param root working directory for running git process, expected to be existing.
+ */
+ GitRepositoryHelper(BlackBoxTestContext context, Path root) {
+ this.context = context;
+ this.root = root;
+ }
+
+ /**
+ * Calls 'git init' and 'git config' for specifying test user and email.
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void init() throws Exception {
+ runGit("init");
+ runGit("config", "user.email", "[email protected]");
+ runGit("config", "user.name", "E X Ample");
+ }
+
+ /**
+ * Recursively updates git index for all the files and directories under the working directory.
+ *
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void addAll() throws Exception {
+ runGit("add", ".");
+ }
+
+ /**
+ * Commits all staged changed.
+ *
+ * @param commitMessage commit message
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void commit(String commitMessage) throws Exception {
+ runGit("commit", "-m", commitMessage);
+ }
+
+ /**
+ * Tags the HEAD commit.
+ * @param tagName tag name
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void tag(String tagName) throws Exception {
+ runGit("tag", tagName);
+ }
+
+ /**
+ * Creates the new branch with the specified name at HEAD.
+ * @param branchName branch name
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void createNewBranch(String branchName) throws Exception {
+ runGit("checkout", "-b", branchName);
+ }
+
+ /**
+ * Checks out specified revision or reference.
+ * @param ref reference to check out
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ void checkout(String ref) throws Exception {
+ runGit("checkout", ref);
+ }
+
+ /**
+ * Returns the HEAD's commit hash.
+ * @throws Exception related to the invocation of the external git process
+ * (like IOException or TimeoutException) or
+ * ProcessRunnerException if the process returned not expected return code.
+ */
+ String getHead() throws Exception {
+ return runGit("rev-parse", "--short", "HEAD");
+ }
+
+ private String runGit(String... arguments) throws Exception {
+ ProcessResult result = context.runBinary(root, "git", false, arguments);
+ return result.outString();
+ }
+}
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/RepoWithRuleWritingTextGenerator.java b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/RepoWithRuleWritingTextGenerator.java
index 2ebf4ce697bdc3..a7b4a4419a0634 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/RepoWithRuleWritingTextGenerator.java
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace/RepoWithRuleWritingTextGenerator.java
@@ -58,6 +58,7 @@ public class RepoWithRuleWritingTextGenerator {
private String target;
private String outputText;
private String outFile;
+ private boolean generateBuildFile;
/**
* Generator constructor
@@ -69,6 +70,7 @@ public class RepoWithRuleWritingTextGenerator {
this.target = TARGET;
this.outputText = HELLO;
this.outFile = OUT_FILE;
+ generateBuildFile = true;
}
/**
@@ -104,6 +106,16 @@ RepoWithRuleWritingTextGenerator withOutFile(String name) {
return this;
}
+ /**
+ * Specifies that BUILD file should not be generated
+ *
+ * @return this generator
+ */
+ RepoWithRuleWritingTextGenerator skipBuildFile() {
+ generateBuildFile = false;
+ return this;
+ }
+
/**
* Generates the repository: WORKSPACE, BUILD, and helper.bzl files.
*
@@ -113,13 +125,15 @@ RepoWithRuleWritingTextGenerator withOutFile(String name) {
Path setupRepository() throws IOException {
Path workspace = PathUtils.writeFileInDir(root, "WORKSPACE");
PathUtils.writeFileInDir(root, HELPER_FILE, WRITE_TEXT_TO_FILE);
- PathUtils.writeFileInDir(
- root,
- "BUILD",
- "load(\"@bazel_tools//tools/build_defs/pkg:pkg.bzl\", \"pkg_tar\")",
- loadRule(""),
- callRule(target, outFile, outputText),
- String.format("pkg_tar(name = \"%s\", srcs = glob([\"*\"]),)", getPkgTarTarget()));
+ if (generateBuildFile) {
+ PathUtils.writeFileInDir(
+ root,
+ "BUILD",
+ "load(\"@bazel_tools//tools/build_defs/pkg:pkg.bzl\", \"pkg_tar\")",
+ loadRule(""),
+ callRule(target, outFile, outputText),
+ String.format("pkg_tar(name = \"%s\", srcs = glob([\"*\"]),)", getPkgTarTarget()));
+ }
return workspace.getParent();
}
diff --git a/src/test/shell/bazel/skylark_git_repository_test.sh b/src/test/shell/bazel/skylark_git_repository_test.sh
index c4e14982ef57b3..ca4840e1f6e09b 100755
--- a/src/test/shell/bazel/skylark_git_repository_test.sh
+++ b/src/test/shell/bazel/skylark_git_repository_test.sh
@@ -170,7 +170,7 @@ function test_git_repository_strip_prefix() {
function test_git_repository_shallow_since() {
# This date is the day the commit was made.
- do_git_repository_test "52f9a3f87a2dd17ae0e5847bbae9734f09354afd" "" "2016-07-16"
+ do_git_repository_test "52f9a3f87a2dd17ae0e5847bbae9734f09354afd" "" "2015-07-16"
}
function test_new_git_repository_with_build_file() {
do_new_git_repository_test "0-initial" "build_file"
@@ -640,7 +640,7 @@ EOF
bazel fetch //planets:planet-info >& $TEST_log \
|| echo "Expect run to fail."
- expect_log "error cloning"
+ expect_log "error running 'git fetch origin' while working with @pluto"
}
run_suite "skylark git_repository tests"
| train | train | 2019-06-18T12:48:46 | "2019-06-13T08:48:54Z" | meteorcloudy | test |
bazelbuild/bazel/8646_8648 | bazelbuild/bazel | bazelbuild/bazel/8646 | bazelbuild/bazel/8648 | [
"timestamp(timedelta=0.0, similarity=0.8454864151265358)"
] | 620d21c40cdd9bf9187fe74263ade3db1edaa009 | 4ef5f4ed104f7037f742bcc8c7f21cd07f039e9b | [
"The fix is to call `SpawnExecutionContext.lockOutputfiles()` before starting downloading of outputs."
] | [
"Reword: \"Ensure that we are the only ones writing to the output files when using the dynamic spawn strategy.\"\r\n\r\nAlso not sure why the bug link in the code is necessary. Yes, there was a bug that's fixed with this change. Reference it in the commit description instead?"
] | "2019-06-17T12:21:02Z" | [
"untriaged",
"team-Remote-Exec"
] | the dynamic spawn strategy is broken for remote execution | We have received several bug reports about the dynamic spawn strategy not working properly with remote execution / caching. I took some time to look through the code to better understand the issue. I believe to now understand the heart of the issue.
The dynamic spawn strategy in a single line:
```
SpawnResult result =
ExecutorService.invokeAny(localExecutionCallable, remoteExecutionCallable)`
```
This line takes the result of the first callable to finish and calls `Future.cancel(mayInterruptIfRunning=true)` on the slower one. The bug is that the Callable's have side effects in that both write their outputs to the file system and incidentally also to the same files.
This has two issues:
1. The effective output files of a single action can end up being a mix of both local and remote execution. This would mostly go unnoticed (esp. if the actions are reproducible) except when it doesn't then it would lead to hard to debug correctness bugs.
2. The output files Bazel sees can be corrupted. This can be the case if both the remote strategy and local execution strategy write to the same file concurrently.
I believe 2.) is what users are most likely to see.
| [
"src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/test/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCacheTests.java",
"src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java",
"src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java",
"src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java",
"src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java",
"src/test/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCacheTest.java",
"src/test/java/com/google/devtools/build/lib/remote/util/BUILD",
"src/test/java/com/google/devtools/build/lib/remote/util/FakeSpawnExecutionContext.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
index 1e9b65026482e6..438210dbc4f8f1 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
@@ -46,6 +46,7 @@
import com.google.devtools.build.lib.actions.UserExecException;
import com.google.devtools.build.lib.actions.cache.MetadataInjector;
import com.google.devtools.build.lib.concurrent.ThreadSafety;
+import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext;
import com.google.devtools.build.lib.profiler.Profiler;
import com.google.devtools.build.lib.profiler.SilentCloseable;
import com.google.devtools.build.lib.remote.AbstractRemoteActionCache.ActionResultMetadata.DirectoryMetadata;
@@ -70,6 +71,7 @@
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
@@ -83,6 +85,12 @@
@ThreadSafety.ThreadSafe
public abstract class AbstractRemoteActionCache implements AutoCloseable {
+ /** See {@link SpawnExecutionContext#lockOutputFiles()}. */
+ @FunctionalInterface
+ interface OutputFilesLocker {
+ void lock() throws InterruptedException;
+ }
+
private static final ListenableFuture<Void> COMPLETED_SUCCESS = SettableFuture.create();
private static final ListenableFuture<byte[]> EMPTY_BYTES = SettableFuture.create();
@@ -161,16 +169,24 @@ public void onFailure(Throwable t) {
return outerF;
}
+ private static Path toTmpDownloadPath(Path actualPath) {
+ return actualPath.getParentDirectory().getRelative(actualPath.getBaseName() + ".tmp");
+ }
+
/**
* Download the output files and directory trees of a remotely executed action to the local
* machine, as well stdin / stdout to the given files.
*
* <p>In case of failure, this method deletes any output files it might have already created.
*
+ * @param outputFilesLocker ensures that we are the only ones writing to the output files when
+ * using the dynamic spawn strategy.
+ *
* @throws IOException in case of a cache miss or if the remote cache is unavailable.
* @throws ExecException in case clean up after a failed download failed.
*/
- public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
+ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr,
+ OutputFilesLocker outputFilesLocker)
throws ExecException, IOException, InterruptedException {
ActionResultMetadata metadata = parseActionResultMetadata(result, execRoot);
@@ -182,7 +198,8 @@ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
.map(
(file) -> {
try {
- ListenableFuture<Void> download = downloadFile(file.path(), file.digest());
+ ListenableFuture<Void> download =
+ downloadFile(toTmpDownloadPath(file.path()), file.digest());
return Futures.transform(download, (d) -> file, directExecutor());
} catch (IOException e) {
return Futures.<FileMetadata>immediateFailedFuture(e);
@@ -209,10 +226,8 @@ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
for (ListenableFuture<FileMetadata> download : downloads) {
try {
- FileMetadata outputFile = getFromFuture(download);
- if (outputFile != null) {
- outputFile.path().setExecutable(outputFile.isExecutable());
- }
+ // Wait for all downloads to finish.
+ getFromFuture(download);
} catch (IOException e) {
downloadException = downloadException == null ? e : downloadException;
} catch (InterruptedException e) {
@@ -222,10 +237,9 @@ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
if (downloadException != null || interruptedException != null) {
try {
- // Delete any (partially) downloaded output files, since any subsequent local execution
- // of this action may expect none of the output files to exist.
+ // Delete any (partially) downloaded output files.
for (OutputFile file : result.getOutputFilesList()) {
- execRoot.getRelative(file.getPath()).delete();
+ toTmpDownloadPath(execRoot.getRelative(file.getPath())).delete();
}
for (OutputDirectory directory : result.getOutputDirectoriesList()) {
// Only delete the directories below the output directories because the output
@@ -261,6 +275,12 @@ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
tmpOutErr.clearErr();
}
+ // Ensure that we are the only ones writing to the output files when using the dynamic spawn
+ // strategy.
+ outputFilesLocker.lock();
+
+ moveOutputsToFinalLocation(downloads);
+
List<SymlinkMetadata> symlinksInDirectories = new ArrayList<>();
for (Entry<Path, DirectoryMetadata> entry : metadata.directories()) {
entry.getKey().createDirectoryAndParents();
@@ -275,6 +295,36 @@ public void download(ActionResult result, Path execRoot, FileOutErr origOutErr)
createSymlinks(symlinks);
}
+ /**
+ * Copies moves the downloaded outputs from their download location to their declared location.
+ */
+ private void moveOutputsToFinalLocation(List<ListenableFuture<FileMetadata>> downloads)
+ throws IOException, InterruptedException {
+ List<FileMetadata> finishedDownloads = new ArrayList<>(downloads.size());
+ for (ListenableFuture<FileMetadata> finishedDownload : downloads) {
+ FileMetadata outputFile = getFromFuture(finishedDownload);
+ if (outputFile != null) {
+ finishedDownloads.add(outputFile);
+ }
+ }
+ /*
+ * Sort the list lexicographically based on its temporary download path in order to avoid
+ * filename clashes when moving the files:
+ *
+ * Consider an action that produces two outputs foo and foo.tmp. These outputs would initially
+ * be downloaded to foo.tmp and foo.tmp.tmp. When renaming them to foo and foo.tmp we need to
+ * ensure that rename(foo.tmp, foo) happens before rename(foo.tmp.tmp, foo.tmp). We ensure this
+ * by doing the renames in lexicographical order of the download names.
+ */
+ Collections.sort(finishedDownloads, Comparator.comparing(f -> toTmpDownloadPath(f.path())));
+
+ // Move the output files from their temporary name to the actual output file name.
+ for (FileMetadata outputFile : finishedDownloads) {
+ FileSystemUtils.moveFile(toTmpDownloadPath(outputFile.path()), outputFile.path());
+ outputFile.path().setExecutable(outputFile.isExecutable());
+ }
+ }
+
private void createSymlinks(Iterable<SymlinkMetadata> symlinks) throws IOException {
for (SymlinkMetadata symlink : symlinks) {
if (symlink.target().isAbsolute()) {
@@ -376,6 +426,8 @@ private List<ListenableFuture<FileMetadata>> downloadOutErr(ActionResult result,
* @param execRoot the execution root
* @param metadataInjector the action's metadata injector that allows this method to inject
* metadata about an action output instead of downloading the output
+ * @param outputFilesLocker ensures that we are the only ones writing to the output files when
+ * using the dynamic spawn strategy.
* @throws IOException in case of failure
* @throws InterruptedException in case of receiving an interrupt
*/
@@ -386,8 +438,8 @@ public InMemoryOutput downloadMinimal(
@Nullable PathFragment inMemoryOutputPath,
OutErr outErr,
Path execRoot,
- MetadataInjector metadataInjector)
- throws IOException, InterruptedException {
+ MetadataInjector metadataInjector,
+ OutputFilesLocker outputFilesLocker) throws IOException, InterruptedException {
Preconditions.checkState(
result.getExitCode() == 0,
"injecting remote metadata is only supported for successful actions (exit code 0).");
@@ -403,6 +455,10 @@ public InMemoryOutput downloadMinimal(
+ "--experimental_remote_download_outputs=minimal");
}
+ // Ensure that when using dynamic spawn strategy that we are the only ones writing to the
+ // output files.
+ outputFilesLocker.lock();
+
ActionInput inMemoryOutput = null;
Digest inMemoryOutputDigest = null;
for (ActionInput output : outputs) {
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index 4bd91ae1ac9479..3c0cf0e03cea0e 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -167,7 +167,8 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
if (downloadOutputs) {
try (SilentCloseable c =
prof.profile(ProfilerTask.REMOTE_DOWNLOAD, "download outputs")) {
- remoteCache.download(result, execRoot, context.getFileOutErr());
+ remoteCache.download(result, execRoot, context.getFileOutErr(),
+ context::lockOutputFiles);
}
} else {
PathFragment inMemoryOutputPath = getInMemoryOutputPath(spawn);
@@ -181,7 +182,8 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
inMemoryOutputPath,
context.getFileOutErr(),
execRoot,
- context.getMetadataInjector());
+ context.getMetadataInjector(),
+ context::lockOutputFiles);
}
}
SpawnResult spawnResult =
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index 3e57b5c989c693..4a2ab8577c463a 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -312,7 +312,8 @@ private SpawnResult downloadAndFinalizeSpawnResult(
InMemoryOutput inMemoryOutput = null;
if (downloadOutputs) {
try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs")) {
- remoteCache.download(actionResult, execRoot, context.getFileOutErr());
+ remoteCache.download(actionResult, execRoot, context.getFileOutErr(),
+ context::lockOutputFiles);
}
} else {
PathFragment inMemoryOutputPath = getInMemoryOutputPath(spawn);
@@ -325,7 +326,8 @@ private SpawnResult downloadAndFinalizeSpawnResult(
inMemoryOutputPath,
context.getFileOutErr(),
execRoot,
- context.getMetadataInjector());
+ context.getMetadataInjector(),
+ context::lockOutputFiles);
}
}
return createSpawnResult(actionResult.getExitCode(), cacheHit, getName(), inMemoryOutput);
@@ -405,10 +407,11 @@ private SpawnResult execLocallyAndUploadOrFail(
return execLocallyAndUpload(
spawn, context, inputMap, remoteCache, actionKey, action, command, uploadLocalResults);
}
- return handleError(cause, context.getFileOutErr(), actionKey);
+ return handleError(cause, context.getFileOutErr(), actionKey, context);
}
- private SpawnResult handleError(IOException exception, FileOutErr outErr, ActionKey actionKey)
+ private SpawnResult handleError(IOException exception, FileOutErr outErr, ActionKey actionKey,
+ SpawnExecutionContext context)
throws ExecException, InterruptedException, IOException {
if (exception.getCause() instanceof ExecutionStatusException) {
ExecutionStatusException e = (ExecutionStatusException) exception.getCause();
@@ -417,7 +420,7 @@ private SpawnResult handleError(IOException exception, FileOutErr outErr, Action
maybeDownloadServerLogs(resp, actionKey);
if (resp.hasResult()) {
// We try to download all (partial) results even on server error, for debuggability.
- remoteCache.download(resp.getResult(), execRoot, outErr);
+ remoteCache.download(resp.getResult(), execRoot, outErr, context::lockOutputFiles);
}
}
if (e.isExecutionTimeout()) {
| diff --git a/src/test/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCacheTests.java b/src/test/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCacheTests.java
index 2c4b95bb6c1e57..68d2d53d47fd74 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCacheTests.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCacheTests.java
@@ -20,6 +20,7 @@
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -34,6 +35,7 @@
import build.bazel.remote.execution.v2.OutputFile;
import build.bazel.remote.execution.v2.SymlinkNode;
import build.bazel.remote.execution.v2.Tree;
+import com.google.common.base.Charsets;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -52,6 +54,7 @@
import com.google.devtools.build.lib.actions.cache.MetadataInjector;
import com.google.devtools.build.lib.actions.util.ActionsTestUtil;
import com.google.devtools.build.lib.clock.JavaClock;
+import com.google.devtools.build.lib.remote.AbstractRemoteActionCache.OutputFilesLocker;
import com.google.devtools.build.lib.remote.AbstractRemoteActionCache.UploadManifest;
import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.remote.util.DigestUtil;
@@ -86,12 +89,17 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.mockito.Mock;
import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
/** Tests for {@link AbstractRemoteActionCache}. */
@RunWith(JUnit4.class)
public class AbstractRemoteActionCacheTests {
+ @Mock
+ private OutputFilesLocker outputFilesLocker;
+
private FileSystem fs;
private Path execRoot;
ArtifactRoot artifactRoot;
@@ -106,6 +114,7 @@ public static void beforeEverything() {
@Before
public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
fs = new InMemoryFileSystem(new JavaClock(), DigestHashFunction.SHA256);
execRoot = fs.getPath("/execroot");
execRoot.createDirectoryAndParents();
@@ -531,10 +540,11 @@ public void downloadRelativeFileSymlink() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFileSymlinksBuilder().setPath("a/b/link").setTarget("../../foo");
// Doesn't check for dangling links, hence download succeeds.
- cache.download(result.build(), execRoot, null);
+ cache.download(result.build(), execRoot, null, outputFilesLocker);
Path path = execRoot.getRelative("a/b/link");
assertThat(path.isSymbolicLink()).isTrue();
assertThat(path.readSymbolicLink()).isEqualTo(PathFragment.create("../../foo"));
+ verify(outputFilesLocker).lock();
}
@Test
@@ -543,10 +553,11 @@ public void downloadRelativeDirectorySymlink() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectorySymlinksBuilder().setPath("a/b/link").setTarget("foo");
// Doesn't check for dangling links, hence download succeeds.
- cache.download(result.build(), execRoot, null);
+ cache.download(result.build(), execRoot, null, outputFilesLocker);
Path path = execRoot.getRelative("a/b/link");
assertThat(path.isSymbolicLink()).isTrue();
assertThat(path.readSymbolicLink()).isEqualTo(PathFragment.create("foo"));
+ verify(outputFilesLocker).lock();
}
@Test
@@ -562,10 +573,11 @@ public void downloadRelativeSymlinkInDirectory() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectoriesBuilder().setPath("dir").setTreeDigest(treeDigest);
// Doesn't check for dangling links, hence download succeeds.
- cache.download(result.build(), execRoot, null);
+ cache.download(result.build(), execRoot, null, outputFilesLocker);
Path path = execRoot.getRelative("dir/link");
assertThat(path.isSymbolicLink()).isTrue();
assertThat(path.readSymbolicLink()).isEqualTo(PathFragment.create("../foo"));
+ verify(outputFilesLocker).lock();
}
@Test
@@ -574,9 +586,10 @@ public void downloadAbsoluteDirectorySymlinkError() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectorySymlinksBuilder().setPath("foo").setTarget("/abs/link");
IOException expected =
- assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null));
+ assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null, outputFilesLocker));
assertThat(expected).hasMessageThat().contains("/abs/link");
assertThat(expected).hasMessageThat().contains("absolute path");
+ verify(outputFilesLocker).lock();
}
@Test
@@ -585,9 +598,10 @@ public void downloadAbsoluteFileSymlinkError() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFileSymlinksBuilder().setPath("foo").setTarget("/abs/link");
IOException expected =
- assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null));
+ assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null, outputFilesLocker));
assertThat(expected).hasMessageThat().contains("/abs/link");
assertThat(expected).hasMessageThat().contains("absolute path");
+ verify(outputFilesLocker).lock();
}
@Test
@@ -603,10 +617,11 @@ public void downloadAbsoluteSymlinkInDirectoryError() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectoriesBuilder().setPath("dir").setTreeDigest(treeDigest);
IOException expected =
- assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null));
+ assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null, outputFilesLocker));
assertThat(expected).hasMessageThat().contains("dir/link");
assertThat(expected).hasMessageThat().contains("/foo");
assertThat(expected).hasMessageThat().contains("absolute path");
+ verify(outputFilesLocker).lock();
}
@Test
@@ -623,11 +638,12 @@ public void downloadFailureMaintainsDirectories() throws Exception {
result.addOutputFiles(
OutputFile.newBuilder().setPath("outputdir/outputfile").setDigest(outputFileDigest));
result.addOutputFiles(OutputFile.newBuilder().setPath("otherfile").setDigest(otherFileDigest));
- assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null));
+ assertThrows(IOException.class, () -> cache.download(result.build(), execRoot, null, outputFilesLocker));
assertThat(cache.getNumFailedDownloads()).isEqualTo(1);
assertThat(execRoot.getRelative("outputdir").exists()).isTrue();
assertThat(execRoot.getRelative("outputdir/outputfile").exists()).isFalse();
assertThat(execRoot.getRelative("otherfile").exists()).isFalse();
+ verify(outputFilesLocker, never()).lock();
}
@Test
@@ -654,11 +670,12 @@ public void onErrorWaitForRemainingDownloadsToComplete() throws Exception {
IOException e =
assertThrows(
IOException.class,
- () -> cache.download(result, execRoot, new FileOutErr(stdout, stderr)));
+ () -> cache.download(result, execRoot, new FileOutErr(stdout, stderr), outputFilesLocker));
assertThat(cache.getNumSuccessfulDownloads()).isEqualTo(2);
assertThat(cache.getNumFailedDownloads()).isEqualTo(1);
assertThat(cache.getDownloadQueueSize()).isEqualTo(3);
assertThat(Throwables.getRootCause(e)).hasMessageThat().isEqualTo("download failed");
+ verify(outputFilesLocker, never()).lock();
}
@Test
@@ -684,7 +701,7 @@ public void testDownloadWithStdoutStderrOnSuccess() throws Exception {
.setStderrDigest(digestStderr)
.build();
- cache.download(result, execRoot, spyOutErr);
+ cache.download(result, execRoot, spyOutErr, outputFilesLocker);
verify(spyOutErr, Mockito.times(2)).childOutErr();
verify(spyChildOutErr).clearOut();
@@ -698,6 +715,8 @@ public void testDownloadWithStdoutStderrOnSuccess() throws Exception {
} catch (IOException err) {
throw new AssertionError("outErr should still be writable after download finished.", err);
}
+
+ verify(outputFilesLocker).lock();
}
@Test
@@ -724,7 +743,7 @@ public void testDownloadWithStdoutStderrOnFailure() throws Exception {
.setStderrDigest(digestStderr)
.build();
IOException e =
- assertThrows(IOException.class, () -> cache.download(result, execRoot, spyOutErr));
+ assertThrows(IOException.class, () -> cache.download(result, execRoot, spyOutErr, outputFilesLocker));
verify(spyOutErr, Mockito.times(2)).childOutErr();
verify(spyChildOutErr).clearOut();
verify(spyChildOutErr).clearErr();
@@ -737,6 +756,38 @@ public void testDownloadWithStdoutStderrOnFailure() throws Exception {
} catch (IOException err) {
throw new AssertionError("outErr should still be writable after download failed.", err);
}
+
+ verify(outputFilesLocker, never()).lock();
+ }
+
+
+ @Test
+ public void testDownloadClashes() throws Exception {
+ // Test that injecting the metadata for a remote output file works
+
+ // arrange
+ DefaultRemoteActionCache remoteCache = newTestCache();
+ Digest d1 = remoteCache.addContents("content1");
+ Digest d2 = remoteCache.addContents("content2");
+ ActionResult r =
+ ActionResult.newBuilder()
+ .setExitCode(0)
+ .addOutputFiles(OutputFile.newBuilder().setPath("outputs/foo.tmp").setDigest(d1))
+ .addOutputFiles(OutputFile.newBuilder().setPath("outputs/foo").setDigest(d2))
+ .build();
+
+ Artifact a1 = ActionsTestUtil.createArtifact(artifactRoot, "foo.tmp");
+ Artifact a2 = ActionsTestUtil.createArtifact(artifactRoot, "foo");
+
+ // act
+
+ remoteCache.download(r, execRoot, new FileOutErr(), outputFilesLocker);
+
+ // assert
+
+ assertThat(FileSystemUtils.readContent(a1.getPath(), Charsets.UTF_8)).isEqualTo("content1");
+ assertThat(FileSystemUtils.readContent(a2.getPath(), Charsets.UTF_8)).isEqualTo("content2");
+ verify(outputFilesLocker).lock();
}
@Test
@@ -767,7 +818,8 @@ public void testDownloadMinimalFiles() throws Exception {
/* inMemoryOutputPath= */ null,
new FileOutErr(),
execRoot,
- injector);
+ injector,
+ outputFilesLocker);
// assert
assertThat(inMemoryOutput).isNull();
@@ -778,6 +830,8 @@ public void testDownloadMinimalFiles() throws Exception {
Path outputBase = artifactRoot.getRoot().asPath();
assertThat(outputBase.readdir(Symlinks.NOFOLLOW)).isEmpty();
+
+ verify(outputFilesLocker).lock();
}
@Test
@@ -826,7 +880,8 @@ public void testDownloadMinimalDirectory() throws Exception {
/* inMemoryOutputPath= */ null,
new FileOutErr(),
execRoot,
- injector);
+ injector,
+ outputFilesLocker);
// assert
assertThat(inMemoryOutput).isNull();
@@ -844,6 +899,8 @@ public void testDownloadMinimalDirectory() throws Exception {
Path outputBase = artifactRoot.getRoot().asPath();
assertThat(outputBase.readdir(Symlinks.NOFOLLOW)).isEmpty();
+
+ verify(outputFilesLocker).lock();
}
@Test
@@ -896,8 +953,11 @@ public void testDownloadMinimalDirectoryFails() throws Exception {
/* inMemoryOutputPath= */ null,
new FileOutErr(),
execRoot,
- injector));
+ injector,
+ outputFilesLocker));
assertThat(e).isEqualTo(downloadTreeException);
+
+ verify(outputFilesLocker, never()).lock();
}
@Test
@@ -920,7 +980,8 @@ public void testDownloadMinimalWithStdoutStderr() throws Exception {
// act
InMemoryOutput inMemoryOutput =
remoteCache.downloadMinimal(
- r, ImmutableList.of(), /* inMemoryOutputPath= */ null, outErr, execRoot, injector);
+ r, ImmutableList.of(), /* inMemoryOutputPath= */ null, outErr, execRoot, injector,
+ outputFilesLocker);
// assert
assertThat(inMemoryOutput).isNull();
@@ -929,6 +990,8 @@ public void testDownloadMinimalWithStdoutStderr() throws Exception {
Path outputBase = artifactRoot.getRoot().asPath();
assertThat(outputBase.readdir(Symlinks.NOFOLLOW)).isEmpty();
+
+ verify(outputFilesLocker).lock();
}
@Test
@@ -959,7 +1022,8 @@ public void testDownloadMinimalWithInMemoryOutput() throws Exception {
inMemoryOutputPathFragment,
new FileOutErr(),
execRoot,
- injector);
+ injector,
+ outputFilesLocker);
// assert
assertThat(inMemoryOutput).isNotNull();
@@ -974,6 +1038,8 @@ public void testDownloadMinimalWithInMemoryOutput() throws Exception {
Path outputBase = artifactRoot.getRoot().asPath();
assertThat(outputBase.readdir(Symlinks.NOFOLLOW)).isEmpty();
+
+ verify(outputFilesLocker).lock();
}
private DefaultRemoteActionCache newTestCache() {
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java
index 68a2d457e83846..014145a4069882 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java
@@ -346,7 +346,7 @@ public void testDownloadAllResults() throws Exception {
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputFilesBuilder().setPath("b/empty").setDigest(emptyDigest);
result.addOutputFilesBuilder().setPath("a/bar").setDigest(barDigest).setIsExecutable(true);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("b/empty"))).isEqualTo(emptyDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar"))).isEqualTo(barDigest);
@@ -379,7 +379,7 @@ public void testDownloadDirectory() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar/qux"))).isEqualTo(quxDigest);
@@ -397,7 +397,7 @@ public void testDownloadDirectoryEmpty() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(execRoot.getRelative("a/bar").isDirectory()).isTrue();
}
@@ -436,7 +436,7 @@ public void testDownloadDirectoryNested() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar/wobble/qux"))).isEqualTo(quxDigest);
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
index b89d6f06b325dc..8240ce1dbc4386 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
@@ -72,6 +72,7 @@
import com.google.devtools.build.lib.remote.RemoteRetrier.ExponentialBackoff;
import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.remote.util.DigestUtil;
+import com.google.devtools.build.lib.remote.util.FakeSpawnExecutionContext;
import com.google.devtools.build.lib.remote.util.TestUtils;
import com.google.devtools.build.lib.remote.util.TracingMetadataUtils;
import com.google.devtools.build.lib.util.io.FileOutErr;
@@ -127,14 +128,6 @@ public class GrpcRemoteExecutionClientTest {
private static final DigestUtil DIGEST_UTIL = new DigestUtil(DigestHashFunction.SHA256);
- private static final ArtifactExpander SIMPLE_ARTIFACT_EXPANDER =
- new ArtifactExpander() {
- @Override
- public void expand(Artifact artifact, Collection<? super Artifact> output) {
- output.add(artifact);
- }
- };
-
private final MutableHandlerRegistry serviceRegistry = new MutableHandlerRegistry();
private FileSystem fs;
private Path execRoot;
@@ -159,70 +152,6 @@ public void expand(Artifact artifact, Collection<? super Artifact> output) {
.build())
.build();
- private final SpawnExecutionContext simplePolicy =
- new SpawnExecutionContext() {
- @Override
- public int getId() {
- return 0;
- }
-
- @Override
- public void prefetchInputs() {
- }
-
- @Override
- public void lockOutputFiles() throws InterruptedException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean speculating() {
- return false;
- }
-
- @Override
- public MetadataProvider getMetadataProvider() {
- return fakeFileCache;
- }
-
- @Override
- public ArtifactExpander getArtifactExpander() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Duration getTimeout() {
- return Duration.ZERO;
- }
-
- @Override
- public FileOutErr getFileOutErr() {
- return outErr;
- }
-
- @Override
- public SortedMap<PathFragment, ActionInput> getInputMapping(
- boolean expandTreeArtifactsInRunfiles) throws IOException {
- return new SpawnInputExpander(execRoot, /*strict*/ false)
- .getInputMapping(
- simpleSpawn,
- SIMPLE_ARTIFACT_EXPANDER,
- ArtifactPathResolver.IDENTITY,
- fakeFileCache,
- true);
- }
-
- @Override
- public void report(ProgressStatus state, String name) {
- // TODO(ulfjack): Test that the right calls are made.
- }
-
- @Override
- public MetadataInjector getMetadataInjector() {
- throw new UnsupportedOperationException();
- }
- };
-
@BeforeClass
public static void beforeEverything() {
retryService = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(1));
@@ -354,7 +283,10 @@ public void getActionResult(
}
});
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.isCacheHit()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
@@ -397,7 +329,9 @@ public void findMissingBlobs(
}
});
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.exitCode()).isEqualTo(1);
}
@@ -436,7 +370,10 @@ public void findMissingBlobs(
}
});
- client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
+ client.exec(simpleSpawn, policy);
}
@Test
@@ -460,12 +397,15 @@ public void getActionResult(
serviceRegistry.addService(
new FakeImmutableCacheByteStreamImpl(stdOutDigest, "stdout", stdErrDigest, "stderr"));
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isTrue();
assertThat(outErr.outAsLatin1()).isEqualTo("stdout");
assertThat(outErr.errAsLatin1()).isEqualTo("stderr");
+
}
@Test
@@ -485,7 +425,9 @@ public void getActionResult(
}
});
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isTrue();
@@ -622,7 +564,9 @@ public void findMissingBlobs(
serviceRegistry.addService(
ServerInterceptors.intercept(mockByteStreamImpl, new RequestHeadersValidator()));
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isFalse();
@@ -777,7 +721,9 @@ public void findMissingBlobs(
ArgumentMatchers.<StreamObserver<ReadResponse>>any());
serviceRegistry.addService(mockByteStreamImpl);
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isFalse();
@@ -885,7 +831,9 @@ public void findMissingBlobs(
ArgumentMatchers.<StreamObserver<ReadResponse>>any());
serviceRegistry.addService(mockByteStreamImpl);
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isFalse();
@@ -918,8 +866,11 @@ public void getActionResult(
}
});
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
SpawnExecException expected =
- assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, simplePolicy));
+ assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, policy));
assertThat(expected.getSpawnResult().status())
.isEqualTo(SpawnResult.Status.EXECUTION_FAILED_CATASTROPHICALLY);
// Ensure we also got back the stack trace.
@@ -939,8 +890,10 @@ public void getActionResult(
}
});
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
ExecException expected =
- assertThrows(ExecException.class, () -> client.exec(simpleSpawn, simplePolicy));
+ assertThrows(ExecException.class, () -> client.exec(simpleSpawn, policy));
assertThat(expected).hasMessageThat().contains("whoa"); // Error details.
// Ensure we also got back the stack trace.
assertThat(expected)
@@ -997,8 +950,11 @@ public void read(ReadRequest request, StreamObserver<ReadResponse> responseObser
}
});
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
SpawnExecException expected =
- assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, simplePolicy));
+ assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, policy));
assertThat(expected.getSpawnResult().status())
.isEqualTo(SpawnResult.Status.REMOTE_CACHE_FAILED);
assertThat(expected).hasMessageThat().contains(DIGEST_UTIL.toString(stdOutDigest));
@@ -1058,8 +1014,10 @@ public void read(ReadRequest request, StreamObserver<ReadResponse> responseObser
}
});
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
SpawnExecException expected =
- assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, simplePolicy));
+ assertThrows(SpawnExecException.class, () -> client.exec(simpleSpawn, policy));
assertThat(expected.getSpawnResult().status())
.isEqualTo(SpawnResult.Status.REMOTE_CACHE_FAILED);
assertThat(expected).hasMessageThat().contains(DIGEST_UTIL.toString(stdOutDigest));
@@ -1150,7 +1108,10 @@ public void findMissingBlobs(
}
});
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isFalse();
@@ -1246,7 +1207,10 @@ public void findMissingBlobs(
}
});
- SpawnResult result = client.exec(simpleSpawn, simplePolicy);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(simpleSpawn, fakeFileCache,
+ execRoot, outErr);
+
+ SpawnResult result = client.exec(simpleSpawn, policy);
assertThat(result.setupSuccess()).isTrue();
assertThat(result.exitCode()).isEqualTo(0);
assertThat(result.isCacheHit()).isFalse();
diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
index c1e712af73c3b7..ac8feed607d937 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
@@ -57,6 +57,7 @@
import com.google.devtools.build.lib.exec.SpawnRunner.ProgressStatus;
import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext;
import com.google.devtools.build.lib.exec.util.FakeOwner;
+import com.google.devtools.build.lib.remote.AbstractRemoteActionCache.OutputFilesLocker;
import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.remote.options.RemoteOutputsMode;
import com.google.devtools.build.lib.remote.util.DigestUtil;
@@ -272,13 +273,13 @@ public Void answer(InvocationOnMock invocation) {
}
})
.when(remoteCache)
- .download(actionResult, execRoot, outErr);
+ .download(eq(actionResult), eq(execRoot), eq(outErr), any());
CacheHandle entry = cache.lookup(simpleSpawn, simplePolicy);
assertThat(entry.hasResult()).isTrue();
SpawnResult result = entry.getResult();
// All other methods on RemoteActionCache have side effects, so we verify all of them.
- verify(remoteCache).download(actionResult, execRoot, outErr);
+ verify(remoteCache).download(eq(actionResult), eq(execRoot), eq(outErr), any());
verify(remoteCache, never())
.upload(
any(ActionKey.class),
@@ -507,7 +508,7 @@ public ActionResult answer(InvocationOnMock invocation) {
});
doThrow(new CacheNotFoundException(digest, digestUtil))
.when(remoteCache)
- .download(actionResult, execRoot, outErr);
+ .download(eq(actionResult), eq(execRoot), eq(outErr), any());
CacheHandle entry = cache.lookup(simpleSpawn, simplePolicy);
assertThat(entry.hasResult()).isFalse();
@@ -586,7 +587,7 @@ public void testDownloadMinimal() throws Exception {
// assert
assertThat(cacheHandle.hasResult()).isTrue();
assertThat(cacheHandle.getResult().exitCode()).isEqualTo(0);
- verify(remoteCache).downloadMinimal(any(), anyCollection(), any(), any(), any(), any());
+ verify(remoteCache).downloadMinimal(any(), anyCollection(), any(), any(), any(), any(), any());
}
@Test
@@ -609,7 +610,7 @@ public void testDownloadMinimalIoError() throws Exception {
ActionResult success = ActionResult.newBuilder().setExitCode(0).build();
when(remoteCache.getCachedActionResult(any())).thenReturn(success);
- when(remoteCache.downloadMinimal(any(), anyCollection(), any(), any(), any(), any()))
+ when(remoteCache.downloadMinimal(any(), anyCollection(), any(), any(), any(), any(), any()))
.thenThrow(downloadFailure);
// act
@@ -617,7 +618,7 @@ public void testDownloadMinimalIoError() throws Exception {
// assert
assertThat(cacheHandle.hasResult()).isFalse();
- verify(remoteCache).downloadMinimal(any(), anyCollection(), any(), any(), any(), any());
+ verify(remoteCache).downloadMinimal(any(), anyCollection(), any(), any(), any(), any(), any());
assertThat(eventHandler.getEvents().size()).isEqualTo(1);
Event evt = eventHandler.getEvents().get(0);
assertThat(evt.getKind()).isEqualTo(EventKind.WARNING);
diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
index d1fb3de3ce1505..419470616ea851 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
@@ -77,6 +77,7 @@
import com.google.devtools.build.lib.remote.options.RemoteOutputsMode;
import com.google.devtools.build.lib.remote.util.DigestUtil;
import com.google.devtools.build.lib.remote.util.DigestUtil.ActionKey;
+import com.google.devtools.build.lib.remote.util.FakeSpawnExecutionContext;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.util.io.FileOutErr;
import com.google.devtools.build.lib.vfs.DigestHashFunction;
@@ -196,7 +197,8 @@ public void nonCachableSpawnsShouldNotBeCached_remote() throws Exception {
/*outputs=*/ ImmutableList.<ActionInput>of(),
ResourceSet.ZERO);
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
runner.exec(spawn, policy);
@@ -236,7 +238,8 @@ public void nonCachableSpawnsShouldNotBeCached_local() throws Exception {
/*outputs=*/ ImmutableList.<ActionInput>of(),
ResourceSet.ZERO);
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
runner.exec(spawn, policy);
@@ -255,7 +258,8 @@ public void failedLocalActionShouldNotBeUploaded() throws Exception {
RemoteSpawnRunner runner = spy(newSpawnRunnerWithoutExecutor());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = Mockito.mock(SpawnResult.class);
when(res.exitCode()).thenReturn(1);
@@ -289,7 +293,8 @@ public void treatFailedCachedActionAsCacheMiss_local() throws Exception {
RemoteSpawnRunner runner = spy(newSpawnRunnerWithoutExecutor());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult succeeded =
new SpawnResult.Builder()
@@ -313,7 +318,7 @@ public void treatFailedCachedActionAsCacheMiss_local() throws Exception {
any(),
/* uploadLocalResults= */ eq(true));
verify(cache).upload(any(), any(), any(), any(), any(), any());
- verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr));
+ verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr), any());
}
@Test
@@ -332,7 +337,8 @@ public void treatFailedCachedActionAsCacheMiss_remote() throws Exception {
.build();
when(executor.executeRemotely(any(ExecuteRequest.class))).thenReturn(succeeded);
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
runner.exec(spawn, policy);
@@ -355,7 +361,8 @@ public void printWarningIfCacheIsDown() throws Exception {
RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor(reporter);
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
when(cache.getCachedActionResult(any(ActionKey.class)))
.thenThrow(new IOException("cache down"));
@@ -394,7 +401,8 @@ public void noRemoteExecutorFallbackFails() throws Exception {
RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor();
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
when(cache.getCachedActionResult(any(ActionKey.class))).thenReturn(null);
@@ -417,7 +425,8 @@ public void remoteCacheErrorFallbackFails() throws Exception {
RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor();
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
when(cache.getCachedActionResult(any(ActionKey.class))).thenThrow(new IOException());
@@ -440,7 +449,8 @@ public void testLocalFallbackFailureRemoteExecutorFailure() throws Exception {
when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(new IOException());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
IOException err = new IOException("local execution error");
when(localRunner.exec(eq(spawn), eq(policy))).thenThrow(err);
@@ -469,7 +479,8 @@ public void testHumanReadableServerLogsSavedForFailingAction() throws Exception
when(cache.downloadFile(eq(logPath), eq(logDigest))).thenReturn(completed);
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.NON_ZERO_EXIT);
@@ -498,7 +509,8 @@ public void testHumanReadableServerLogsSavedForFailingActionWithStatus() throws
when(cache.downloadFile(eq(logPath), eq(logDigest))).thenReturn(completed);
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.TIMEOUT);
@@ -521,13 +533,13 @@ public void testNonHumanReadableServerLogsNotSaved() throws Exception {
.build());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
-
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.NON_ZERO_EXIT);
verify(executor).executeRemotely(any(ExecuteRequest.class));
- verify(cache).download(eq(result), eq(execRoot), any(FileOutErr.class));
+ verify(cache).download(eq(result), eq(execRoot), any(FileOutErr.class), any());
verify(cache, never()).downloadFile(any(Path.class), any(Digest.class));
}
@@ -547,13 +559,14 @@ public void testServerLogsNotSavedForSuccessfulAction() throws Exception {
.build());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.SUCCESS);
verify(executor).executeRemotely(any(ExecuteRequest.class));
- verify(cache).download(eq(result), eq(execRoot), any(FileOutErr.class));
+ verify(cache).download(eq(result), eq(execRoot), any(FileOutErr.class), any());
verify(cache, never()).downloadFile(any(Path.class), any(Digest.class));
}
@@ -568,15 +581,16 @@ public void cacheDownloadFailureTriggersRemoteExecution() throws Exception {
Exception downloadFailure = new CacheNotFoundException(Digest.getDefaultInstance(), digestUtil);
doThrow(downloadFailure)
.when(cache)
- .download(eq(cachedResult), any(Path.class), any(FileOutErr.class));
+ .download(eq(cachedResult), any(Path.class), any(FileOutErr.class), any());
ActionResult execResult = ActionResult.newBuilder().setExitCode(31).build();
ExecuteResponse succeeded = ExecuteResponse.newBuilder().setResult(execResult).build();
when(executor.executeRemotely(any(ExecuteRequest.class))).thenReturn(succeeded);
- doNothing().when(cache).download(eq(execResult), any(Path.class), any(FileOutErr.class));
+ doNothing().when(cache).download(eq(execResult), any(Path.class), any(FileOutErr.class), any());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.NON_ZERO_EXIT);
@@ -604,12 +618,13 @@ public void resultsDownloadFailureTriggersRemoteExecutionWithSkipCacheLookup() t
Exception downloadFailure = new CacheNotFoundException(Digest.getDefaultInstance(), digestUtil);
doThrow(downloadFailure)
.when(cache)
- .download(eq(cachedResult), any(Path.class), any(FileOutErr.class));
- doNothing().when(cache).download(eq(execResult), any(Path.class), any(FileOutErr.class));
+ .download(eq(cachedResult), any(Path.class), any(FileOutErr.class), any());
+ doNothing().when(cache).download(eq(execResult), any(Path.class), any(FileOutErr.class), any());
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.NON_ZERO_EXIT);
@@ -647,13 +662,14 @@ public void testRemoteExecutionTimeout() throws Exception {
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.TIMEOUT);
verify(executor).executeRemotely(any(ExecuteRequest.class));
- verify(cache).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class));
+ verify(cache).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class), any());
}
@Test
@@ -680,13 +696,14 @@ public void testRemoteExecutionTimeoutDoesNotTriggerFallback() throws Exception
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.TIMEOUT);
verify(executor).executeRemotely(any(ExecuteRequest.class));
- verify(cache).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class));
+ verify(cache).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class), any());
verify(localRunner, never()).exec(eq(spawn), eq(policy));
}
@@ -706,14 +723,15 @@ public void testRemoteExecutionCommandFailureDoesNotTriggerFallback() throws Exc
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.NON_ZERO_EXIT);
assertThat(res.exitCode()).isEqualTo(33);
verify(executor).executeRemotely(any(ExecuteRequest.class));
- verify(cache, never()).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class));
+ verify(cache, never()).download(eq(cachedResult), eq(execRoot), any(FileOutErr.class), any());
verify(localRunner, never()).exec(eq(spawn), eq(policy));
}
@@ -730,7 +748,8 @@ public void testExitCode_executorfailure() throws Exception {
when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(new IOException("reasons"));
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnExecException e = assertThrows(SpawnExecException.class, () -> runner.exec(spawn, policy));
assertThat(e.getSpawnResult().exitCode()).isEqualTo(ExitCode.REMOTE_ERROR.getNumericExitCode());
@@ -749,7 +768,8 @@ public void testExitCode_executionfailure() throws Exception {
when(cache.getCachedActionResult(any(ActionKey.class))).thenThrow(new IOException("reasons"));
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnExecException e = assertThrows(SpawnExecException.class, () -> runner.exec(spawn, policy));
assertThat(e.getSpawnResult().exitCode()).isEqualTo(ExitCode.REMOTE_ERROR.getNumericExitCode());
@@ -797,7 +817,8 @@ public void testMaterializeParamFiles() throws Exception {
ImmutableList.of(input),
/*outputs=*/ ImmutableList.<ActionInput>of(),
ResourceSet.ZERO);
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
SpawnResult res = runner.exec(spawn, policy);
assertThat(res.status()).isEqualTo(Status.SUCCESS);
Path paramFile = execRoot.getRelative("out/param_file");
@@ -842,7 +863,8 @@ public void testDownloadMinimalOnCacheHit() throws Exception {
RemoteSpawnRunner runner = newSpawnRunner();
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
// act
SpawnResult result = runner.exec(spawn, policy);
@@ -850,8 +872,9 @@ public void testDownloadMinimalOnCacheHit() throws Exception {
assertThat(result.status()).isEqualTo(Status.SUCCESS);
// assert
- verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any());
- verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr));
+ verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any(),
+ any());
+ verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr), any());
}
@Test
@@ -866,7 +889,8 @@ public void testDownloadMinimalOnCacheMiss() throws Exception {
RemoteSpawnRunner runner = newSpawnRunner();
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
// act
SpawnResult result = runner.exec(spawn, policy);
@@ -875,8 +899,9 @@ public void testDownloadMinimalOnCacheMiss() throws Exception {
// assert
verify(executor).executeRemotely(any());
- verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any());
- verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr));
+ verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any(),
+ any());
+ verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr), any());
}
@Test
@@ -887,21 +912,23 @@ public void testDownloadMinimalIoError() throws Exception {
ActionResult succeededAction = ActionResult.newBuilder().setExitCode(0).build();
when(cache.getCachedActionResult(any(ActionKey.class))).thenReturn(succeededAction);
IOException downloadFailure = new IOException("downloadMinimal failed");
- when(cache.downloadMinimal(any(), anyCollection(), any(), any(), any(), any()))
+ when(cache.downloadMinimal(any(), anyCollection(), any(), any(), any(), any(), any()))
.thenThrow(downloadFailure);
RemoteSpawnRunner runner = newSpawnRunner();
Spawn spawn = newSimpleSpawn();
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
// act
SpawnExecException e = assertThrows(SpawnExecException.class, () -> runner.exec(spawn, policy));
assertThat(e.getMessage()).isEqualTo(downloadFailure.getMessage());
// assert
- verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any());
- verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr));
+ verify(cache).downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any(),
+ any());
+ verify(cache, never()).download(any(ActionResult.class), any(Path.class), eq(outErr), any());
}
@Test
@@ -920,7 +947,8 @@ public void testDownloadTopLevel() throws Exception {
RemoteSpawnRunner runner = newSpawnRunner(ImmutableSet.of(topLevelOutput));
Spawn spawn = newSimpleSpawn(topLevelOutput);
- SpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn);
+ FakeSpawnExecutionContext policy = new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot,
+ outErr);
// act
SpawnResult result = runner.exec(spawn, policy);
@@ -928,9 +956,9 @@ public void testDownloadTopLevel() throws Exception {
assertThat(result.status()).isEqualTo(Status.SUCCESS);
// assert
- verify(cache).download(eq(succeededAction), any(Path.class), eq(outErr));
+ verify(cache).download(eq(succeededAction), any(Path.class), eq(outErr), any());
verify(cache, never())
- .downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any());
+ .downloadMinimal(eq(succeededAction), anyCollection(), any(), any(), any(), any(), any());
}
private static Spawn newSimpleSpawn(Artifact... outputs) {
@@ -994,100 +1022,4 @@ private RemoteSpawnRunner newSpawnRunnerWithoutExecutor(Reporter reporter) {
reporter,
/* topLevelOutputs= */ ImmutableSet.of());
}
-
- // TODO(buchgr): Extract a common class to be used for testing.
- class FakeSpawnExecutionContext implements SpawnExecutionContext {
-
- private final ArtifactExpander artifactExpander = (artifact, output) -> output.add(artifact);
-
- private final Spawn spawn;
-
- FakeSpawnExecutionContext(Spawn spawn) {
- this.spawn = spawn;
- }
-
- @Override
- public int getId() {
- return 0;
- }
-
- @Override
- public void prefetchInputs() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void lockOutputFiles() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean speculating() {
- return false;
- }
-
- @Override
- public MetadataProvider getMetadataProvider() {
- return fakeFileCache;
- }
-
- @Override
- public ArtifactExpander getArtifactExpander() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Duration getTimeout() {
- return Duration.ZERO;
- }
-
- @Override
- public FileOutErr getFileOutErr() {
- return outErr;
- }
-
- @Override
- public SortedMap<PathFragment, ActionInput> getInputMapping(
- boolean expandTreeArtifactsInRunfiles) throws IOException {
- return new SpawnInputExpander(execRoot, /*strict*/ false)
- .getInputMapping(
- spawn, artifactExpander, ArtifactPathResolver.IDENTITY, fakeFileCache, true);
- }
-
- @Override
- public void report(ProgressStatus state, String name) {
- assertThat(state).isEqualTo(ProgressStatus.EXECUTING);
- }
-
- @Override
- public MetadataInjector getMetadataInjector() {
- return new MetadataInjector() {
- @Override
- public void injectRemoteFile(Artifact output, byte[] digest, long size, int locationIndex) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void injectRemoteDirectory(
- Artifact.SpecialArtifact output, Map<PathFragment, RemoteFileArtifactValue> children) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void markOmitted(ActionInput output) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void addExpandedTreeOutput(TreeFileArtifact output) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void injectDigest(ActionInput output, FileStatus statNoFollow, byte[] digest) {
- throw new UnsupportedOperationException();
- }
- };
- }
- }
}
diff --git a/src/test/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCacheTest.java
index 5b7b0deeb7228e..23ef7b9b9d3ad1 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCacheTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCacheTest.java
@@ -145,7 +145,7 @@ public void testDownloadAllResults() throws Exception {
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputFilesBuilder().setPath("b/empty").setDigest(emptyDigest);
result.addOutputFilesBuilder().setPath("a/bar").setDigest(barDigest).setIsExecutable(true);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("b/empty"))).isEqualTo(emptyDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar"))).isEqualTo(barDigest);
@@ -177,7 +177,7 @@ public void testDownloadDirectory() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar/qux"))).isEqualTo(quxDigest);
@@ -195,7 +195,7 @@ public void testDownloadDirectoryEmpty() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(execRoot.getRelative("a/bar").isDirectory()).isTrue();
}
@@ -233,7 +233,7 @@ public void testDownloadDirectoryNested() throws Exception {
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputFilesBuilder().setPath("a/foo").setDigest(fooDigest);
result.addOutputDirectoriesBuilder().setPath("a/bar").setTreeDigest(barTreeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo"))).isEqualTo(fooDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar/wobble/qux"))).isEqualTo(quxDigest);
@@ -277,7 +277,7 @@ public void testDownloadDirectoriesWithSameHash() throws Exception {
SimpleBlobStoreActionCache client = newClient(map);
ActionResult.Builder result = ActionResult.newBuilder();
result.addOutputDirectoriesBuilder().setPath("a/").setTreeDigest(treeDigest);
- client.download(result.build(), execRoot, null);
+ client.download(result.build(), execRoot, null, /* outputFilesLocker= */ () -> {});
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/bar/foo/file"))).isEqualTo(fileDigest);
assertThat(DIGEST_UTIL.compute(execRoot.getRelative("a/foo/file"))).isEqualTo(fileDigest);
diff --git a/src/test/java/com/google/devtools/build/lib/remote/util/BUILD b/src/test/java/com/google/devtools/build/lib/remote/util/BUILD
index f4764ec3b1f307..c3781362c9c9ef 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/util/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/remote/util/BUILD
@@ -14,6 +14,8 @@ java_library(
name = "util",
srcs = glob(["*.java"]),
deps = [
+ "//src/main/java/com/google/devtools/build/lib:build-base",
+ "//src/main/java/com/google/devtools/build/lib:io",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/remote",
"//src/main/java/com/google/devtools/build/lib/vfs",
diff --git a/src/test/java/com/google/devtools/build/lib/remote/util/FakeSpawnExecutionContext.java b/src/test/java/com/google/devtools/build/lib/remote/util/FakeSpawnExecutionContext.java
new file mode 100644
index 00000000000000..17ede6b813d15a
--- /dev/null
+++ b/src/test/java/com/google/devtools/build/lib/remote/util/FakeSpawnExecutionContext.java
@@ -0,0 +1,143 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.lib.remote.util;
+
+import com.google.devtools.build.lib.actions.ActionInput;
+import com.google.devtools.build.lib.actions.Artifact;
+import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander;
+import com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact;
+import com.google.devtools.build.lib.actions.ArtifactPathResolver;
+import com.google.devtools.build.lib.actions.FileArtifactValue.RemoteFileArtifactValue;
+import com.google.devtools.build.lib.actions.MetadataProvider;
+import com.google.devtools.build.lib.actions.Spawn;
+import com.google.devtools.build.lib.actions.cache.MetadataInjector;
+import com.google.devtools.build.lib.exec.SpawnInputExpander;
+import com.google.devtools.build.lib.exec.SpawnRunner.ProgressStatus;
+import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext;
+import com.google.devtools.build.lib.util.io.FileOutErr;
+import com.google.devtools.build.lib.vfs.FileStatus;
+import com.google.devtools.build.lib.vfs.Path;
+import com.google.devtools.build.lib.vfs.PathFragment;
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Map;
+import java.util.SortedMap;
+
+public class FakeSpawnExecutionContext implements SpawnExecutionContext {
+
+ private boolean lockOutputFilesCalled;
+
+ private final ArtifactExpander artifactExpander = (artifact, output) -> output.add(artifact);
+
+ private final Spawn spawn;
+ private final MetadataProvider metadataProvider;
+ private final Path execRoot;
+ private final FileOutErr outErr;
+
+ public FakeSpawnExecutionContext(Spawn spawn, MetadataProvider metadataProvider,
+ Path execRoot, FileOutErr outErr) {
+ this.spawn = spawn;
+ this.metadataProvider = metadataProvider;
+ this.execRoot = execRoot;
+ this.outErr = outErr;
+ }
+
+ public boolean isLockOutputFilesCalled() {
+ return lockOutputFilesCalled;
+ }
+
+ @Override
+ public int getId() {
+ return 0;
+ }
+
+ @Override
+ public void prefetchInputs() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void lockOutputFiles() {
+ lockOutputFilesCalled = true;
+ }
+
+ @Override
+ public boolean speculating() {
+ return false;
+ }
+
+ @Override
+ public MetadataProvider getMetadataProvider() {
+ return metadataProvider;
+ }
+
+ @Override
+ public ArtifactExpander getArtifactExpander() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Duration getTimeout() {
+ return Duration.ZERO;
+ }
+
+ @Override
+ public FileOutErr getFileOutErr() {
+ return outErr;
+ }
+
+ @Override
+ public SortedMap<PathFragment, ActionInput> getInputMapping(
+ boolean expandTreeArtifactsInRunfiles) throws IOException {
+ return new SpawnInputExpander(execRoot, /*strict*/ false)
+ .getInputMapping(
+ spawn, artifactExpander, ArtifactPathResolver.IDENTITY, metadataProvider, true);
+ }
+
+ @Override
+ public void report(ProgressStatus state, String name) {
+ // Intentionally left empty.
+ }
+
+ @Override
+ public MetadataInjector getMetadataInjector() {
+ return new MetadataInjector() {
+ @Override
+ public void injectRemoteFile(Artifact output, byte[] digest, long size, int locationIndex) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void injectRemoteDirectory(
+ Artifact.SpecialArtifact output, Map<PathFragment, RemoteFileArtifactValue> children) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void markOmitted(ActionInput output) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addExpandedTreeOutput(TreeFileArtifact output) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void injectDigest(ActionInput output, FileStatus statNoFollow, byte[] digest) {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+}
\ No newline at end of file
| train | train | 2019-06-18T14:24:12 | "2019-06-17T11:27:23Z" | buchgr | test |
bazelbuild/bazel/8671_8692 | bazelbuild/bazel | bazelbuild/bazel/8671 | bazelbuild/bazel/8692 | [
"timestamp(timedelta=1.0, similarity=0.8610517730434353)"
] | c01a43a22e7fa25c08b42d0018a47feb379f2815 | e52d7345536769feb154660919ccd077902b6815 | [
"This is something we'll want to add, but we'll have to find time to finish this up",
"Amazing. Thank you!\r\n"
] | [] | "2019-06-21T00:02:54Z" | [
"type: feature request",
"P2",
"team-Android"
] | aar_import does not offer a srcjar option | ### Description of the problem / feature request:
aar_import doesn't provide a facility to link a source-jar, which limits IDEs abilities to materialize the sources of imported .aar libraries.
### Feature requests: what underlying problem are you trying to solve with this feature?
Improved IDE integration.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Try to do a `aar_import` and there is no API to do this.
### What operating system are you running Bazel on?
Mac OS X
### What's the output of `bazel info release`?
0.26.1
### Have you found anything relevant by searching the web?
Looked around issues and fora, chatting about it on slack, but nothing seems to have been conclusively decided.
### Any other information, logs, or outputs that you want to share?
Investigating AarImport.java, it seems that it creates a JavaCommon which could include source artifacts, but does not, explicitly passing in an empty immutable list. This seems entirely feasible, but the API isn't exposed and the bits aren't hooked up. | [
"src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java",
"src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java",
"src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
index 624286b9727dc3..6fb4bd43aabd76 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java
@@ -33,18 +33,8 @@
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.rules.android.AndroidConfiguration.AndroidAaptVersion;
import com.google.devtools.build.lib.rules.android.databinding.DataBinding;
-import com.google.devtools.build.lib.rules.java.ImportDepsCheckActionBuilder;
-import com.google.devtools.build.lib.rules.java.JavaCommon;
-import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider;
-import com.google.devtools.build.lib.rules.java.JavaCompilationArtifacts;
-import com.google.devtools.build.lib.rules.java.JavaConfiguration;
+import com.google.devtools.build.lib.rules.java.*;
import com.google.devtools.build.lib.rules.java.JavaConfiguration.ImportDepsCheckingLevel;
-import com.google.devtools.build.lib.rules.java.JavaInfo;
-import com.google.devtools.build.lib.rules.java.JavaRuleOutputJarsProvider;
-import com.google.devtools.build.lib.rules.java.JavaRuntimeInfo;
-import com.google.devtools.build.lib.rules.java.JavaSemantics;
-import com.google.devtools.build.lib.rules.java.JavaSkylarkApiProvider;
-import com.google.devtools.build.lib.rules.java.JavaToolchainProvider;
import com.google.devtools.build.lib.vfs.PathFragment;
import javax.annotation.Nullable;
@@ -192,12 +182,37 @@ public ConfiguredTarget create(RuleContext ruleContext)
/* isNeverLink = */ JavaCommon.isNeverLink(ruleContext),
/* srcLessDepsExport = */ false);
+ // Wire up the source jar for the current target and transitively source jars from dependencies.
+ ImmutableList<Artifact> srcJars = ImmutableList.of();
+ Artifact srcJar = ruleContext.getPrerequisiteArtifact("srcjar", Mode.TARGET);
+ NestedSetBuilder<Artifact> transitiveJavaSourceJarBuilder = NestedSetBuilder.stableOrder();
+ if (srcJar != null) {
+ srcJars = ImmutableList.of(srcJar);
+ transitiveJavaSourceJarBuilder.add(srcJar);
+ }
+ for (JavaSourceJarsProvider other :
+ JavaInfo.getProvidersFromListOfTargets(
+ JavaSourceJarsProvider.class,
+ ruleContext.getPrerequisites("exports", Mode.TARGET))) {
+ transitiveJavaSourceJarBuilder.addTransitive(other.getTransitiveSourceJars());
+ }
+ NestedSet<Artifact> transitiveJavaSourceJars = transitiveJavaSourceJarBuilder.build();
+ JavaSourceJarsProvider javaSourceJarsProvider =
+ JavaSourceJarsProvider.create(transitiveJavaSourceJars, srcJars);
+ JavaSourceInfoProvider javaSourceInfoProvider =
+ new JavaSourceInfoProvider.Builder()
+ .setJarFiles(ImmutableList.of(mergedJar))
+ .setSourceJarsForJarFiles(srcJars)
+ .build();
+
JavaInfo.Builder javaInfoBuilder =
JavaInfo.Builder.create()
.setRuntimeJars(ImmutableList.of(mergedJar))
.setJavaConstraints(ImmutableList.of("android"))
.setNeverlink(JavaCommon.isNeverLink(ruleContext))
.addProvider(JavaCompilationArgsProvider.class, javaCompilationArgsProvider)
+ .addProvider(JavaSourceJarsProvider.class, javaSourceJarsProvider)
+ .addProvider(JavaSourceInfoProvider.class, javaSourceInfoProvider)
.addProvider(JavaRuleOutputJarsProvider.class, jarProviderBuilder.build());
common.addTransitiveInfoProviders(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java
index 90eb552b5d4889..291b293498a79b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarImportBaseRule.java
@@ -27,6 +27,7 @@
import com.google.devtools.build.lib.rules.android.AndroidRuleClasses.AndroidBaseRule;
import com.google.devtools.build.lib.rules.java.JavaConfiguration;
import com.google.devtools.build.lib.rules.java.JavaInfo;
+import com.google.devtools.build.lib.rules.java.JavaSemantics;
import com.google.devtools.build.lib.util.FileType;
/** Rule definition for the aar_import rule. */
@@ -53,6 +54,13 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
.allowedRuleClasses("aar_import", "java_import")
.allowedFileTypes()
.validityPredicate(ANY_EDGE))
+ /* <!-- #BLAZE_RULE(aar_import).ATTRIBUTE(srcjar) -->
+ A JAR file that contains source code for the compiled JAR files in the AAR.
+ <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
+ .add(
+ attr("srcjar", LABEL)
+ .allowedFileTypes(JavaSemantics.SOURCE_JAR, JavaSemantics.JAR)
+ .direct_compile_time_input())
.add(
attr(AAR_EMBEDDED_JARS_EXTACTOR, LABEL)
.cfg(HostTransition.createFactory())
| null | train | train | 2019-07-18T19:50:34 | "2019-06-18T18:40:07Z" | cgruber | test |
bazelbuild/bazel/8676_8793 | bazelbuild/bazel | bazelbuild/bazel/8676 | bazelbuild/bazel/8793 | [
"timestamp(timedelta=61290.0, similarity=0.8450222084353815)"
] | e1e074c9160affea3fe49062f01e0f331622f405 | 8bf2d10c11e62d5804e67aa4290dd20acbc63348 | [
"/cc @meisterT ",
"Can you try with an explicit argument for `-Xmx`, e.g.\r\n`bazel --host_jvm_args=-Xmx4g info`?",
"Great idea! I didn't think about it. Unfortunately I will test it on Monday.",
"Unfortunately\r\n```bash\r\nPS H:\\> bazel --host_jvm_args=-Xmx4g info\r\nFATAL: ExecuteProgram(C:\\Users\\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe\r\ndded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW(\"C:\\Users\\krzyskar\\_\r\nbazel_krzyskar\\install\\388981886003af3376cd5aa448ae98ff\\_embedded_binaries\\embedded_tools\\jdk\\bin\\java.exe\" -XX:+HeapDu\r\nmpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\\\\users\\\\\\krzy(...)): Insufficient system resources exist to complete the reque\r\nsted service.\r\n```\r\n\r\n```bash\r\nkrzyskar@COMPUTERNAME MINGW64 /c/projects\r\n$ bazel --host_jvm_args=-Xmx4g info\r\nFATAL: ExecuteProgram(C:\\Users\\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embedded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW(\"C:\\Users\\krzyskar\\_bazel_krzyskar\\install\\388981886003af3376cd5aa448ae98ff\\_embedded_binaries\\embedded_tools\\jdk\\bin\\java.exe\" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\\\\users\\\\\\krzy(...)): Insufficient system resources exist to complete the requested service.\r\n```\r\n\r\nI tried also setting the initial memory allocation pool without luck\r\n\r\n```bash\r\nPS H:\\> bazel --host_jvm_args=-Xms2G --host_jvm_args=-Xmx16G info\r\nFATAL: ExecuteProgram(C:\\Users\\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe\r\ndded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW(\"C:\\Users\\krzyskar\\_\r\nbazel_krzyskar\\install\\388981886003af3376cd5aa448ae98ff\\_embedded_binaries\\embedded_tools\\jdk\\bin\\java.exe\" -XX:+HeapDu\r\nmpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\\\\users\\\\\\krzy(...)): Insufficient system resources exist to complete the reque\r\nsted service.\r\n```\r\n\r\nMore info:\r\n```bash\r\nPS H:\\> C:\\Users\\krzyskar\\_bazel_krzyskar\\install\\388981886003af3376cd5aa448ae98ff\\_embedded_binaries\\embedded_tools\\jdk\r\n\\bin\\java.exe -version\r\nopenjdk version \"11.0.2\" 2019-01-15 LTS\r\nOpenJDK Runtime Environment Zulu11.29+3-CA (build 11.0.2+7-LTS)\r\nOpenJDK 64-Bit Server VM Zulu11.29+3-CA (build 11.0.2+7-LTS, mixed mode)\r\n```",
"Update\r\n```\r\nPS H:\\> bazel --version\r\nbazel 0.27.1\r\nPS H:\\> bazel info\r\nFATAL: ExecuteProgram(C:\\Users\\krzyskar/_bazel_krzyskar/install/9470fb600225157f1e34c45c6d4dc834/_embedded_binaries/embe\r\ndded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW(\"C:\\Users\\krzyskar\\_\r\nbazel_krzyskar\\install\\9470fb600225157f1e34c45c6d4dc834\\_embedded_binaries\\embedded_tools\\jdk\\bin\\java.exe\" -XX:+HeapDu\r\nmpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\\\\users\\\\\\krzy(...)): Insufficient system resources exist to complete the reque\r\nsted service.\r\n```\r\n0.27.1 is not working as well.\r\n\r\nIs it possible to use \"external\" JDK?",
"You can point Bazel to a different JDK with `--server_javabase` (https://docs.bazel.build/versions/master/command-line-reference.html#flag--server_javabase).\r\nIs that message actually coming from the JVM or from Windows? cc @meteorcloudy in case he has further ideas.",
"Thank you @meisterT . I should check out the doc first.\r\n```\r\nPS H:\\> echo $env:JAVA_HOME\r\nC:\\Users\\krzyskar\\scoop\\apps\\openjdk\\current\r\n\r\nPS H:\\> Invoke-Expression $($env:JAVA_HOME + \"\\bin\\java -version\")\r\nopenjdk version \"12.0.1\" 2019-04-16\r\nOpenJDK Runtime Environment (build 12.0.1+12)\r\nOpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)\r\n\r\nPS H:\\> bazel --server_javabase $env:JAVA_HOME\r\nFATAL: ExecuteProgram(c:\\users\\krzyskar\\scoop\\apps\\openjdk\\current/bin/java.exe) failed: ERROR: src/main/native/windows/\r\nprocess.cc(184): CreateProcessW(\"c:\\users\\krzyskar\\scoop\\apps\\openjdk\\current\\bin\\java.exe\" -XX:+HeapDumpOnOutOfMemoryE\r\nrror -XX:HeapDumpPath=c:\\\\\\users\\\\\\krzyskar\\\\\\_bazel_krzyskar\\\\\\u5mzpase -XX:+UseParallelOldGC --add-opens=(...)): Insuf\r\nficient system resources exist to complete the requested service.\r\n```\r\n\r\n> Is that message actually coming from the JVM or from Windows?\r\nHow to differentiate that?\r\n\r\nInteresting thing.\r\n`bazel` fails on PS, cmd, ConEmu with Git Bash but works on Git Bash\r\n```\r\nkrzyskar@COMPUTERNAME MINGW64 ~\r\n$ bazel\r\nWARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command \"bazel shutdown\".\r\n [bazel release 0.27.1]\r\nUsage: bazel <command> <options> ...\r\n```",
"To my own surprise, I can repro this!\r\n\r\n1. Created a GCP VM with Windows Server 2008, 1 CPU + 32GB RAM\r\n2. Installed Bazel 0.27.1 through Chocolatey\r\n3. Installed Zulu JDK 8, 64bit\r\n4. Installed VC redist DLLs\r\n5. Created a hello world `java_binary`\r\n6. `bazel run //:hello` fails the same way @KrzysztofKarol described\r\n\r\nI'll try to investigate.",
"More info:\r\n- error is not Java specific: `bazel run` fails also for py_binary\r\n- also not Bash specific: `bazel run` runs all binaries through bash.exe by default, but it also fails with `--incompatible_windows_bashless_run_command`, i.e. when not running through Bash\r\n- there are enough resources: using any of the binaries in genrule.tools and building the genrule works\r\n\r\nCreateProcess fails with ERROR_NO_SYSTEM_RESOURCES.\r\n\r\nAnd https://bugzilla.mozilla.org/show_bug.cgi?id=1460995 seems very relevant: \r\n> CreateProcess fails with ERROR_NO_SYSTEM_RESOURCES on Windows 7. It looks like the reason why is because PROC_THREAD_ATTRIBUTE_HANDLE_LIST doesn't like console handles.\r\n>\r\n> We can fix this by only setting that policy (and its associated inheritable handles) when there is one or more standard handles that are *not* console handles.\r\n>\r\n> Note that if all handles are console handles, we don't need to pass STARTF_USESTDHANDLES either, since they'll automatically be set to the current console.",
"And that is indeed the problem!\r\n\r\nHere:\r\nhttps://github.com/bazelbuild/bazel/blob/6d0b14b95a71175362030b4811ca74512b00a890/src/main/native/windows/process.cc#L166-L187 when I don't use the attribute list, remove `EXTENDED_STARTUPINFO_PRESENT`, and use a `STARTUPINFOW` instead of `STARTUPINFOEXW` and let the subprocess inherit none of the handles, `bazel run` works. (And also prints to the console.)",
"Fixed by https://github.com/bazelbuild/bazel/pull/8793"
] | [
"Although looks like this solves the problem, but we also need to make sure this doesn't leak any file handles other than `stdin`, `stdout` and `stderr` into the subprocess. ",
"I verified that it doesn't:\r\n- created a program that uses the exact same code to create a subprocess\r\n- the program also opens a file before creating the process\r\n- i observed the subprocess' handles in Process Explorer.\r\n\r\nWith the current code, the subprocess does NOT inherit the file handle, even though I marked the handle inheritable.\r\n\r\nIf I change the code and pass the file handle as the stdout for the subprocess, then the handle is inherited and shown by process explorer.",
"Nice, thanks for the verifying!!"
] | "2019-07-04T11:41:14Z" | [
"type: bug",
"P2",
"area-Windows",
"team-OSS"
] | Insufficient system resources exist to complete the requsted service. | ### Description of the problem / feature request:
Bazel installed by scoop or downlaoded binary crashes on run.
Prerequisites + curl + versions/python27 installed.
```
PS H:\> bazel --version
bazel 0.27.0
PS H:\> bazel help
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe
dded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_
bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDu
mpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the reque
sted service.
PS H:\> bazel
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe
dded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_
bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDu
mpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the reque
sted service.
PS H:\>
```
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```
bazel
```
### What operating system are you running Bazel on?
```
OS Name: Microsoft Windows 7 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
```
```
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 58 Stepping 9 GenuineIntel ~3401 Mhz
```
```
Total Physical Memory: 32,655 MB
Available Physical Memory: 13,288 MB
Virtual Memory: Max Size: 32,653 MB
Virtual Memory: Available: 12,946 MB
Virtual Memory: In Use: 19,707 MB
```
### What's the output of `bazel info release`?
```
PS H:\> bazel info release
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe
dded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_
bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDu
mpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the reque
sted service.
```
### Have you found anything relevant by searching the web?
https://stackoverflow.com/questions/56564539/how-do-i-give-bazel-more-resources
Temporary solution:
Install **[email protected]**, 0.26.0 is not working as well. | [
"src/main/native/windows/process.cc",
"src/main/native/windows/util.h"
] | [
"src/main/native/windows/process.cc",
"src/main/native/windows/util.h"
] | [] | diff --git a/src/main/native/windows/process.cc b/src/main/native/windows/process.cc
index 05bb0f40385498..f00b76691f8578 100644
--- a/src/main/native/windows/process.cc
+++ b/src/main/native/windows/process.cc
@@ -50,14 +50,18 @@ static bool DupeHandle(HANDLE h, AutoHandle* out, std::wstring* error) {
bool WaitableProcess::Create(const std::wstring& argv0,
const std::wstring& argv_rest, void* env,
const std::wstring& wcwd, std::wstring* error) {
- AutoHandle dup_in, dup_out, dup_err;
- if (!DupeHandle(GetStdHandle(STD_INPUT_HANDLE), &dup_in, error) ||
- !DupeHandle(GetStdHandle(STD_OUTPUT_HANDLE), &dup_out, error) ||
- !DupeHandle(GetStdHandle(STD_ERROR_HANDLE), &dup_err, error)) {
- return false;
- }
- return Create(argv0, argv_rest, env, wcwd, dup_in, dup_out, dup_err, nullptr,
- true, error);
+ // On Windows 7, the subprocess cannot inherit console handles via the
+ // attribute list (CreateProcessW fails with ERROR_NO_SYSTEM_RESOURCES).
+ // If we pass only invalid handles here, the Create method creates an
+ // AutoAttributeList with 0 handles and initializes the STARTUPINFOEXW as
+ // empty and disallowing handle inheritance. At the same time, CreateProcessW
+ // specifies neither CREATE_NEW_CONSOLE nor DETACHED_PROCESS, so the
+ // subprocess *does* inherit the console, which is exactly what we want, and
+ // it works on all supported Windows versions.
+ // Fixes https://github.com/bazelbuild/bazel/issues/8676
+ return Create(argv0, argv_rest, env, wcwd, INVALID_HANDLE_VALUE,
+ INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, nullptr, true,
+ error);
}
bool WaitableProcess::Create(const std::wstring& argv0,
@@ -150,8 +154,8 @@ bool WaitableProcess::Create(const std::wstring& argv0,
static constexpr size_t kMaxCmdline = 32767;
std::wstring cmd_sample = mutable_commandline.get();
- if (cmd_sample.size() > 200) {
- cmd_sample = cmd_sample.substr(0, 195) + L"(...)";
+ if (cmd_sample.size() > 500) {
+ cmd_sample = cmd_sample.substr(0, 495) + L"(...)";
}
if (wcsnlen_s(mutable_commandline.get(), kMaxCmdline) == kMaxCmdline) {
std::wstringstream error_msg;
@@ -181,8 +185,18 @@ bool WaitableProcess::Create(const std::wstring& argv0,
/* lpStartupInfo */ &info.StartupInfo,
/* lpProcessInformation */ &process_info)) {
DWORD err = GetLastError();
+
+ std::wstring errmsg;
+ if (err == ERROR_NO_SYSTEM_RESOURCES && !IsWindows8OrGreater() &&
+ attr_list->HasConsoleHandle()) {
+ errmsg = L"Unrecoverable error: host OS is Windows 7 and subprocess"
+ " got an inheritable console handle";
+ } else {
+ errmsg = GetLastErrorString(err) + L" (error: " + ToString(err) + L")";
+ }
+
*error = MakeErrorMessage(WSTR(__FILE__), __LINE__, L"CreateProcessW",
- cmd_sample, err);
+ cmd_sample, errmsg);
return false;
}
diff --git a/src/main/native/windows/util.h b/src/main/native/windows/util.h
index 16357a1dc8c6dd..67eb84471fe523 100644
--- a/src/main/native/windows/util.h
+++ b/src/main/native/windows/util.h
@@ -81,6 +81,8 @@ class AutoAttributeList {
void InitStartupInfoExW(STARTUPINFOEXW* startup_info) const;
+ bool HasConsoleHandle() const { return handles_.HasConsoleHandle(); }
+
private:
class StdHandles {
public:
@@ -92,6 +94,15 @@ class AutoAttributeList {
HANDLE StdOut() const { return stdout_h_; }
HANDLE StdErr() const { return stderr_h_; }
+ bool HasConsoleHandle() const {
+ for (size_t i = 0; i < valid_handles_; ++i) {
+ if (GetFileType(valid_handle_array_[i]) == FILE_TYPE_CHAR) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private:
size_t valid_handles_;
HANDLE valid_handle_array_[3];
| null | train | train | 2019-07-04T13:21:05 | "2019-06-19T11:40:44Z" | KrzysztofKarol | test |
bazelbuild/bazel/8717_8734 | bazelbuild/bazel | bazelbuild/bazel/8717 | bazelbuild/bazel/8734 | [
"timestamp(timedelta=1.0, similarity=0.8767897775547835)"
] | 458292d63bfcded1ec926592b12e0032dc718d56 | c7e0e2f58c62fcc5dacb53676d2947e47e19c5b7 | [
"Here is an example of output with the failure\"\r\n\r\n```\r\nRunning bazel from D:\\src\\studio\\studio-master-dev\\tools\\base\\bazel\\bazel.cmd\r\nINFO: Invocation ID: 05193316-ecc5-4ade-aadf-8bfb69e76e45\r\nINFO: Analysed target //tools/adt/idea/android:artifacts (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nERROR: D:/src/studio/studio-master-dev/tools/adt/idea/uitest-framework/testSrc/com/android/tools/idea/tests/gui/framework/heapassertions/bleak/agents/BUILD:26:1: Building deploy jar tools/adt/idea/uitest-framework/testSrc/com/android/tools/idea/tests/gui/framework/heapassertions/bleak/agents/ObjectSizeInstrumentationAgent_deploy.jar failed (Exit 1): singlejar.exe failed: error executing command\r\n cd D:/src/longpath-longpath/longpath-longpath/.bazel/3d5seqf5/execroot/__main__\r\nexternal/bazel_tools/tools/jdk/singlejar/singlejar.exe @bazel-out/x64_windows-fastbuild/bin/tools/adt/idea/uitest-framework/testSrc/com/android/tools/idea/tests/gui/framework/heapassertions/bleak/agents/ObjectSizeInstrumentationAgent_deploy.jar-0.params\r\nExecution platform: @bazel_tools//platforms:host_platform\r\nERROR: bazel-out/x64_windows-fastbuild/bin/tools/adt/idea/uitest-framework/testSrc/com/android/tools/idea/tests/gui/framework/heapassertions/bleak/agents/ObjectSizeInstrumentationAgent_deploy.jar-0.params\r\nTarget //tools/adt/idea/android:artifacts failed to build\r\nINFO: Elapsed time: 4.170s, Critical Path: 0.35s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully\r\n```\r\n",
"Also, regarding the comment in the source code, I don't think it is required to add a dependency on protobuf to support long paths on Windows. A simple(r) fix would be to call \"_wfopen\" instead of \"fopen\" with an absolute path prefixed with \"\\\\?\\\".",
"Oh, I missed this TODO comment when I ported singlejar on Windows. PR coming."
] | [
"@laszlocsomor If I changed the filename from 260 `'A'` to 250 `'A'`, the test will pass. Do you know if long path support of Win32 API has the restriction that each path component cannot exceed certain length even with `\\\\?`' prefix? Don't see anything from https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file",
"Yes, individual path components may not exceed ~260 characters. (Can't remember the exact limit and can't find where I read it)",
"> Because you cannot use the \"\\\\?\\\" prefix with a relative path, relative paths are always limited to a total of MAX_PATH characters.\r\n\r\nSeems like this implies that each path component of an UNC-prefixed absolute path cannot exceed `MAX_PATH` (255). At least this is the maximum value I can set until the test starts to fail.",
"Yes, that's my understanding.",
"I suggest testing long path behavior by creating directories like \"aaaaaaaa.aaa\\bbbbbbbb.bbb\\cccccccc.ccc\\...\"\r\n\r\nThese cannot be shortened to 8dot3 style so you can reliably compose a long path.",
"> This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters).\r\n\r\nFound on https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths",
"> I suggest testing long path behavior by creating directories like \"aaaaaaaa.aaa\\bbbbbbbb.bbb\\cccccccc.ccc...\"\r\n\r\nSlightly more troublesome since I need to recursively create the directories with `_wmkdir`, but also done now.",
"For the record I meant something else, but this will do too.\r\n\r\n(I meant creating a path whose directory components are all 8.3 style paths already. Bazel's JNI library shortens paths to 8.3 style when creating processes, because processes can only be created with short paths, and I thought `_wfopen` might, in theory, do the same, but I realize this is too paranoid to test for.)"
] | "2019-06-27T04:05:46Z" | [
"type: bug",
"P2",
"area-Windows",
"team-OSS"
] | Singlejar: Add support for long paths on Windows |
### Description of the problem / feature request:
Invoking "singlejar.exe" sometimes fails on Windows when then argument file (the ".params" file) is located in a path longer than 260 chracters.
### Feature requests: what underlying problem are you trying to solve with this feature?
Add support for long path to singlejar.exe. There is a TODO comment in the source file that long path support should be added:
```
// TODO(laszlocsomor): use the fopen and related file handling API
// implementations from ProtoBuf, in order to support long paths:
// https://github.com/google/protobuf/blob/
// 47b7d2c7cadf74ceec90fc5042232819cd0dd557/
// src/google/protobuf/stubs/io_win32.cc
// Best would be to extract that library to a common location and use
// here, in ProtoBuf, and in Bazel itself.
```
| [
"src/tools/singlejar/BUILD",
"src/tools/singlejar/token_stream.h",
"src/tools/singlejar/token_stream_test.cc"
] | [
"src/tools/singlejar/BUILD",
"src/tools/singlejar/token_stream.h",
"src/tools/singlejar/token_stream_test.cc"
] | [] | diff --git a/src/tools/singlejar/BUILD b/src/tools/singlejar/BUILD
index 2cf4acbd8e3ee4..e969cee73b8bd4 100644
--- a/src/tools/singlejar/BUILD
+++ b/src/tools/singlejar/BUILD
@@ -453,7 +453,10 @@ cc_library(
cc_library(
name = "token_stream",
hdrs = ["token_stream.h"],
- deps = [":diag"],
+ deps = [
+ ":diag",
+ "//src/main/cpp/util",
+ ],
)
filegroup(
diff --git a/src/tools/singlejar/token_stream.h b/src/tools/singlejar/token_stream.h
index 3bad0a883dd540..d94c2576a40c0d 100644
--- a/src/tools/singlejar/token_stream.h
+++ b/src/tools/singlejar/token_stream.h
@@ -23,6 +23,7 @@
#include <utility>
#include <vector>
+#include "src/main/cpp/util/path_platform.h"
#include "src/tools/singlejar/diag.h"
/*
@@ -57,14 +58,19 @@ class ArgTokenStream {
class FileTokenStream {
public:
FileTokenStream(const char *filename) {
- // TODO(laszlocsomor): use the fopen and related file handling API
- // implementations from ProtoBuf, in order to support long paths:
- // https://github.com/google/protobuf/blob/
- // 47b7d2c7cadf74ceec90fc5042232819cd0dd557/
- // src/google/protobuf/stubs/io_win32.cc
- // Best would be to extract that library to a common location and use
- // here, in ProtoBuf, and in Bazel itself.
- if (!(fp_ = fopen(filename, "r"))) {
+#ifdef _WIN32
+ std::wstring wpath;
+ std::string error;
+ if (!blaze_util::AsAbsoluteWindowsPath(filename, &wpath, &error)) {
+ diag_err(1, "%s:%d: AsAbsoluteWindowsPath failed: %s", __FILE__, __LINE__,
+ error.c_str());
+ }
+ fp_ = _wfopen(wpath.c_str(), L"r");
+#else
+ fp_ = fopen(filename, "r");
+#endif
+
+ if (!fp_) {
diag_err(1, "%s", filename);
}
filename_ = filename;
diff --git a/src/tools/singlejar/token_stream_test.cc b/src/tools/singlejar/token_stream_test.cc
index 3cd28077cd6136..2a900ab855425c 100644
--- a/src/tools/singlejar/token_stream_test.cc
+++ b/src/tools/singlejar/token_stream_test.cc
@@ -15,7 +15,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string>
+#include <wchar.h>
+#include "src/main/cpp/util/path_platform.h"
#include "src/tools/singlejar/test_util.h"
#include "src/tools/singlejar/token_stream.h"
#include "googletest/include/gtest/gtest.h"
@@ -79,6 +81,54 @@ TEST(TokenStreamTest, CommandFile) {
EXPECT_TRUE(token_stream.AtEnd());
}
+#ifdef _WIN32
+// '-foo @commandfile -bar' command line.
+TEST(TokenStreamTest, CommandFileLongPath) {
+ const char *tempdir = getenv("TEST_TMPDIR");
+ ASSERT_NE(nullptr, tempdir);
+
+ std::wstring wpath;
+ std::string error;
+ std::string command_file_path = singlejar_test_util::OutputFilePath(std::string(251, 'a'));
+ command_file_path += ".aaa\\";
+ ASSERT_TRUE(blaze_util::AsAbsoluteWindowsPath(command_file_path, &wpath, &error)) << error;
+ ASSERT_EQ(0, _wmkdir(wpath.c_str()));
+
+ command_file_path += std::string(251, 'b');
+ command_file_path += ".bbb\\";
+ ASSERT_TRUE(blaze_util::AsAbsoluteWindowsPath(command_file_path, &wpath, &error)) << error;
+ ASSERT_EQ(0, _wmkdir(wpath.c_str()));
+
+ command_file_path += std::string(251, 'c');
+ command_file_path += ".ccc";
+
+ ASSERT_TRUE(blaze_util::AsAbsoluteWindowsPath(command_file_path, &wpath, &error)) << error;
+
+ FILE *fp = _wfopen(wpath.c_str(), L"w");
+ ASSERT_NE(nullptr, fp);
+ for (size_t i = 0; i < ARRAY_SIZE(lines); ++i) {
+ fprintf(fp, "%s\n", lines[i]);
+ }
+ fclose(fp);
+
+ std::string command_file_arg = std::string("@") + command_file_path;
+ const char *args[] = {"-before_file", "", "-after_file"};
+ args[1] = command_file_arg.c_str();
+ ArgTokenStream token_stream(ARRAY_SIZE(args), args);
+ bool flag = false;
+ ASSERT_TRUE(token_stream.MatchAndSet("-before_file", &flag));
+ EXPECT_TRUE(flag);
+ for (size_t i = 0; i < ARRAY_SIZE(expected_tokens); ++i) {
+ flag = false;
+ ASSERT_TRUE(token_stream.MatchAndSet(expected_tokens[i], &flag));
+ EXPECT_TRUE(flag);
+ }
+ ASSERT_TRUE(token_stream.MatchAndSet("-after_file", &flag));
+ EXPECT_TRUE(flag);
+ EXPECT_TRUE(token_stream.AtEnd());
+}
+#endif
+
// '--arg1 optval1 --arg2' command line.
TEST(TokenStreamTest, OptargOne) {
const char *args[] = {"--arg1", "optval1", "--arg2", "--arg3", "optval3"};
| null | test | train | 2019-06-27T00:43:14 | "2019-06-25T22:41:20Z" | rpaquay | test |
bazelbuild/bazel/8721_8747 | bazelbuild/bazel | bazelbuild/bazel/8721 | bazelbuild/bazel/8747 | [
"timestamp(timedelta=0.0, similarity=0.8522146160996319)"
] | 5d72d4ea54fdcb6e963cacb7181fda847e01bc50 | 171992cf3e51ce1e132adeff6265bcc02e9e6d48 | [
"cc @meteorcloudy @hlopko ",
"I don't think I'll have the capacity to design/implement this, but I'll gladly review the proposal.",
"This won't be hard to implement it, I will do it!"
] | [
"We have to explicitly use `bin\\amd64\\VCVARS64.BAT` because the `VCVARSALL.BAT` in VC 2015 falls back to `vcbuildtools.bat` when VC 2017 or VC 2019 is installed. But `vcbuildtools.bat` doesn't support specifying Windows SDK. I also double checked, if no Windows SDK version is passed, `vcbuildtools.bat` sets the exactly same environment variables as `VCVARSALL.BAT`.",
"Thanks for checking and for the comment!",
"I'd start with describing the default case, i.e. when `BAZEL_WINSDK_FULL_VERSION` is not specified.\r\n\r\nThen you can elaborate what if there are multiple SDK versions installed, i.e. when the user may need to set `BAZEL_WINSDK_FULL_VERSION`.",
"> or specify 8.1 to use the Windows 8.1 SDK\r\n\r\nThis suggests 8.1 is the only acceptable value for the Windows 8.1 SDK. What I guess you meant is:\r\n\r\n> or specify a Windows OS version to use the latest SDK installed for that (e.g. 8.1 to use the latest installed Windows 8.1 SDK)",
"Is there a vcvars64.bat in this case, and if so, shall we use it here too? We only support 64 bit anyway.",
"That's actually what I meant, there's no subversion for Windows 8.1 SDK, only one version is available. I copied this from the official documentation. ;)\r\nhttps://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019",
"That's a good idea! \r\nFun fact: in VC 2015, `VCVARSALL.BAT` calls platform specific scripts (`VCVARS64.bat`, ect), in VC 2017 & 2019, platform specific scripts call `VCVARSALL.BAT`...",
"Thanks, done!",
"Nice.",
"I see, thanks! Could you maybe call this out in the doc explicitly?",
"Done.",
"Replace \"Note that:\" with \"Requirement:\" to make it stand out more.",
"Could you add a brief reasoning? (Enough to say that VS 2015 build tools doesn't support selecting the SDK.)",
"`||` syntax is not supported in Cmd, you must do this instead (yes, with a single `&`):\r\n\r\n bla bla & if \"%errorlevel%\" neq \"0\" (exit /b 1)",
"Can you replace this whole function with just this? :\r\n\r\n return repository_ctx.os.environ.get(\"BAZEL_WINSDK_FULL_VERSION\", default = \"\")",
"Sure!",
"Just realized the `exit /b` part is not needed. But thanks for the suggestion!",
"Done, thanks!"
] | "2019-06-28T13:25:24Z" | [
"type: feature request",
"P2",
"area-Windows",
"team-OSS"
] | Windows, C++: support selecting the Windows SDK | ### Feature requests: what underlying problem are you trying to solve with this feature?
If multiple Windows SDK versions are installed, the user may want to select which one to use. Currently there's no way to do so.
### What operating system are you running Bazel on?
Windows 10
### What's the output of `bazel info release`?
release 0.27.0
### Have you found anything relevant by searching the web?
Related: https://github.com/bazelbuild/bazel/issues/8353 | [
"site/docs/windows.md",
"tools/cpp/cc_configure.bzl",
"tools/cpp/windows_cc_configure.bzl"
] | [
"site/docs/windows.md",
"tools/cpp/cc_configure.bzl",
"tools/cpp/windows_cc_configure.bzl"
] | [] | diff --git a/site/docs/windows.md b/site/docs/windows.md
index 262cc569ead958..3e128ace0db331 100644
--- a/site/docs/windows.md
+++ b/site/docs/windows.md
@@ -184,7 +184,19 @@ To build C++ targets, you need:
SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk).
The Windows SDK contains header files and libraries you need when building
- Windows applications, including Bazel itself.
+ Windows applications, including Bazel itself. By default, the latest Windows SDK installed will
+ be used. You also can specify Windows SDK version by setting `BAZEL_WINSDK_FULL_VERSION`. You
+ can use a full Windows 10 SDK number such as 10.0.10240.0, or specify 8.1 to use the Windows 8.1
+ SDK (only one version of Windows 8.1 SDK is available). Please make sure you have the specified
+ Windows SDK installed.
+
+ *Requirement*: This is supported with VC 2017 and 2019. The standalone VC 2015 Build Tools doesn't
+ support selecting Windows SDK, you'll need the full Visual Studio 2015 installation, otherwise
+ `BAZEL_WINSDK_FULL_VERSION` will be ignored.
+
+ ```
+ set BAZEL_WINSDK_FULL_VERSION=10.0.10240.0
+ ```
If everything is set up, you can build a C++ target now!
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl
index 66dce02f991fde..b2e2080c196dfa 100644
--- a/tools/cpp/cc_configure.bzl
+++ b/tools/cpp/cc_configure.bzl
@@ -139,6 +139,7 @@ cc_autoconf = repository_rule(
"BAZEL_VC",
"BAZEL_VC_FULL_VERSION",
"BAZEL_VS",
+ "BAZEL_WINSDK_FULL_VERSION",
"BAZEL_LLVM",
"USE_CLANG_CL",
"CC",
diff --git a/tools/cpp/windows_cc_configure.bzl b/tools/cpp/windows_cc_configure.bzl
index dcdf3d6f843ee8..c5528ac219de3a 100644
--- a/tools/cpp/windows_cc_configure.bzl
+++ b/tools/cpp/windows_cc_configure.bzl
@@ -229,32 +229,57 @@ def _is_vs_2017_or_2019(vc_path):
# C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
return vc_path.find("2017") != -1 or vc_path.find("2019") != -1
-def _find_vcvarsall_bat_script(repository_ctx, vc_path):
- """Find vcvarsall.bat script. Doesn't %-escape the result."""
+def _find_vcvars_bat_script(repository_ctx, vc_path):
+ """Find batch script to set up environment variables for VC. Doesn't %-escape the result."""
if _is_vs_2017_or_2019(vc_path):
- vcvarsall = vc_path + "\\Auxiliary\\Build\\VCVARSALL.BAT"
+ vcvars_script = vc_path + "\\Auxiliary\\Build\\VCVARSALL.BAT"
else:
- vcvarsall = vc_path + "\\VCVARSALL.BAT"
+ vcvars_script = vc_path + "\\VCVARSALL.BAT"
- if not repository_ctx.path(vcvarsall).exists:
+ if not repository_ctx.path(vcvars_script).exists:
return None
- return vcvarsall
+ return vcvars_script
+
+def _is_support_winsdk_selection(repository_ctx, vc_path):
+ """Windows SDK selection is supported with VC 2017 / 2019 or with full VS 2015 installation."""
+ if _is_vs_2017_or_2019(vc_path):
+ return True
+ # By checking the source code of VCVARSALL.BAT in VC 2015, we know that
+ # when devenv.exe or wdexpress.exe exists, VCVARSALL.BAT supports Windows SDK selection.
+ vc_common_ide = repository_ctx.path(vc_path).dirname.get_child("Common7").get_child("IDE")
+ for tool in ["devenv.exe", "wdexpress.exe"]:
+ if vc_common_ide.get_child(tool).exists:
+ return True
+ return False
def setup_vc_env_vars(repository_ctx, vc_path):
- """Get environment variables set by VCVARSALL.BAT. Doesn't %-escape the result!"""
- vcvarsall = _find_vcvarsall_bat_script(repository_ctx, vc_path)
- if not vcvarsall:
- return None
+ """Get environment variables set by VCVARSALL.BAT script. Doesn't %-escape the result!"""
+ vcvars_script = _find_vcvars_bat_script(repository_ctx, vc_path)
+ if not vcvars_script:
+ auto_configure_fail("Cannot find VCVARSALL.BAT script under %s" % vc_path)
+
+ # Getting Windows SDK version set by user.
+ # Only supports VC 2017 & 2019 and VC 2015 with full VS installation.
+ winsdk_version = _get_winsdk_full_version(repository_ctx)
+ if winsdk_version and not _is_support_winsdk_selection(repository_ctx, vc_path):
+ auto_configure_warning(("BAZEL_WINSDK_FULL_VERSION=%s is ignored, " +
+ "because standalone Visual C++ Build Tools 2015 doesn't support specifying Windows " +
+ "SDK version, please install the full VS 2015 or use VC 2017/2019.") % winsdk_version)
+ winsdk_version = ""
+
+ # Get VC version set by user. Only supports VC 2017 & 2019.
vcvars_ver = ""
if _is_vs_2017_or_2019(vc_path):
full_version = _get_vc_full_version(repository_ctx, vc_path)
if full_version:
vcvars_ver = "-vcvars_ver=" + full_version
+
+ cmd = "\"%s\" amd64 %s %s" % (vcvars_script, winsdk_version, vcvars_ver)
repository_ctx.file(
"get_env.bat",
"@echo off\n" +
- ("call \"%s\" amd64 %s > NUL \n" % (vcvarsall, vcvars_ver)) +
+ ("call %s > NUL \n" % cmd) +
"echo PATH=%PATH%,INCLUDE=%INCLUDE%,LIB=%LIB%,WINDOWSSDKDIR=%WINDOWSSDKDIR% \n",
True,
)
@@ -267,8 +292,16 @@ def setup_vc_env_vars(repository_ctx, vc_path):
for env in envs:
key, value = env.split("=", 1)
env_map[key] = escape_string(value.replace("\\", "\\\\"))
+ _check_env_vars(env_map, cmd)
return env_map
+def _check_env_vars(env_map, cmd):
+ envs = ["PATH", "INCLUDE", "LIB", "WINDOWSSDKDIR"]
+ for env in envs:
+ if not env_map.get(env):
+ auto_configure_fail(
+ "Setting up VC environment variables failed, %s is not set by the following command:\n %s" % (env, cmd))
+
def _get_latest_subversion(repository_ctx, vc_path):
"""Get the latest subversion of a VS 2017/2019 installation.
@@ -300,6 +333,10 @@ def _get_vc_full_version(repository_ctx, vc_path):
return repository_ctx.os.environ["BAZEL_VC_FULL_VERSION"]
return _get_latest_subversion(repository_ctx, vc_path)
+def _get_winsdk_full_version(repository_ctx):
+ """Return the value of BAZEL_WINSDK_FULL_VERSION if defined, otherwise an empty string."""
+ return repository_ctx.os.environ.get("BAZEL_WINSDK_FULL_VERSION", default = "")
+
def find_msvc_tool(repository_ctx, vc_path, tool):
"""Find the exact path of a specific build tool in MSVC. Doesn't %-escape the result."""
tool_path = None
@@ -320,7 +357,7 @@ def find_msvc_tool(repository_ctx, vc_path, tool):
def _find_missing_vc_tools(repository_ctx, vc_path):
"""Check if any required tool is missing under given VC path."""
missing_tools = []
- if not _find_vcvarsall_bat_script(repository_ctx, vc_path):
+ if not _find_vcvars_bat_script(repository_ctx, vc_path):
missing_tools.append("VCVARSALL.BAT")
for tool in ["cl.exe", "link.exe", "lib.exe", "ml64.exe"]:
| null | val | train | 2019-07-01T06:11:48 | "2019-06-26T07:26:11Z" | laszlocsomor | test |
bazelbuild/bazel/8767_8769 | bazelbuild/bazel | bazelbuild/bazel/8767 | bazelbuild/bazel/8769 | [
"timestamp(timedelta=147055.0, similarity=0.8411963463355797)"
] | 2e374a9c6e3d4ed71f0145de287c4b2fe43c76d6 | 0f700e0844ef6361ef5c8bb52b47ad6f18d14fa0 | [
"I'm having second thoughts about this idea.\r\n\r\nIn light of https://github.com/bazelbuild/bazel/issues/7627, namely that Windows will case-sensitivity on a per-directory basis, I'm starting to doubt the feasibility and usefulness of case-insensitive glob().\r\n\r\nMore, if glob remained case-sensitive, then Bazel would behave the same on Linux and Windows, and we wouldn't need to worry about the per-directory settings."
] | [] | "2019-07-02T11:12:40Z" | [
"P2",
"area-Windows",
"incompatible-change",
"team-OSS"
] | incompatible_windows_case_ignoring_glob: enables case-insensitive glob() on Windows | # Description
The `--[no]incompatible_windows_case_ignoring_glob` shall control whether `glob()` is case-sensitive (false) or case-ignoring (true) on Windows.
## Affected platforms
This flag only affects Windows. It is a no-op on other platforms.
## Semantics
- When disabled (default): `glob()`'s include and exclude patterns must match exactly the casing of files and directories on the filesystem. This is the same behavior on other platforms. E.g. `glob(["Foo/**"], exclude = ["Foo/Bar"])` will match exactly `Foo/**` and not `foO/**`, and will exclude exactly `Foo/Bar` but not `foO/baR`.
- When enabled: on Windows, `glob()` will ignore the casing in the include and exclude patterns. On other platforms, this is a no-op.
## Related issues
- https://github.com/bazelbuild/bazel/issues/8705
- https://github.com/bazelbuild/bazel/issues/8759
# Migration recipe
<!-- TODO: would be nice to provide a migration tool that evaluates the glob with both semantics and warns if there are differences. -->
# Rollout plan | [
"src/main/java/com/google/devtools/build/lib/packages/GlobCache.java",
"src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java",
"src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java",
"src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java",
"src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/GlobCache.java",
"src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java",
"src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java",
"src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java",
"src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java"
] | [
"src/test/java/com/google/devtools/build/lib/BUILD",
"src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java",
"src/test/java/com/google/devtools/build/lib/vfs/GlobTest.java",
"src/test/java/com/google/devtools/build/lib/vfs/WindowsGlobTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java b/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java
index 8d1bb74115d9dc..db58cfc813df11 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java
@@ -255,7 +255,13 @@ public List<String> globUnsorted(
}
results.addAll(items);
}
- UnixGlob.removeExcludes(results, excludes);
+
+ // TODO(laszlocsomor): set `caseSensitive` from the value of
+ // `--incompatible_windows_case_insensitive_glob` or from FileSystem.isGlobCaseSensitive()
+ // See https://github.com/bazelbuild/bazel/issues/8767
+ final boolean caseSensitive = true;
+
+ UnixGlob.removeExcludes(results, excludes, caseSensitive);
if (!allowEmpty && results.isEmpty()) {
throw new BadGlobException(
"all files in the glob have been excluded, but allow_empty is set to False.");
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
index cabb54f6bd80bc..e40c76f11b43a7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
@@ -43,6 +43,10 @@
*/
public final class GlobFunction implements SkyFunction {
+ // TODO(laszlocsomor): we might need to create another regexPatternCache for case-insensitive
+ // glob() mode to avoid reading wrong cache results when the user changes the
+ // --incompatible_windows_case_ignoring_glob flag value between builds.
+ // See https://github.com/bazelbuild/bazel/issues/8767.
private final ConcurrentHashMap<String, Pattern> regexPatternCache = new ConcurrentHashMap<>();
private final boolean alwaysUseDirListing;
@@ -152,6 +156,11 @@ public SkyValue compute(SkyKey skyKey, Environment env)
}
}
+ // TODO(laszlocsomor): set `caseSensitive` from the value of
+ // `--incompatible_windows_case_insensitive_glob` or from FileSystem.isGlobCaseSensitive()
+ // See https://github.com/bazelbuild/bazel/issues/8767
+ final boolean caseSensitive = true;
+
// Now that we have the directory listing, we do three passes over it so as to maximize
// skyframe batching:
// (1) Process every dirent, keeping track of values we need to request if the dirent cannot
@@ -169,7 +178,7 @@ public SkyValue compute(SkyKey skyKey, Environment env)
for (Dirent dirent : listingValue.getDirents()) {
Dirent.Type direntType = dirent.getType();
String fileName = dirent.getName();
- if (!UnixGlob.matches(patternHead, fileName, regexPatternCache)) {
+ if (!UnixGlob.matches(patternHead, fileName, regexPatternCache, caseSensitive)) {
continue;
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
index 23a6c77b9921ba..cfbe0062aa91e7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
@@ -1011,7 +1011,13 @@ private List<String> resolve(Globber delegate)
if (legacyIncludesToken != null) {
matches.addAll(delegate.fetch(legacyIncludesToken));
}
- UnixGlob.removeExcludes(matches, excludes);
+
+ // TODO(laszlocsomor): set `caseSensitive` from the value of
+ // `--incompatible_windows_case_insensitive_glob` or from FileSystem.isGlobCaseSensitive()
+ // See https://github.com/bazelbuild/bazel/issues/8767
+ final boolean caseSensitive = true;
+
+ UnixGlob.removeExcludes(matches, excludes, caseSensitive);
List<String> result = new ArrayList<>(matches);
// Skyframe glob results are unsorted. And we used a LegacyGlobber that doesn't sort.
// Therefore, we want to unconditionally sort here.
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
index abaa6b1b9d7f08..7f6b6e02898559 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
@@ -137,6 +137,22 @@ final Root getAbsoluteRoot() {
*/
public abstract boolean isFilePathCaseSensitive();
+ /**
+ * Returns true if glob() is case-sensitive.
+ *
+ * <p>When glob() is case-sensitive, it will only match (or exclude) file "Foo" if the include (or
+ * exclude) pattern uses the same upper-case and lower-case letters.
+ *
+ * <p>When glob() is case-insensitive, it will match (or exclude) the file "Foo" even if the
+ * include (or exclude) pattern uses a different casing such as "foO".
+ */
+ // TODO(laszlocsomor): After `--incompatible_windows_case_insensitive_glob` is flipped to true,
+ // remove this method and all references to it and replace call sites with
+ // isFilePathCaseSensitive(). See https://github.com/bazelbuild/bazel/issues/8767
+ public boolean isGlobCaseSensitive() {
+ return true;
+ }
+
/**
* Returns the type of the file system path belongs to.
*
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java b/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
index d9175a27eaace1..05a45c9fbb90be 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
@@ -15,6 +15,7 @@
package com.google.devtools.build.lib.vfs;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Ascii;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
@@ -155,9 +156,9 @@ public static String checkPatternForError(String pattern) {
return null;
}
- /** Calls {@link #matches(String, String, Map) matches(pattern, str, null)} */
- public static boolean matches(String pattern, String str) {
- return matches(pattern, str, null);
+ /** Calls {@link #matches(String, String, Map) matches(pattern, str, null, boolean)} */
+ public static boolean matches(String pattern, String str, boolean caseSensitive) {
+ return matches(pattern, str, null, caseSensitive);
}
/**
@@ -169,7 +170,8 @@ public static boolean matches(String pattern, String str) {
* @param patternCache a cache from patterns to compiled Pattern objects, or {@code null} to skip
* caching
*/
- public static boolean matches(String pattern, String str, Map<String, Pattern> patternCache) {
+ public static boolean matches(String pattern, String str, Map<String, Pattern> patternCache,
+ boolean caseSensitive) {
if (pattern.length() == 0 || str.length() == 0) {
return false;
}
@@ -191,20 +193,21 @@ public static boolean matches(String pattern, String str, Map<String, Pattern> p
// Common case: *.xyz
if (pattern.charAt(0) == '*' && pattern.lastIndexOf('*') == 0) {
- return str.endsWith(pattern.substring(1));
+ return endsWithCase(str, pattern.substring(1), caseSensitive);
}
// Common case: xyz*
int lastIndex = pattern.length() - 1;
// The first clause of this if statement is unnecessary, but is an
// optimization--charAt runs faster than indexOf.
if (pattern.charAt(lastIndex) == '*' && pattern.indexOf('*') == lastIndex) {
- return str.startsWith(pattern.substring(0, lastIndex));
+ return startsWithCase(str, pattern.substring(0, lastIndex), caseSensitive);
}
Pattern regex =
patternCache == null
- ? makePatternFromWildcard(pattern)
- : patternCache.computeIfAbsent(pattern, p -> makePatternFromWildcard(p));
+ ? makePatternFromWildcard(pattern, caseSensitive)
+ : patternCache.computeIfAbsent(
+ pattern, p -> makePatternFromWildcard(p, caseSensitive));
return regex.matcher(str).matches();
}
@@ -214,7 +217,7 @@ public static boolean matches(String pattern, String str, Map<String, Pattern> p
*
* <p>e.g. "foo*bar?.java" -> "foo.*bar.\\.java"
*/
- private static Pattern makePatternFromWildcard(String pattern) {
+ private static Pattern makePatternFromWildcard(String pattern, boolean caseSensitive) {
StringBuilder regexp = new StringBuilder();
for (int i = 0, len = pattern.length(); i < len; i++) {
char c = pattern.charAt(i);
@@ -247,7 +250,14 @@ private static Pattern makePatternFromWildcard(String pattern) {
regexp.append(c);
break;
default:
- regexp.append(c);
+ if (caseSensitive || !isAlphaAscii(c)) {
+ regexp.append(c);
+ } else {
+ regexp.append('[')
+ .append(Ascii.toUpperCase(c))
+ .append(Ascii.toLowerCase(c))
+ .append(']');
+ }
break;
}
}
@@ -558,7 +568,6 @@ Future<List<Path>> globAsync(
if (baseStat == null || patterns.isEmpty()) {
return Futures.immediateFuture(Collections.<Path>emptyList());
}
-
List<String[]> splitPatterns = checkAndSplitPatterns(patterns);
// We do a dumb loop, even though it will likely duplicate logical work (note that the
@@ -567,6 +576,7 @@ Future<List<Path>> globAsync(
// glob [*/*.java, sub/*.java, */*.txt]).
pendingOps.incrementAndGet();
try {
+ final boolean caseSensitive = base.getFileSystem().isGlobCaseSensitive();
for (String[] splitPattern : splitPatterns) {
int numRecursivePatterns = 0;
for (String pattern : splitPattern) {
@@ -575,8 +585,10 @@ Future<List<Path>> globAsync(
}
}
GlobTaskContext context = numRecursivePatterns > 1
- ? new RecursiveGlobTaskContext(splitPattern, excludeDirectories, dirPred, syscalls)
- : new GlobTaskContext(splitPattern, excludeDirectories, dirPred, syscalls);
+ ? new RecursiveGlobTaskContext(splitPattern, excludeDirectories, caseSensitive,
+ dirPred, syscalls)
+ : new GlobTaskContext(splitPattern, excludeDirectories, caseSensitive, dirPred,
+ syscalls);
context.queueGlob(base, baseStat.isDirectory(), 0);
}
} finally {
@@ -685,16 +697,19 @@ private void decrementAndCheckDone() {
private class GlobTaskContext {
private final String[] patternParts;
private final boolean excludeDirectories;
+ private final boolean caseSensitive;
private final Predicate<Path> dirPred;
private final FilesystemCalls syscalls;
GlobTaskContext(
String[] patternParts,
boolean excludeDirectories,
+ boolean caseSensitive,
Predicate<Path> dirPred,
FilesystemCalls syscalls) {
this.patternParts = patternParts;
this.excludeDirectories = excludeDirectories;
+ this.caseSensitive = caseSensitive;
this.dirPred = dirPred;
this.syscalls = syscalls;
}
@@ -744,9 +759,10 @@ public int hashCode() {
private RecursiveGlobTaskContext(
String[] patternParts,
boolean excludeDirectories,
+ boolean caseSensitive,
Predicate<Path> dirPred,
FilesystemCalls syscalls) {
- super(patternParts, excludeDirectories, dirPred, syscalls);
+ super(patternParts, excludeDirectories, caseSensitive, dirPred, syscalls);
}
@Override
@@ -820,7 +836,7 @@ private void reallyGlob(Path base, boolean baseIsDir, int idx, GlobTaskContext c
// The file is a special file (fifo, etc.). No need to even match against the pattern.
continue;
}
- if (matches(pattern, dent.getName(), cache)) {
+ if (matches(pattern, dent.getName(), cache, context.caseSensitive)) {
Path child = base.getChild(dent.getName());
if (childType == Dirent.Type.SYMLINK) {
@@ -868,12 +884,17 @@ private void processFileOrDirectory(
* Filters out exclude patterns from a Set of paths. Common cases such as wildcard-free patterns
* or suffix patterns are special-cased to make this function efficient.
*/
- public static void removeExcludes(Set<String> paths, Collection<String> excludes) {
+ public static void removeExcludes(Set<String> paths, Collection<String> excludes,
+ boolean caseSensitive) {
ArrayList<String> complexPatterns = new ArrayList<>(excludes.size());
Map<String, List<String>> starstarSlashStarHeadTailPairs = new HashMap<>();
for (String exclude : excludes) {
if (isWildcardFree(exclude)) {
- paths.remove(exclude);
+ if (caseSensitive) {
+ paths.remove(exclude);
+ } else {
+ paths.removeIf(p -> Ascii.equalsIgnoreCase(p, exclude));
+ }
continue;
}
int patternPos = exclude.indexOf("**/*");
@@ -890,9 +911,9 @@ public static void removeExcludes(Set<String> paths, Collection<String> excludes
for (Map.Entry<String, List<String>> headTailPair : starstarSlashStarHeadTailPairs.entrySet()) {
paths.removeIf(
path -> {
- if (path.startsWith(headTailPair.getKey())) {
+ if (startsWithCase(path, headTailPair.getKey(), caseSensitive)) {
for (String tail : headTailPair.getValue()) {
- if (path.endsWith(tail)) {
+ if (endsWithCase(path, tail, caseSensitive)) {
return true;
}
}
@@ -909,7 +930,7 @@ public static void removeExcludes(Set<String> paths, Collection<String> excludes
path -> {
String[] segments = Iterables.toArray(Splitter.on('/').split(path), String.class);
for (String[] splitPattern : splitPatterns) {
- if (matchesPattern(splitPattern, segments, 0, 0, patternCache)) {
+ if (matchesPattern(splitPattern, segments, 0, 0, patternCache, caseSensitive)) {
return true;
}
}
@@ -919,19 +940,21 @@ public static void removeExcludes(Set<String> paths, Collection<String> excludes
/** Returns true if {@code pattern} matches {@code path} starting from the given segments. */
private static boolean matchesPattern(
- String[] pattern, String[] path, int i, int j, Map<String, Pattern> patternCache) {
+ String[] pattern, String[] path, int i, int j, Map<String, Pattern> patternCache,
+ boolean caseSensitive) {
if (i == pattern.length) {
return j == path.length;
}
if (pattern[i].equals("**")) {
- return matchesPattern(pattern, path, i + 1, j, patternCache)
- || (j < path.length && matchesPattern(pattern, path, i, j + 1, patternCache));
+ return matchesPattern(pattern, path, i + 1, j, patternCache, caseSensitive)
+ || (j < path.length &&
+ matchesPattern(pattern, path, i, j + 1, patternCache, caseSensitive));
}
if (j == path.length) {
return false;
}
- if (matches(pattern[i], path[j], patternCache)) {
- return matchesPattern(pattern, path, i + 1, j + 1, patternCache);
+ if (matches(pattern[i], path[j], patternCache, caseSensitive)) {
+ return matchesPattern(pattern, path, i + 1, j + 1, patternCache, caseSensitive);
}
return false;
}
@@ -939,4 +962,28 @@ private static boolean matchesPattern(
private static boolean isWildcardFree(String pattern) {
return !pattern.contains("*") && !pattern.contains("?");
}
+
+ @VisibleForTesting
+ static boolean startsWithCase(String s, String p, boolean caseSensitive) {
+ if (caseSensitive) {
+ return s.startsWith(p);
+ } else {
+ return s.length() >= p.length() && s.regionMatches(true, 0, p, 0, p.length());
+ }
+ }
+
+ @VisibleForTesting
+ static boolean endsWithCase(String s, String p, boolean caseSensitive) {
+ if (caseSensitive) {
+ return s.endsWith(p);
+ } else {
+ return s.length() >= p.length() &&
+ s.regionMatches(true, s.length() - p.length(), p, 0, p.length());
+ }
+ }
+
+ @VisibleForTesting
+ static boolean isAlphaAscii(char c) {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+ }
}
diff --git a/src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java b/src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java
index 5b3669b8ed5a8c..abb7c63d5e196a 100644
--- a/src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java
+++ b/src/main/java/com/google/devtools/build/lib/windows/WindowsFileSystem.java
@@ -105,6 +105,13 @@ public boolean isFilePathCaseSensitive() {
return false;
}
+ @Override
+ public boolean isGlobCaseSensitive() {
+ // TODO(laszlocsomor): return the opposite of `--incompatible_windows_case_insensitive_glob`
+ // here. See https://github.com/bazelbuild/bazel/issues/8767
+ return true;
+ }
+
@Override
protected boolean fileIsSymbolicLink(File file) {
try {
| diff --git a/src/test/java/com/google/devtools/build/lib/BUILD b/src/test/java/com/google/devtools/build/lib/BUILD
index fbf4d421a713a4..8199ba1e9d8cf5 100644
--- a/src/test/java/com/google/devtools/build/lib/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/BUILD
@@ -9,6 +9,7 @@ package(
CROSS_PLATFORM_WINDOWS_TESTS = [
"util/DependencySetWindowsTest.java",
"vfs/PathFragmentWindowsTest.java",
+ "vfs/WindowsGlobTest.java",
"vfs/WindowsPathTest.java",
]
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
index 3d85f630d0f619..e30cb903f557c6 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
@@ -544,7 +544,7 @@ public void testSpecialRegexCharacter() throws Exception {
@Test
public void testMatchesCallWithNoCache() {
- assertThat(UnixGlob.matches("*a*b", "CaCb", null)).isTrue();
+ assertThat(UnixGlob.matches("*a*b", "CaCb", null, true)).isTrue();
}
@Test
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/GlobTest.java b/src/test/java/com/google/devtools/build/lib/vfs/GlobTest.java
index 7eb2a6672138fc..efa15f515a8db2 100644
--- a/src/test/java/com/google/devtools/build/lib/vfs/GlobTest.java
+++ b/src/test/java/com/google/devtools/build/lib/vfs/GlobTest.java
@@ -285,7 +285,7 @@ public void testSpecialRegexCharacter() throws Exception {
@Test
public void testMatchesCallWithNoCache() {
- assertThat(UnixGlob.matches("*a*b", "CaCb", null)).isTrue();
+ assertThat(UnixGlob.matches("*a*b", "CaCb", null, true)).isTrue();
}
@Test
@@ -297,11 +297,11 @@ public void testMultiplePatterns() throws Exception {
public void testMatcherMethodRecursiveBelowDir() throws Exception {
FileSystemUtils.createEmptyFile(tmpPath.getRelative("foo/file"));
String pattern = "foo/**/*";
- assertThat(UnixGlob.matches(pattern, "foo/bar")).isTrue();
- assertThat(UnixGlob.matches(pattern, "foo/bar/baz")).isTrue();
- assertThat(UnixGlob.matches(pattern, "foo")).isFalse();
- assertThat(UnixGlob.matches(pattern, "foob")).isFalse();
- assertThat(UnixGlob.matches("**/foo", "foo")).isTrue();
+ assertThat(UnixGlob.matches(pattern, "foo/bar", true)).isTrue();
+ assertThat(UnixGlob.matches(pattern, "foo/bar/baz", true)).isTrue();
+ assertThat(UnixGlob.matches(pattern, "foo", true)).isFalse();
+ assertThat(UnixGlob.matches(pattern, "foob", true)).isFalse();
+ assertThat(UnixGlob.matches("**/foo", "foo", true)).isTrue();
}
@Test
@@ -440,7 +440,7 @@ public boolean apply(Path input) {
private Collection<String> removeExcludes(ImmutableList<String> paths, String... excludes) {
HashSet<String> pathSet = new HashSet<>(paths);
- UnixGlob.removeExcludes(pathSet, ImmutableList.copyOf(excludes));
+ UnixGlob.removeExcludes(pathSet, ImmutableList.copyOf(excludes), true);
return pathSet;
}
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/WindowsGlobTest.java b/src/test/java/com/google/devtools/build/lib/vfs/WindowsGlobTest.java
new file mode 100644
index 00000000000000..39bd33f877e608
--- /dev/null
+++ b/src/test/java/com/google/devtools/build/lib/vfs/WindowsGlobTest.java
@@ -0,0 +1,348 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.lib.vfs;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.devtools.build.lib.clock.BlazeClock;
+import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.regex.Pattern;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Tests glob() on Windows (when glob is case-insensitive). */
+@RunWith(JUnit4.class)
+public class WindowsGlobTest {
+
+ private static void assertMatches(UnixGlob.FilesystemCalls fsCalls, Path root, String pattern,
+ String... expecteds) throws IOException {
+ AtomicReference<UnixGlob.FilesystemCalls> sysCalls = new AtomicReference<>(fsCalls);
+ assertThat(
+ Iterables.transform(
+ new UnixGlob.Builder(root)
+ .addPattern(pattern)
+ .setFilesystemCalls(sysCalls)
+ .setExcludeDirectories(true)
+ .glob(),
+ // Convert Paths to Strings, otherwise they'd be compared with the host system's Path
+ // comparison semantics.
+ a -> a.relativeTo(root).toString()))
+ .containsExactlyElementsIn(expecteds);
+ }
+
+ private static void assertExcludes(Collection<String> unfiltered, String exclusionPattern,
+ boolean caseSensitive, Collection<String> expected) {
+ Set<String> matched = new HashSet<>(unfiltered);
+ UnixGlob.removeExcludes(matched, ImmutableList.of(exclusionPattern), caseSensitive);
+ assertThat(matched).containsExactlyElementsIn(expected);
+ }
+
+ @Test
+ public void testMatches() throws Exception {
+ assertThat(UnixGlob.matches("Foo/**", "Foo/Bar/a.txt", null, true)).isTrue();
+ assertThat(UnixGlob.matches("Foo/**", "Foo/Bar/a.txt", null, false)).isTrue();
+
+ assertThat(UnixGlob.matches("foo/**", "Foo/Bar/a.txt", null, true)).isFalse();
+ assertThat(UnixGlob.matches("foo/**", "Foo/Bar/a.txt", null, false)).isTrue();
+
+ assertThat(UnixGlob.matches("F*o*o/**", "Foo/Bar/a.txt", null, true)).isTrue();
+ assertThat(UnixGlob.matches("F*o*o/**", "Foo/Bar/a.txt", null, false)).isTrue();
+
+ assertThat(UnixGlob.matches("f*o*o/**", "Foo/Bar/a.txt", null, true)).isFalse();
+ assertThat(UnixGlob.matches("f*o*o/**", "Foo/Bar/a.txt", null, false)).isTrue();
+
+ assertThat(UnixGlob.matches("Foo/**", "Foo/Bar/a.txt", null, true)).isTrue();
+ assertThat(UnixGlob.matches("Foo/**", "Foo/Bar/a.txt", null, false)).isTrue();
+ }
+
+ @Test
+ public void testExcludes() throws Exception {
+ assertExcludes(Arrays.asList("Foo/Bar/a.txt", "Foo/Bar/b.dat"), "Foo/**/*.dat", true,
+ Arrays.asList("Foo/Bar/a.txt"));
+ assertExcludes(Arrays.asList("Foo/Bar/a.txt", "Foo/Bar/b.dat"), "Foo/**/*.dat", false,
+ Arrays.asList("Foo/Bar/a.txt"));
+
+ assertExcludes(Arrays.asList("Foo/Bar/a.txt", "Foo/Bar/b.dat"), "foo/**/*.dat", true,
+ Arrays.asList("Foo/Bar/a.txt", "Foo/Bar/b.dat"));
+ assertExcludes(Arrays.asList("Foo/Bar/a.txt", "Foo/Bar/b.dat"), "foo/**/*.dat", false,
+ Arrays.asList("Foo/Bar/a.txt"));
+ }
+
+ private enum MockStat implements FileStatus {
+ FILE(true, false),
+ DIR(false, true),
+ UNKNOWN(false, false);
+
+ private final boolean isFile;
+ private final boolean isDir;
+
+ private MockStat(boolean isFile, boolean isDir) {
+ this.isFile = isFile;
+ this.isDir = isDir;
+ }
+
+ @Override public boolean isFile() { return isFile; }
+ @Override public boolean isDirectory() { return isDir; }
+ @Override public boolean isSymbolicLink() { return false; }
+ @Override public boolean isSpecialFile() { return false; }
+ @Override public long getSize() throws IOException { return 0; }
+
+ @Override
+ public long getLastModifiedTime() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public long getLastChangeTime() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public long getNodeId() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ private static FileSystem mockFs(boolean caseSensitive) throws IOException {
+ FileSystem fs = new InMemoryFileSystem(BlazeClock.instance()) {
+ @Override public boolean isFilePathCaseSensitive() { return caseSensitive; }
+ @Override public boolean isGlobCaseSensitive() { return isFilePathCaseSensitive(); }
+ };
+ fs.getPath("/globtmp/Foo/Bar").createDirectoryAndParents();
+ FileSystemUtils.writeContentAsLatin1(fs.getPath("/globtmp/Foo/Bar/a.txt"), "foo");
+ FileSystemUtils.writeContentAsLatin1(fs.getPath("/globtmp/Foo/Bar/b.dat"), "bar");
+ return fs;
+ }
+
+ private static Map<String, Collection<Dirent>> mockDirents(Path root) {
+ // Map keys must be Strings not Paths, lest they follow the host OS' case-sensitivity policy.
+ Map<String, Collection<Dirent>> d = root.getFileSystem().isGlobCaseSensitive()
+ ? new HashMap<>()
+ : new TreeMap<>((String x, String y) -> x.compareToIgnoreCase(y));
+ d.put(
+ root.getParentDirectory().toString(),
+ ImmutableList.of(new Dirent(root.getBaseName(), Dirent.Type.DIRECTORY)));
+ d.put(
+ root.toString(),
+ ImmutableList.of(new Dirent("Foo", Dirent.Type.DIRECTORY)));
+ d.put(
+ root.getRelative("Foo").toString(),
+ ImmutableList.of(new Dirent("Bar", Dirent.Type.DIRECTORY)));
+ d.put(
+ root.getRelative("Foo/Bar").toString(),
+ ImmutableList.of(
+ new Dirent("a.txt", Dirent.Type.FILE), new Dirent("b.dat", Dirent.Type.FILE)));
+ return d;
+ }
+
+ private static Map<String, FileStatus> mockStats(Path root) {
+ // Map keys must be Strings not Paths, lest they follow the host OS' case-sensitivity policy.
+ Map<String, FileStatus> d = root.getFileSystem().isGlobCaseSensitive()
+ ? new HashMap<>()
+ : new TreeMap<>((String x, String y) -> x.compareToIgnoreCase(y));
+ d.put(root.getParentDirectory().toString(), MockStat.DIR);
+ d.put(root.toString(), MockStat.DIR);
+ d.put(root.getRelative("Foo").toString(), MockStat.DIR);
+ d.put(root.getRelative("Foo/Bar").toString(), MockStat.DIR);
+ d.put(root.getRelative("Foo/Bar/a.txt").toString(), MockStat.FILE);
+ d.put(root.getRelative("Foo/Bar/b.dat").toString(), MockStat.FILE);
+ return d;
+ }
+
+ private static UnixGlob.FilesystemCalls mockFsCalls(Path root) {
+ return new UnixGlob.FilesystemCalls() {
+ // These maps use case-sensitive or case-insensitive key comparison depending on
+ // root.getFileSystem().isGlobCaseSensitive()
+ private final Map<String, Collection<Dirent>> dirents = mockDirents(root);
+ private final Map<String, FileStatus> stats = mockStats(root);
+
+ @Override
+ public Collection<Dirent> readdir(Path path) throws IOException {
+ String p = path.toString();
+ if (dirents.containsKey(p)) {
+ return dirents.get(p);
+ }
+ throw new IOException(p);
+ }
+
+ @Override
+ public FileStatus statIfFound(Path path, Symlinks symlinks) throws IOException {
+ String p = path.toString();
+ if (stats.containsKey(p)) {
+ return stats.get(p);
+ }
+ return MockStat.UNKNOWN;
+ }
+
+ @Override
+ public Dirent.Type getType(Path path, Symlinks symlinks) throws IOException {
+ String p = path.toString();
+ if (dirents.containsKey(p)) {
+ for (Dirent d : dirents.get(p)) {
+ if (d.getName().equals(path.getBaseName())) {
+ return d.getType();
+ }
+ }
+ }
+ throw new IOException(p);
+ }
+ };
+ }
+
+ @Test
+ public void testFoo() throws Exception {
+ FileSystem unixFs = mockFs(/* caseSensitive */ true);
+ FileSystem winFs = mockFs(/* caseSensitive */ false);
+
+ Path unixRoot = unixFs.getPath("/globtmp");
+ Path winRoot = winFs.getPath("/globtmp");
+
+ Path unixRoot2 = unixFs.getPath("/globTMP");
+ Path winRoot2 = winFs.getPath("/globTMP");
+
+ UnixGlob.FilesystemCalls unixFsCalls = mockFsCalls(unixRoot);
+ UnixGlob.FilesystemCalls winFsCalls = mockFsCalls(winRoot);
+
+ // Try a simple, non-recursive glob that matches no files. (Directories are exluded.)
+ assertMatches(unixFsCalls, unixRoot, "Foo/*");
+ assertMatches(winFsCalls, winRoot, "Foo/*");
+
+ // Try a simple, non-recursive glob that should match some files.
+ assertMatches(unixFsCalls, unixRoot, "Foo/*/*", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+ assertMatches(winFsCalls, winRoot, "Foo/*/*", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // Try a recursive glob.
+ assertMatches(unixFsCalls, unixRoot, "Foo/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+ assertMatches(winFsCalls, winRoot, "Foo/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // Try a recursive glob, but use incorrect casing in the pattern.
+ // The results retain the casing of the pattern ("foO") because the glob logic checks its
+ // existence with 'statIfFound', and uses the name from the pattern.
+ // The **-matched parts use the actual casing ("Bar") because the glob does a 'readdir' to get
+ // these.
+ assertMatches(unixFsCalls, unixRoot, "foO/**");
+ assertMatches(winFsCalls, winRoot, "foO/**", "foO/Bar/a.txt", "foO/Bar/b.dat");
+
+ // Try the same with another path component in the glob pattern. The casing of that pattern
+ // should be retained in the results.
+ assertMatches(unixFsCalls, unixRoot, "foO/baR/*");
+ assertMatches(winFsCalls, winRoot, "foO/baR/*", "foO/baR/a.txt", "foO/baR/b.dat");
+
+ // Even if the root's casing is incorrect, the case-insensitive glob should match it.
+ assertMatches(unixFsCalls, unixRoot2, "**");
+ assertMatches(winFsCalls, winRoot2, "**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // Try again the "wrong" root with a "wrong" first component. The result should retain the
+ // casing.
+ assertMatches(unixFsCalls, unixRoot2, "foO/**");
+ assertMatches(winFsCalls, winRoot2, "foO/**", "foO/Bar/a.txt", "foO/Bar/b.dat");
+
+ // Try the same with more "wrong" path components in the pattern. The results should retain all
+ // the casing.
+ assertMatches(unixFsCalls, unixRoot2, "foO/baR/A.TXT");
+ assertMatches(winFsCalls, winRoot2, "foO/baR/A.TXT", "foO/baR/A.TXT");
+
+ // Try a so-called "complex" in the file name. The glob logic creates a regex for this, and
+ // matches that against the result of a 'readdir', so the result retains the filesystem casing.
+ assertMatches(unixFsCalls, unixRoot, "foO/baR/**");
+ assertMatches(winFsCalls, winRoot, "foO/baR/**/*.TXT", "foO/baR/a.txt");
+
+ // Try the same for a directory component. Again, because the glob logic matches a regex against
+ // the results of a 'readdir', the result should use the filesystem casing, not the pattern
+ // casing.
+ assertMatches(unixFsCalls, unixRoot, "F*o*o/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+ assertMatches(winFsCalls, winRoot, "F*o*o/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // A "complex" first token with the wrong casing.
+ assertMatches(unixFsCalls, unixRoot, "f*o*O/**");
+ assertMatches(winFsCalls, winRoot, "f*o*O/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // A "complex" first pattern with the right casing, but wrongly-cased root.
+ assertMatches(unixFsCalls, unixRoot2, "F*o*o/**");
+ assertMatches(winFsCalls, winRoot2, "F*o*o/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+
+ // A "complex" first pattern with the wrong casing and wrongly-cased root.
+ assertMatches(unixFsCalls, unixRoot2, "f*o*O/**");
+ assertMatches(winFsCalls, winRoot2, "f*o*O/**", "Foo/Bar/a.txt", "Foo/Bar/b.dat");
+ }
+
+ @Test
+ public void testStartsWithCase() {
+ assertThat(UnixGlob.startsWithCase("", "", true)).isTrue();
+ assertThat(UnixGlob.startsWithCase("", "", false)).isTrue();
+
+ assertThat(UnixGlob.startsWithCase("Foo", "", true)).isTrue();
+ assertThat(UnixGlob.startsWithCase("Foo", "", false)).isTrue();
+
+ assertThat(UnixGlob.startsWithCase("", "Foo", true)).isFalse();
+ assertThat(UnixGlob.startsWithCase("", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.startsWithCase("Fo", "Foo", true)).isFalse();
+ assertThat(UnixGlob.startsWithCase("Fo", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.startsWithCase("Foo", "Foo", true)).isTrue();
+ assertThat(UnixGlob.startsWithCase("Foo", "Foo", false)).isTrue();
+
+ assertThat(UnixGlob.startsWithCase("Foox", "Foo", true)).isTrue();
+ assertThat(UnixGlob.startsWithCase("Foox", "Foo", false)).isTrue();
+
+ assertThat(UnixGlob.startsWithCase("xFoo", "Foo", true)).isFalse();
+ assertThat(UnixGlob.startsWithCase("xFoo", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.startsWithCase("Foox", "foO", true)).isFalse();
+ assertThat(UnixGlob.startsWithCase("Foox", "foO", false)).isTrue();
+ }
+
+ @Test
+ public void testEndsWithCase() {
+ assertThat(UnixGlob.endsWithCase("", "", true)).isTrue();
+ assertThat(UnixGlob.endsWithCase("", "", false)).isTrue();
+
+ assertThat(UnixGlob.endsWithCase("Foo", "", true)).isTrue();
+ assertThat(UnixGlob.endsWithCase("Foo", "", false)).isTrue();
+
+ assertThat(UnixGlob.endsWithCase("", "Foo", true)).isFalse();
+ assertThat(UnixGlob.endsWithCase("", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.endsWithCase("Fo", "Foo", true)).isFalse();
+ assertThat(UnixGlob.endsWithCase("Fo", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.endsWithCase("Foo", "Foo", true)).isTrue();
+ assertThat(UnixGlob.endsWithCase("Foo", "Foo", false)).isTrue();
+
+ assertThat(UnixGlob.endsWithCase("Foox", "Foo", true)).isFalse();
+ assertThat(UnixGlob.endsWithCase("Foox", "Foo", false)).isFalse();
+
+ assertThat(UnixGlob.endsWithCase("xFoo", "Foo", true)).isTrue();
+ assertThat(UnixGlob.endsWithCase("xFoo", "Foo", false)).isTrue();
+
+ assertThat(UnixGlob.endsWithCase("xFoo", "foO", true)).isFalse();
+ assertThat(UnixGlob.endsWithCase("xFoo", "foO", false)).isTrue();
+ }
+}
| test | train | 2019-07-01T21:35:58 | "2019-07-02T10:10:28Z" | laszlocsomor | test |
bazelbuild/bazel/8842_8853 | bazelbuild/bazel | bazelbuild/bazel/8842 | bazelbuild/bazel/8853 | [
"timestamp(timedelta=0.0, similarity=0.856552085349893)"
] | 37824ac264e5569e08b69341b7a838cdce94acc9 | ac70bc94fa74a2eacf2b7f4020419feab742a705 | [
"I used `build_file_content` as workaround instead."
] | [] | "2019-07-10T18:12:58Z" | [
"P1",
"team-Rules-CPP"
] | Outdated docs for configuring C++ toolchains | ### Description of the problem / feature request:
`emscripten` could not be configured as it's described in tutorial in docs:
* https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html
```
example@docker:~/examples/cpp-tutorial/stage1$ bazel build --config=asmjs //main:helloworld.js
INFO: SHA256 (https://github.com/kripken/emscripten/archive/1.37.22.tar.gz) = 433dedb63ba423cf04bbc9802b49fa842bd479bad31a339db9506614e92334c7
INFO: SHA256 (https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/linux_64bit/emscripten-llvm-e1.37.22.tar.gz) = fd457ebfbe5a727058880ff55cdabf7f1b7809aea07957d2cc854e7de3001ef3
INFO: Call stack for the definition of repository 'emscripten_toolchain' which is a http_archive (rule definition at /home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/http.bzl:237:16):
- /home/example/examples/cpp-tutorial/stage1/WORKSPACE:3:1
ERROR: An error occurred during the fetch of repository 'emscripten_toolchain':
Traceback (most recent call last):
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 57
workspace_and_buildfile(ctx)
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 61, in workspace_and_buildfile
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
Unable to load package for //:emscripten-toolchain.BUILD: BUILD file not found in any of the following directories.
- /home/example/examples/cpp-tutorial/stage1
ERROR: /home/example/examples/cpp-tutorial/stage1/toolchain/BUILD:14:1: no such package '@emscripten_toolchain//': Traceback (most recent call last):
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 57
workspace_and_buildfile(ctx)
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 61, in workspace_and_buildfile
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
Unable to load package for //:emscripten-toolchain.BUILD: BUILD file not found in any of the following directories.
- /home/example/examples/cpp-tutorial/stage1 and referenced by '//toolchain:all'
ERROR: Analysis of target '//main:helloworld.js' failed; build aborted: no such package '@emscripten_toolchain//': Traceback (most recent call last):
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 57
workspace_and_buildfile(ctx)
File "/home/example/.cache/bazel/_bazel_example/f398d85a4189d668d83b95c96638982b/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 61, in workspace_and_buildfile
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
Unable to load package for //:emscripten-toolchain.BUILD: BUILD file not found in any of the following directories.
- /home/example/examples/cpp-tutorial/stage1
INFO: Elapsed time: 109.938s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Fetching @emscripten_clang; fetching 109s
```
Both `*.BUILD` files were created in WORKSPACE directory root:
```
$ tree
.
├── emscripten-clang.BUILD
├── emscripten-toolchain.BUILD
├── main
│ ├── BUILD
│ └── hello-world.cc
├── README.md
├── toolchain
│ ├── BUILD
│ ├── cc_toolchain_config.bzl
│ └── emcc.sh
└── WORKSPACE
```
```
example@docker:~/examples/cpp-tutorial/stage1$ cat emscripten-toolchain.BUILD
package(default_visibility = ['//visibility:public'])
filegroup(
name = "all",
srcs = glob(["**/*"]),
)
```
```
example@docker:~/examples/cpp-tutorial/stage1$ cat emscripten-toolchain.BUILD
package(default_visibility = ['//visibility:public'])
filegroup(
name = "all",
srcs = glob(["**/*"]),
)
```
### What operating system are you running Bazel on?
`Ubuntu 12.04.5 LTS`
### What's the output of `bazel info release`?
`release 0.27.1`
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
```
https://github.com/bazelbuild/examples.git
5d8c8961a2516ebf875787df35e98cadd08d43dc
5d8c8961a2516ebf875787df35e98cadd08d43dc
```
### Any other information, logs, or outputs that you want to share?
I updated couple places in docs so far in this PR:
* https://github.com/bazelbuild/bazel/pull/8841 | [
"site/docs/tutorial/cc-toolchain-config.md"
] | [
"site/docs/tutorial/cc-toolchain-config.md"
] | [] | diff --git a/site/docs/tutorial/cc-toolchain-config.md b/site/docs/tutorial/cc-toolchain-config.md
index c971271a176579..6cebaeba71e276 100644
--- a/site/docs/tutorial/cc-toolchain-config.md
+++ b/site/docs/tutorial/cc-toolchain-config.md
@@ -332,6 +332,13 @@ using an older release of Bazel, look for the "Configuring CROSSTOOL" tutorial.
In the workspace directory root, create the `emscripten-toolchain.BUILD` and
`emscripten-clang.BUILD` files that expose these repositories as filegroups
and establish their visibility across the build.
+
+ Make sure that in the workspace directory root `BUILD` file is present, if it's
+ missing create it empty:
+
+ ```
+ touch BUILD
+ ```
First create the `emscripten-toolchain.BUILD` file with the following
contents:
| null | train | train | 2019-07-10T19:55:58 | "2019-07-09T20:57:48Z" | alexanderilyin | test |
bazelbuild/bazel/8871_8918 | bazelbuild/bazel | bazelbuild/bazel/8871 | bazelbuild/bazel/8918 | [
"timestamp(timedelta=0.0, similarity=0.8969837483467104)"
] | 66a577385539887743bd99b9239b9b70fc55b4f8 | dea685e8bd6c1ddfc402b2649a006d2fe6acd7d4 | [
"I got it to work by adding the following in a custom build file:\r\n```\r\ntoolchain(\r\n name = \"android\",\r\n target_compatible_with = [\r\n \"@bazel_tools//platforms:android\",\r\n \"@bazel_tools//platforms:aarch64\",\r\n ],\r\n toolchain = \"@androidndk//:aarch64-linux-android-clang7.0.2-libcpp\",\r\n toolchain_type = \"@bazel_tools//tools/cpp:toolchain_type\",\r\n)\r\n```\r\n\r\nAnd then adding:\r\n```\r\n--extra_toolchains=//:android\r\n```",
"The work to migrate the Android NDK rule to toolchains / platforms is ongoing. It may not happen for the native version of `android_ndk_repository` but will happen for the Starlark version.",
"@ahumesky the problem though is that crosstool_top is ignored when platforms are used it seems (in this case the platform is constraining on `android` and `aarch64`).",
"I took a stab at this: https://github.com/bazelbuild/bazel/pull/8918"
] | [
"Why can't the existing android_ndk_repository rule handle this directly?",
"How do you register toolchains from a native RepositoryFunction? ",
"There's no direct native equivalent to `register_toolchains`, but it wouldn't be hard to add. I feel like the improved usability would be helpful (but this could be in a separate change).",
"nit: \"Registering these toolchains tells Bazel to look for them in ...\"",
"\t\r\nhmm, should we throw an error instead of defaulting to x86_64? e.g. if someone tries to select mips, or has a typo?"
] | "2019-07-17T15:11:52Z" | [
"P2",
"team-Android"
] | androidndk doesn't register toolchains | ### Description of the problem / feature request:
`@androidndk` toolchains/compiler are not registered, and thus skipped from toolchain resolution.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Clone https://github.com/steeve/rules_go_bazel_toolchains and run following command
```
$ bazel build --config=android_arm64 //:main_cc
```
When removing the `--platforms` from the bazelrc (thus removing constraints), the build succeeds.
### What operating system are you running Bazel on?
macos
### What's the output of `bazel info release`?
`release 0.28.0`
### Have you found anything relevant by searching the web?
https://github.com/bazelbuild/rules_go/issues/2089#issuecomment-510668841
### Any other information, logs, or outputs that you want to share?
All is at https://github.com/bazelbuild/rules_go/issues/2089#issuecomment-510663447 | [
"site/docs/android-ndk.md",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt"
] | [
"site/docs/android-ndk.md",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt"
] | [
"src/test/shell/bazel/android/android_ndk_integration_test.sh"
] | diff --git a/site/docs/android-ndk.md b/site/docs/android-ndk.md
index b75ca67d11e0de..d9fa1257388dec 100644
--- a/site/docs/android-ndk.md
+++ b/site/docs/android-ndk.md
@@ -255,6 +255,77 @@ cc_library(
)
```
+## Integration with platforms and toolchains
+
+Bazel's configuration model is moving towards
+[platforms](https://docs.bazel.build/versions/master/platforms.html) and
+[toolchains](https://docs.bazel.build/versions/master/toolchains.html). If your
+build uses the `--platforms` flag to select for the architecture or operating system
+to build for, you will need to pass the `--extra_toolchains` flag to Bazel in
+order to use the NDK.
+
+For example, to integrate with the `android_arm64_cgo` toolchain provided by
+the Go rules, pass `--extra_toolchains=@androidndk//:all` in addition to the
+`--platforms` flag.
+
+```
+bazel build //my/cc:lib \
+ --platforms=@io_bazel_rules_go//go/toolchain:android_arm64_cgo \
+ --extra_toolchains=@androidndk//:all
+```
+
+You can also register them directly in the `WORKSPACE` file:
+
+```python
+android_ndk_repository(name = "androidndk")
+register_toolchains("@androidndk//:all")
+```
+
+By registering these toolchains, you're telling Bazel to look for these in the NDK BUILD file
+(for NDK 20) when resolving architecture and operating system constraints:
+
+```python
+toolchain(
+ name = "x86-clang8.0.7-libcpp_toolchain",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+ target_compatible_with = [
+ "@bazel_tools//platforms:android",
+ "@bazel_tools//platforms:x86_32"
+ ],
+ toolchain = "@androidndk//:x86-clang8.0.7-libcpp",
+)
+
+toolchain(
+ name = "x86_64-clang8.0.7-libcpp_toolchain",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+ target_compatible_with = [
+ "@bazel_tools//platforms:android",
+ "@bazel_tools//platforms:x86_64"
+ ],
+ toolchain = "@androidndk//:x86_64-clang8.0.7-libcpp",
+)
+
+toolchain(
+ name = "arm-linux-androideabi-clang8.0.7-v7a-libcpp_toolchain",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+ target_compatible_with = [
+ "@bazel_tools//platforms:android",
+ "@bazel_tools//platforms:arm"
+ ],
+ toolchain = "@androidndk//:arm-linux-androideabi-clang8.0.7-v7a-libcpp",
+)
+
+toolchain(
+ name = "aarch64-linux-android-clang8.0.7-libcpp_toolchain",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+ target_compatible_with = [
+ "@bazel_tools//platforms:android",
+ "@bazel_tools//platforms:aarch64"
+ ],
+ toolchain = "@androidndk//:aarch64-linux-android-clang8.0.7-libcpp",
+)
+```
+
## How it works: introducing Android configuration transitions
The `android_binary` rule can explicitly ask Bazel to build its dependencies in
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
index 375104ed4699ff..2629b38f05a3b4 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
@@ -201,6 +201,7 @@ private static String createCcToolchainRule(
return ccToolchainTemplate
.replace("%toolchainName%", toolchain.getToolchainIdentifier())
.replace("%cpu%", toolchain.getTargetCpu())
+ .replace("%platform_cpu%", getPlatformCpuLabel(toolchain.getTargetCpu()))
.replace("%compiler%", toolchain.getCompiler())
.replace("%version%", version)
.replace("%dynamicRuntimeLibs%", toolchain.getDynamicRuntimesFilegroup())
@@ -209,6 +210,17 @@ private static String createCcToolchainRule(
.replace("%toolchainFileGlobs%", toolchainFileGlobs.toString().trim());
}
+ private static String getPlatformCpuLabel(String targetCpu) {
+ // Create a mapping of CcToolchain CPU values to platform arch constraint values
+ // in @bazel_tools//platforms
+ switch (targetCpu) {
+ case "x86": return "x86_32";
+ case "armeabi-v7a": return "arm";
+ case "arm64-v8a": return "aarch64";
+ default: return "x86_64";
+ }
+ }
+
private static String getTemplate(String templateFile) {
try {
return ResourceFileLoader.loadResource(AndroidNdkRepositoryFunction.class, templateFile);
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
index d9bd1521568b41..d622f0c9626280 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
@@ -26,6 +26,16 @@ cc_toolchain_config(
version = "%version%",
)
+toolchain(
+ name = "%toolchainName%_toolchain",
+ target_compatible_with = [
+ "@bazel_tools//platforms:android",
+ "@bazel_tools//platforms:%platform_cpu%",
+ ],
+ toolchain = "@androidndk//:%toolchainName%",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+)
+
filegroup(
name = "%toolchainName%-all_files",
srcs = glob(["ndk/toolchains/%toolchainDirectory%/**"]) + glob([
| diff --git a/src/test/shell/bazel/android/android_ndk_integration_test.sh b/src/test/shell/bazel/android/android_ndk_integration_test.sh
index c8e85e7ee304a4..2172ed6c54aa85 100755
--- a/src/test/shell/bazel/android/android_ndk_integration_test.sh
+++ b/src/test/shell/bazel/android/android_ndk_integration_test.sh
@@ -400,6 +400,44 @@ EOF
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain
}
+function test_platforms_and_toolchains() {
+ create_new_workspace
+ setup_android_ndk_support
+ cat > BUILD <<EOF
+cc_binary(
+ name = "foo",
+ srcs = ["foo.cc"],
+ linkopts = ["-ldl", "-lm"],
+)
+
+platform(
+ name = 'android_arm',
+ constraint_values = ['@bazel_tools//platforms:arm', '@bazel_tools//platforms:android'],
+ visibility = ['//visibility:public'])
+EOF
+ cat > foo.cc <<EOF
+#include <string>
+#include <jni.h>
+#include <android/log.h>
+#include <cstdio>
+#include <iostream>
+
+using namespace std;
+int main(){
+ string foo = "foo";
+ string bar = "bar";
+ string foobar = foo + bar;
+ return 0;
+}
+EOF
+ assert_build //:foo \
+ --cpu=armeabi-v7a \
+ --crosstool_top=@androidndk//:toolchain-libcpp \
+ --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
+ --platforms=//:android_arm \
+ --extra_toolchains=@androidndk//:all
+}
+
function test_crosstool_libcpp_with_multiarch() {
create_new_workspace
setup_android_sdk_support
| train | train | 2019-07-17T17:04:04 | "2019-07-11T22:13:39Z" | steeve | test |
bazelbuild/bazel/8899_9298 | bazelbuild/bazel | bazelbuild/bazel/8899 | bazelbuild/bazel/9298 | [
"timestamp(timedelta=0.0, similarity=0.8421463928137695)"
] | 403496540806f3f5404e20919202e28fb4b68f18 | 2f4ed9cc2064502a72c8316e3cc557cbc471294a | [
"Thanks for filing the issue. I see what you mean now. You are indeed correct the run command is not supported (yet).",
"Hi @buchgr,\r\n\r\nI just wanted to give a quick ping on this issue. Can you think of any workaround? We have a deploy target that we generally run from our CI, but we are unable to run it without turning off minimal downloads and trigger a full rebuild.\r\n\r\n",
"I wrote a patch that should make it work. Can you give it a try please: https://github.com/bazelbuild/bazel/pull/9298?"
] | [] | "2019-08-30T14:54:21Z" | [
"type: feature request",
"team-Remote-Exec"
] | support run command for experimental_remote_download_outputs | ### Description of the problem / feature request:
experimental_remote_download_outputs does not properly download all runtime dependencies.
### Feature requests: what underlying problem are you trying to solve with this feature?
Attempting to use the new remote builds without the bytes (#6862)
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/phb/bazel_minimal_missingrunfiles
and specifically see
https://github.com/phb/bazel_minimal_missingrunfiles/blob/master/EXAMPLE_OUTPUT
### What operating system are you running Bazel on?
macosx.
### What's the output of `bazel info release`?
Tried various versions including latest HEAD as of today.
This was initially reported in #6862 and split into it's own ticket. CC @buchgr | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java",
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java",
"src/main/java/com/google/devtools/build/lib/remote/util/Utils.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java",
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java",
"src/main/java/com/google/devtools/build/lib/remote/util/Utils.java"
] | [
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
index 4f0fb92bef4be8..535bba18a467d6 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
@@ -49,7 +49,7 @@ final class RemoteActionContextProvider extends ActionContextProvider {
private final DigestUtil digestUtil;
@Nullable private final Path logDir;
private final AtomicReference<SpawnRunner> fallbackRunner = new AtomicReference<>();
- private ImmutableSet<ActionInput> topLevelOutputs = ImmutableSet.of();
+ private ImmutableSet<ActionInput> filesToDownload = ImmutableSet.of();
private RemoteActionContextProvider(
CommandEnvironment env,
@@ -103,7 +103,7 @@ public Iterable<? extends ActionContext> getActionContexts() {
commandId,
env.getReporter(),
digestUtil,
- topLevelOutputs);
+ filesToDownload);
return ImmutableList.of(spawnCache);
} else {
RemoteSpawnRunner spawnRunner =
@@ -121,7 +121,7 @@ public Iterable<? extends ActionContext> getActionContexts() {
retrier,
digestUtil,
logDir,
- topLevelOutputs);
+ filesToDownload);
return ImmutableList.of(new RemoteSpawnStrategy(env.getExecRoot(), spawnRunner));
}
}
@@ -171,8 +171,8 @@ AbstractRemoteActionCache getRemoteCache() {
return cache;
}
- void setTopLevelOutputs(ImmutableSet<ActionInput> topLevelOutputs) {
- this.topLevelOutputs = Preconditions.checkNotNull(topLevelOutputs, "topLevelOutputs");
+ void setFilesToDownload(ImmutableSet<ActionInput> topLevelOutputs) {
+ this.filesToDownload = Preconditions.checkNotNull(topLevelOutputs, "filesToDownload");
}
@Override
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
index 7140b402bab535..54e60b7e4b2815 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
@@ -20,10 +20,14 @@
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.ListeningScheduledExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.devtools.build.lib.actions.ActionInput;
+import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
+import com.google.devtools.build.lib.analysis.FilesToRunProvider;
+import com.google.devtools.build.lib.analysis.RunfilesSupport;
import com.google.devtools.build.lib.analysis.TopLevelArtifactContext;
import com.google.devtools.build.lib.analysis.TopLevelArtifactHelper;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
@@ -316,44 +320,41 @@ public void beforeCommand(CommandEnvironment env) throws AbruptExitException {
}
}
- @Override
- public void afterAnalysis(
- CommandEnvironment env,
- BuildRequest request,
- BuildOptions buildOptions,
- Iterable<ConfiguredTarget> configuredTargets,
- ImmutableSet<AspectValue> aspects) {
- if (remoteOutputsMode != null && remoteOutputsMode.downloadToplevelOutputsOnly()) {
- Preconditions.checkState(actionContextProvider != null, "actionContextProvider was null");
- // Collect all top level output artifacts of regular targets as well as aspects. This
- // information is used by remote spawn runners to decide whether to download an artifact
- // if --experimental_remote_download_outputs=toplevel is set
- ImmutableSet.Builder<ActionInput> topLevelOutputsBuilder = ImmutableSet.builder();
- for (ConfiguredTarget configuredTarget : configuredTargets) {
- topLevelOutputsBuilder.addAll(
- getTopLevelTargetOutputs(
- configuredTarget, request.getTopLevelArtifactContext(), env.getCommandName()));
+ private static ImmutableList<Artifact> getRunfiles(ConfiguredTarget buildTarget) {
+ FilesToRunProvider runfilesProvider = buildTarget.getProvider(FilesToRunProvider.class);
+ if (runfilesProvider == null) {
+ return ImmutableList.of();
+ }
+ RunfilesSupport runfilesSupport = runfilesProvider.getRunfilesSupport();
+ if (runfilesSupport == null) {
+ return ImmutableList.of();
+ }
+ boolean noPruningManifestsInBazel =
+ Iterables.isEmpty(runfilesSupport.getRunfiles().getPruningManifests());
+ Preconditions.checkState(noPruningManifestsInBazel,
+ "Bazel should not have pruning manifests. This is a bug.");
+ ImmutableList.Builder<Artifact> runfilesBuilder = ImmutableList.builder();
+ for (Artifact runfile : runfilesSupport.getRunfiles().getUnconditionalArtifacts()) {
+ if (runfile.isSourceArtifact()) {
+ continue;
}
- actionContextProvider.setTopLevelOutputs(topLevelOutputsBuilder.build());
+ runfilesBuilder.add(runfile);
}
+ return runfilesBuilder.build();
}
- /** Returns a list of build or test outputs produced by the configured target. */
- private ImmutableList<ActionInput> getTopLevelTargetOutputs(
- ConfiguredTarget configuredTarget,
- TopLevelArtifactContext topLevelArtifactContext,
- String commandName) {
- if (commandName.equals("test") && isTestRule(configuredTarget)) {
- TestProvider testProvider = configuredTarget.getProvider(TestProvider.class);
- if (testProvider == null) {
- return ImmutableList.of();
- }
- return testProvider.getTestParams().getOutputs();
- } else {
- return ImmutableList.copyOf(
- TopLevelArtifactHelper.getAllArtifactsToBuild(configuredTarget, topLevelArtifactContext)
- .getImportantArtifacts());
+ private static ImmutableList<ActionInput> getTestOutputs(ConfiguredTarget testTarget) {
+ TestProvider testProvider = testTarget.getProvider(TestProvider.class);
+ if (testProvider == null) {
+ return ImmutableList.of();
}
+ return testProvider.getTestParams().getOutputs();
+ }
+
+ private static Iterable<? extends ActionInput> getArtifactsToBuild(ConfiguredTarget buildTarget,
+ TopLevelArtifactContext topLevelArtifactContext) {
+ return TopLevelArtifactHelper.getAllArtifactsToBuild(buildTarget, topLevelArtifactContext)
+ .getImportantArtifacts();
}
private static boolean isTestRule(ConfiguredTarget configuredTarget) {
@@ -364,6 +365,31 @@ private static boolean isTestRule(ConfiguredTarget configuredTarget) {
return false;
}
+ @Override
+ public void afterAnalysis(
+ CommandEnvironment env,
+ BuildRequest request,
+ BuildOptions buildOptions,
+ Iterable<ConfiguredTarget> configuredTargets,
+ ImmutableSet<AspectValue> aspects) {
+ if (remoteOutputsMode != null && remoteOutputsMode.downloadToplevelOutputsOnly()) {
+ Preconditions.checkState(actionContextProvider != null, "actionContextProvider was null");
+ boolean isTestCommand = env.getCommandName().equals("test");
+ TopLevelArtifactContext artifactContext = request.getTopLevelArtifactContext();
+ ImmutableSet.Builder<ActionInput> filesToDownload = ImmutableSet.builder();
+ for (ConfiguredTarget configuredTarget : configuredTargets) {
+ if (isTestCommand && isTestRule(configuredTarget)) {
+ // When running a test download the test.log and test.xml.
+ filesToDownload.addAll(getTestOutputs(configuredTarget));
+ } else {
+ filesToDownload.addAll(getArtifactsToBuild(configuredTarget, artifactContext));
+ filesToDownload.addAll(getRunfiles(configuredTarget));
+ }
+ }
+ actionContextProvider.setFilesToDownload(filesToDownload.build());
+ }
+ }
+
private static void cleanAndCreateRemoteLogsDir(Path logDir) throws AbruptExitException {
try {
// Clean out old logs files.
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index d24d5d5383cd79..4d738d57b5c49e 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -16,7 +16,7 @@
import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.devtools.build.lib.remote.util.Utils.createSpawnResult;
import static com.google.devtools.build.lib.remote.util.Utils.getInMemoryOutputPath;
-import static com.google.devtools.build.lib.remote.util.Utils.hasTopLevelOutputs;
+import static com.google.devtools.build.lib.remote.util.Utils.hasFilesToDownload;
import static com.google.devtools.build.lib.remote.util.Utils.shouldDownloadAllSpawnOutputs;
import build.bazel.remote.execution.v2.Action;
@@ -85,12 +85,10 @@ final class RemoteSpawnCache implements SpawnCache {
private final DigestUtil digestUtil;
/**
- * Set of artifacts that are top level outputs
- *
- * <p>This set is empty unless {@link RemoteOutputsMode#TOPLEVEL} is specified. If so, this set is
- * used to decide whether to download an output.
+ * If {@link RemoteOutputsMode#TOPLEVEL} is specified it contains the artifacts that should be
+ * downloaded.
*/
- private final ImmutableSet<ActionInput> topLevelOutputs;
+ private final ImmutableSet<ActionInput> filesToDownload;
RemoteSpawnCache(
Path execRoot,
@@ -100,7 +98,7 @@ final class RemoteSpawnCache implements SpawnCache {
String commandId,
@Nullable Reporter cmdlineReporter,
DigestUtil digestUtil,
- ImmutableSet<ActionInput> topLevelOutputs) {
+ ImmutableSet<ActionInput> filesToDownload) {
this.execRoot = execRoot;
this.options = options;
this.remoteCache = remoteCache;
@@ -108,7 +106,7 @@ final class RemoteSpawnCache implements SpawnCache {
this.buildRequestId = buildRequestId;
this.commandId = commandId;
this.digestUtil = digestUtil;
- this.topLevelOutputs = Preconditions.checkNotNull(topLevelOutputs, "topLevelOutputs");
+ this.filesToDownload = Preconditions.checkNotNull(filesToDownload, "filesToDownload");
}
@Override
@@ -164,7 +162,7 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
shouldDownloadAllSpawnOutputs(
remoteOutputsMode,
/* exitCode = */ 0,
- hasTopLevelOutputs(spawn.getOutputFiles(), topLevelOutputs));
+ hasFilesToDownload(spawn.getOutputFiles(), filesToDownload));
if (downloadOutputs) {
try (SilentCloseable c =
prof.profile(ProfilerTask.REMOTE_DOWNLOAD, "download outputs")) {
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index 8ff410f230c67d..641212257d4d31 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -20,7 +20,7 @@
import static com.google.devtools.build.lib.remote.util.Utils.createSpawnResult;
import static com.google.devtools.build.lib.remote.util.Utils.getFromFuture;
import static com.google.devtools.build.lib.remote.util.Utils.getInMemoryOutputPath;
-import static com.google.devtools.build.lib.remote.util.Utils.hasTopLevelOutputs;
+import static com.google.devtools.build.lib.remote.util.Utils.hasFilesToDownload;
import static com.google.devtools.build.lib.remote.util.Utils.shouldDownloadAllSpawnOutputs;
import build.bazel.remote.execution.v2.Action;
@@ -107,12 +107,10 @@ public class RemoteSpawnRunner implements SpawnRunner {
private final Path logDir;
/**
- * Set of artifacts that are top level outputs
- *
- * <p>This set is empty unless {@link RemoteOutputsMode#TOPLEVEL} is specified. If so, this set is
- * used to decide whether to download an output.
+ * If {@link RemoteOutputsMode#TOPLEVEL} is specified it contains the artifacts that should be
+ * downloaded.
*/
- private final ImmutableSet<ActionInput> topLevelOutputs;
+ private final ImmutableSet<ActionInput> filesToDownload;
// Used to ensure that a warning is reported only once.
private final AtomicBoolean warningReported = new AtomicBoolean();
@@ -131,7 +129,7 @@ public class RemoteSpawnRunner implements SpawnRunner {
@Nullable RemoteRetrier retrier,
DigestUtil digestUtil,
Path logDir,
- ImmutableSet<ActionInput> topLevelOutputs) {
+ ImmutableSet<ActionInput> filesToDownload) {
this.execRoot = execRoot;
this.remoteOptions = remoteOptions;
this.executionOptions = executionOptions;
@@ -145,7 +143,7 @@ public class RemoteSpawnRunner implements SpawnRunner {
this.retrier = retrier;
this.digestUtil = digestUtil;
this.logDir = logDir;
- this.topLevelOutputs = Preconditions.checkNotNull(topLevelOutputs, "topLevelOutputs");
+ this.filesToDownload = Preconditions.checkNotNull(filesToDownload, "filesToDownload");
}
@Override
@@ -300,7 +298,7 @@ private SpawnResult downloadAndFinalizeSpawnResult(
shouldDownloadAllSpawnOutputs(
remoteOutputsMode,
/* exitCode = */ actionResult.getExitCode(),
- hasTopLevelOutputs(spawn.getOutputFiles(), topLevelOutputs));
+ hasFilesToDownload(spawn.getOutputFiles(), filesToDownload));
InMemoryOutput inMemoryOutput = null;
if (downloadOutputs) {
try (SilentCloseable c = Profiler.instance().profile(REMOTE_DOWNLOAD, "download outputs")) {
diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java
index d1bb3490a7906b..c163fe33799f34 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOutputsMode.java
@@ -27,9 +27,9 @@ public enum RemoteOutputsMode {
MINIMAL,
/**
- * Downloads outputs of top level targets, but generally not intermediate outputs. The only
- * intermediate outputs to be downloaded are .d and .jdeps files for C++ and Java compilation
- * actions.
+ * Downloads outputs of top level targets. Top level targets are targets specified on the command
+ * line. If a top level target has runfile dependencies it will also download those. Intermediate
+ * outputs are generally not downloaded (See {@link #MINIMAL}.
*/
TOPLEVEL;
diff --git a/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java b/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
index 422726a62d20c4..4d824e097f0b3a 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
@@ -101,12 +101,12 @@ public static boolean shouldDownloadAllSpawnOutputs(
}
/** Returns {@code true} if outputs contains one or more top level outputs. */
- public static boolean hasTopLevelOutputs(
- Collection<? extends ActionInput> outputs, ImmutableSet<ActionInput> topLevelOutputs) {
- if (topLevelOutputs.isEmpty()) {
+ public static boolean hasFilesToDownload(
+ Collection<? extends ActionInput> outputs, ImmutableSet<ActionInput> filesToDownload) {
+ if (filesToDownload.isEmpty()) {
return false;
}
- return !Collections.disjoint(outputs, topLevelOutputs);
+ return !Collections.disjoint(outputs, filesToDownload);
}
public static String grpcAwareErrorMessage(IOException e) {
| diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 2f0e0021f01530..3fcedff8ab956c 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -61,6 +61,23 @@ function tear_down() {
rm -rf "${cas_path}"
}
+case "$(uname -s | tr [:upper:] [:lower:])" in
+msys*|mingw*|cygwin*)
+ declare -r is_windows=true
+ ;;
+*)
+ declare -r is_windows=false
+ ;;
+esac
+
+if "$is_windows"; then
+ export MSYS_NO_PATHCONV=1
+ export MSYS2_ARG_CONV_EXCL="*"
+ declare -r EXE_EXT=".exe"
+else
+ declare -r EXE_EXT=""
+fi
+
function test_remote_grpc_cache_with_protocol() {
# Test that if 'grpc' is provided as a scheme for --remote_cache flag, remote cache works.
mkdir -p a
@@ -1042,6 +1059,78 @@ EOF
|| fail "Expected toplevel output bazel-bin/a/foobar.txt to be re-downloaded"
}
+function test_downloads_toplevel_runfiles() {
+ # Test that --experimental_remote_download_outputs=toplevel downloads the top level binary
+ # and generated runfiles.
+ mkdir -p a
+
+ cat > a/create_bar.tmpl <<'EOF'
+#!/bin/sh
+echo "bar runfiles"
+exit 0
+EOF
+
+ cat > a/foo.cc <<'EOF'
+#include <iostream>
+int main() { std::cout << "foo" << std::endl; return 0; }
+EOF
+
+ cat > a/BUILD <<'EOF'
+genrule(
+ name = "bar",
+ srcs = ["create_bar.tmpl"],
+ outs = ["create_bar.sh"],
+ cmd = "cat $(location create_bar.tmpl) > \"$@\"",
+)
+
+cc_binary(
+ name = "foo",
+ srcs = ["foo.cc"],
+ data = [":bar"],
+)
+EOF
+
+ bazel build \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --experimental_remote_download_toplevel \
+ //a:foo || fail "Failed to build //a:foobar"
+
+ [[ -f bazel-bin/a/foo${EXE_EXT} ]] \
+ || fail "Expected toplevel output bazel-bin/a/foo${EXE_EXT} to be downloaded"
+
+ [[ -f bazel-bin/a/create_bar.sh ]] \
+ || fail "Expected runfile bazel-bin/a/create_bar.sh to be downloaded"
+}
+
+function test_downloads_toplevel_src_runfiles() {
+ # Test that using --experimental_remote_download_outputs=toplevel with a non-generated (source)
+ # runfile dependency works.
+ mkdir -p a
+ cat > a/create_foo.sh <<'EOF'
+#!/bin/sh
+echo "foo runfiles"
+exit 0
+EOF
+ chmod +x a/create_foo.sh
+ cat > a/BUILD <<'EOF'
+genrule(
+ name = "foo",
+ srcs = [],
+ tools = ["create_foo.sh"],
+ outs = ["foo.txt"],
+ cmd = "./$(location create_foo.sh) > \"$@\"",
+)
+EOF
+
+ bazel build \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --experimental_remote_download_toplevel \
+ //a:foo || fail "Failed to build //a:foobar"
+
+ [[ -f bazel-bin/a/foo.txt ]] \
+ || fail "Expected toplevel output bazel-bin/a/foo.txt to be downloaded"
+}
+
function test_download_toplevel_test_rule() {
# Test that when using --experimental_remote_download_outputs=toplevel with bazel test only
# the test.log and test.xml file are downloaded but not the test binary. However when building
| val | train | 2019-09-02T12:07:40 | "2019-07-15T22:50:00Z" | phb | test |
bazelbuild/bazel/8899_9307 | bazelbuild/bazel | bazelbuild/bazel/8899 | bazelbuild/bazel/9307 | [
"timestamp(timedelta=59723.0, similarity=0.8513738939647085)"
] | 403496540806f3f5404e20919202e28fb4b68f18 | 3868ce83b902987e82b0d9624a2263c471aeac28 | [
"Thanks for filing the issue. I see what you mean now. You are indeed correct the run command is not supported (yet).",
"Hi @buchgr,\r\n\r\nI just wanted to give a quick ping on this issue. Can you think of any workaround? We have a deploy target that we generally run from our CI, but we are unable to run it without turning off minimal downloads and trigger a full rebuild.\r\n\r\n",
"I wrote a patch that should make it work. Can you give it a try please: https://github.com/bazelbuild/bazel/pull/9298?"
] | [] | "2019-09-02T11:10:10Z" | [
"type: feature request",
"team-Remote-Exec"
] | support run command for experimental_remote_download_outputs | ### Description of the problem / feature request:
experimental_remote_download_outputs does not properly download all runtime dependencies.
### Feature requests: what underlying problem are you trying to solve with this feature?
Attempting to use the new remote builds without the bytes (#6862)
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/phb/bazel_minimal_missingrunfiles
and specifically see
https://github.com/phb/bazel_minimal_missingrunfiles/blob/master/EXAMPLE_OUTPUT
### What operating system are you running Bazel on?
macosx.
### What's the output of `bazel info release`?
Tried various versions including latest HEAD as of today.
This was initially reported in #6862 and split into it's own ticket. CC @buchgr | [
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java"
] | [
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
index b03b2c136d2374..7f3167c55e72fc 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
@@ -235,7 +235,8 @@ public final class RemoteOptions extends OptionsBase {
public boolean allowSymlinkUpload;
@Option(
- name = "experimental_remote_download_outputs",
+ name = "remote_download_outputs",
+ oldName = "experimental_remote_download_outputs",
defaultValue = "all",
category = "remote",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
@@ -257,7 +258,8 @@ public RemoteOutputsStrategyConverter() {
}
@Option(
- name = "experimental_remote_download_minimal",
+ name = "remote_download_minimal",
+ oldName = "experimental_remote_download_minimal",
defaultValue = "null",
expansion = {
"--experimental_inmemory_jdeps_files",
@@ -275,7 +277,8 @@ public RemoteOutputsStrategyConverter() {
public Void remoteOutputsMinimal;
@Option(
- name = "experimental_remote_download_toplevel",
+ name = "remote_download_toplevel",
+ oldName = "experimental_remote_download_toplevel",
defaultValue = "null",
expansion = {
"--experimental_inmemory_jdeps_files",
| diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 2f0e0021f01530..7c781193b2d69e 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -805,7 +805,7 @@ EOF
function test_downloads_minimal() {
# Test that genrule outputs are not downloaded when using
- # --experimental_remote_download_outputs=minimal
+ # --remote_download_minimal
mkdir -p a
cat > a/BUILD <<'EOF'
genrule(
@@ -826,7 +826,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:foobar || fail "Failed to build //a:foobar"
(! [[ -f bazel-bin/a/foo.txt ]] && ! [[ -f bazel-bin/a/foobar.txt ]]) \
@@ -835,7 +835,7 @@ EOF
function test_downloads_minimal_failure() {
# Test that outputs of failing actions are downloaded when using
- # --experimental_remote_download_outputs=minimal
+ # --remote_download_minimal
mkdir -p a
cat > a/BUILD <<'EOF'
genrule(
@@ -849,7 +849,7 @@ EOF
bazel build \
--spawn_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:fail && fail "Expected test failure" || true
[[ -f bazel-bin/a/fail.txt ]] \
@@ -857,7 +857,7 @@ EOF
}
function test_downloads_minimal_prefetch() {
- # Test that when using --experimental_remote_download_outputs=minimal a remote-only output that's
+ # Test that when using --remote_download_minimal a remote-only output that's
# an input to a local action is downloaded lazily before executing the local action.
mkdir -p a
cat > a/BUILD <<'EOF'
@@ -880,7 +880,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:remote || fail "Failed to build //a:remote"
(! [[ -f bazel-bin/a/remote.txt ]]) \
@@ -889,7 +889,7 @@ EOF
bazel build \
--genrule_strategy=remote,local \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:local || fail "Failed to build //a:local"
localtxt="bazel-bin/a/local.txt"
@@ -901,7 +901,7 @@ EOF
}
function test_download_outputs_invalidation() {
- # Test that when changing values of --experimental_remote_download_outputs all actions are
+ # Test that when changing values of --remote_download_minimal all actions are
# invalidated.
mkdir -p a
cat > a/BUILD <<'EOF'
@@ -916,7 +916,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:remote >& $TEST_log || fail "Failed to build //a:remote"
expect_log "1 process: 1 remote"
@@ -924,16 +924,16 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_outputs=all \
+ --remote_download_outputs=all \
//a:remote >& $TEST_log || fail "Failed to build //a:remote"
- # Changing --experimental_remote_download_outputs to "all" should invalidate SkyFrames in-memory
+ # Changing --remote_download_outputs to "all" should invalidate SkyFrames in-memory
# caching and make it re-run the action.
expect_log "1 process: 1 remote"
}
function test_downloads_minimal_native_prefetch() {
- # Test that when using --experimental_remote_download_outputs=minimal a remotely stored output
+ # Test that when using --remote_download_outputs=minimal a remotely stored output
# that's an input to a native action (ctx.actions.expand_template) is staged lazily for action
# execution.
mkdir -p a
@@ -979,7 +979,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
//a:substitute-buchgr >& $TEST_log || fail "Failed to build //a:substitute-buchgr"
# The genrule //a:generate-template should run remotely and //a:substitute-buchgr
@@ -995,7 +995,7 @@ EOF
}
function test_downloads_toplevel() {
- # Test that when using --experimental_remote_download_outputs=toplevel only the output of the
+ # Test that when using --remote_download_outputs=toplevel only the output of the
# toplevel target is being downloaded.
mkdir -p a
cat > a/BUILD <<'EOF'
@@ -1017,7 +1017,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_toplevel \
+ --remote_download_toplevel \
//a:foobar || fail "Failed to build //a:foobar"
(! [[ -f bazel-bin/a/foo.txt ]]) \
@@ -1033,7 +1033,7 @@ EOF
bazel build \
--genrule_strategy=remote \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_toplevel \
+ --remote_download_toplevel \
//a:foobar >& $TEST_log || fail "Failed to build //a:foobar"
expect_log "1 process: 1 remote cache hit"
@@ -1043,7 +1043,7 @@ EOF
}
function test_download_toplevel_test_rule() {
- # Test that when using --experimental_remote_download_outputs=toplevel with bazel test only
+ # Test that when using --remote_download_toplevel with bazel test only
# the test.log and test.xml file are downloaded but not the test binary. However when building
# a test then the test binary should be downloaded.
@@ -1070,9 +1070,7 @@ EOF
# When invoking bazel test only test.log and test.xml should be downloaded.
bazel test \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_inmemory_jdeps_files \
- --experimental_inmemory_dotd_files \
- --experimental_remote_download_outputs=toplevel \
+ --remote_download_toplevel \
//a:test >& $TEST_log || fail "Failed to test //a:test with remote execution"
(! [[ -f bazel-bin/a/test ]]) \
@@ -1089,9 +1087,7 @@ EOF
# When invoking bazel build the test binary should be downloaded.
bazel build \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_inmemory_jdeps_files \
- --experimental_inmemory_dotd_files \
- --experimental_remote_download_outputs=toplevel \
+ --remote_download_toplevel \
//a:test >& $TEST_log || fail "Failed to build //a:test with remote execution"
([[ -f bazel-bin/a/test ]]) \
@@ -1099,7 +1095,7 @@ EOF
}
function test_downloads_minimal_bep() {
- # Test that when using --experimental_remote_download_outputs=minimal all URI's in the BEP
+ # Test that when using --remote_download_minimal all URI's in the BEP
# are rewritten as bytestream://..
mkdir -p a
cat > a/success.sh <<'EOF'
@@ -1123,7 +1119,7 @@ EOF
bazel test \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
--build_event_text_file=$TEST_log \
//a:foo //a:success_test || fail "Failed to test //a:foo //a:success_test"
@@ -1179,7 +1175,7 @@ chmod +x status.sh
bazel build \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
--workspace_status_command=status.sh \
//a:foo || "Failed to build //a:foo"
@@ -1190,7 +1186,7 @@ EOF
bazel build \
--remote_executor=grpc://localhost:${worker_port} \
- --experimental_remote_download_minimal \
+ --remote_download_minimal \
--workspace_status_command=status.sh \
//a:foo || "Failed to build //a:foo"
}
| train | train | 2019-09-02T12:07:40 | "2019-07-15T22:50:00Z" | phb | test |
bazelbuild/bazel/8934_8947 | bazelbuild/bazel | bazelbuild/bazel/8934 | bazelbuild/bazel/8947 | [
"timestamp(timedelta=1.0, similarity=0.8600812184559062)"
] | 8ef17990f607b9e57d6d4336b807d329f3c0fff9 | f001848c8fd7930c57e448327f9506579c20c8cf | [
"have you tried `--experimental_remote_download_outputs=toplevel`. I believe this does what you want :). Please re-open this bug if it doesn't.",
"@buchgr No `toplevel` is not what I want. I don't want test binaries are downloaded because they are fat, in Envoy it is around 80GB and even larger for sanitizer builds. This caused the RBE CI slowdown. `minimal` doesn't produce anything while `toplevel` downloads too much.\r\n\r\nCan you reopen the issue?",
"@lizan \r\n\r\n`bazel test //:foo --experimental_remote_download_outputs=toplevel` will only download test.log and test.xml. It won't download any binaries. Have you tested it and are seeing something else?",
"@buchgr Yes I did. Bazel downloads the binaries and it bursted CI. I had to add https://github.com/envoyproxy/envoy/blob/50fb561c23078e01efd4dc3852812efbf5ca8936/.bazelrc#L107.\r\n\r\nI just tried now again and it downloaded binary. The command I ran:\r\n```\r\nbazel test -c opt --config=remote-clang --config=remote-ci --remote_instance_name=<rbe-instance> --experimental_remote_download_outputs=toplevel //test/common/common:base64_test\r\n```\r\nat the commit above.",
"@lizan ahh I see what you mean. Thanks for the reproducer. Please note that with `minimal` it will download test.log and test.xml of failed tests but not of passed ones. I suppose this is not enough?\r\n\r\nUPDATE: I am looking into a fix.",
"Yeah I'd like to setup CI Test Summary like [this](https://dev.azure.com/cncf/envoy/_build/results?buildId=6209&view=ms.vss-test-web.build-test-results-tab) without download test binaries. So it will be nice to have all `test.log` and `test.xml` that ran remotely.\r\n",
"I have sent out https://github.com/bazelbuild/bazel/pull/8947 to address this issue. Maybe you could try it out on envoy?",
"I tested it with the command line you provided and things work fine!",
"Thanks @buchgr I was able to verify in Envoy."
] | [] | "2019-07-22T12:00:37Z" | [
"untriaged",
"team-Remote-Exec"
] | feature request: A mode for --experimental_remote_download_outputs to download testlogs only | ### Description of the problem / feature request:
### Feature requests: what underlying problem are you trying to solve with this feature?
While setting up Bazel RBE with Envoy CI, we want the CI download less artifacts from RBE to save network bandwidth and disk, while we want to be able to inspect testlogs individually.
Currently the setup is --test_output=all and --experimental_remote_download_outputs=minimal so all test outputs are printed to console, the test log are already downloaded but not write to the disk, it would be nice bazel-testlogs is set up, and better with test.xml, so CI system can interpret them.
### What operating system are you running Bazel on?
Ubuntu 16.04
### What's the output of `bazel info release`?
`release 0.28.0`
| [
"src/main/java/com/google/devtools/build/lib/remote/BUILD",
"src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java",
"src/main/java/com/google/devtools/build/lib/remote/util/Utils.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/BUILD",
"src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java",
"src/main/java/com/google/devtools/build/lib/remote/util/Utils.java"
] | [
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/BUILD b/src/main/java/com/google/devtools/build/lib/remote/BUILD
index 020c2cb3755613..cb4ae3fe036b49 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/remote/BUILD
@@ -19,6 +19,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:io",
"//src/main/java/com/google/devtools/build/lib:out-err",
+ "//src/main/java/com/google/devtools/build/lib:packages-internal",
"//src/main/java/com/google/devtools/build/lib:runtime",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib/actions",
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
index a64c20bd522b13..96921b65b29348 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java
@@ -19,6 +19,7 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.actions.ActionContext;
+import com.google.devtools.build.lib.actions.ActionInput;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.ExecutionStrategy;
import com.google.devtools.build.lib.actions.ExecutorInitException;
@@ -49,7 +50,7 @@ final class RemoteActionContextProvider extends ActionContextProvider {
private final DigestUtil digestUtil;
@Nullable private final Path logDir;
private final AtomicReference<SpawnRunner> fallbackRunner = new AtomicReference<>();
- private ImmutableSet<Artifact> topLevelOutputs = ImmutableSet.of();
+ private ImmutableSet<ActionInput> topLevelOutputs = ImmutableSet.of();
private RemoteActionContextProvider(
CommandEnvironment env,
@@ -171,7 +172,7 @@ AbstractRemoteActionCache getRemoteCache() {
return cache;
}
- void setTopLevelOutputs(ImmutableSet<Artifact> topLevelOutputs) {
+ void setTopLevelOutputs(ImmutableSet<ActionInput> topLevelOutputs) {
this.topLevelOutputs = Preconditions.checkNotNull(topLevelOutputs, "topLevelOutputs");
}
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
index 5d10ceeffc2e11..f3218690ef7b5f 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java
@@ -22,10 +22,14 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ListeningScheduledExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
+import com.google.devtools.build.lib.actions.ActionInput;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
+import com.google.devtools.build.lib.analysis.TopLevelArtifactContext;
import com.google.devtools.build.lib.analysis.TopLevelArtifactHelper;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
+import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget;
+import com.google.devtools.build.lib.analysis.test.TestProvider;
import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions;
import com.google.devtools.build.lib.authandtls.GoogleAuthUtils;
import com.google.devtools.build.lib.buildeventstream.BuildEventArtifactUploader;
@@ -34,6 +38,7 @@
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.Reporter;
import com.google.devtools.build.lib.exec.ExecutorBuilder;
+import com.google.devtools.build.lib.packages.TargetUtils;
import com.google.devtools.build.lib.remote.logging.LoggingInterceptor;
import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.remote.options.RemoteOutputsMode;
@@ -45,6 +50,7 @@
import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.runtime.ServerBuilder;
+import com.google.devtools.build.lib.runtime.commands.TestCommand;
import com.google.devtools.build.lib.skyframe.AspectValue;
import com.google.devtools.build.lib.util.AbruptExitException;
import com.google.devtools.build.lib.util.ExitCode;
@@ -321,27 +327,42 @@ public void afterAnalysis(
ImmutableSet<AspectValue> aspects) {
if (remoteOutputsMode != null && remoteOutputsMode.downloadToplevelOutputsOnly()) {
Preconditions.checkState(actionContextProvider != null, "actionContextProvider was null");
- // TODO(buchgr): Consider only storing the action owners instead of the artifacts
// Collect all top level output artifacts of regular targets as well as aspects. This
// information is used by remote spawn runners to decide whether to download an artifact
// if --experimental_remote_download_outputs=toplevel is set
- ImmutableSet.Builder<Artifact> topLevelOutputsBuilder = ImmutableSet.builder();
+ ImmutableSet.Builder<ActionInput> topLevelOutputsBuilder = ImmutableSet.builder();
for (ConfiguredTarget configuredTarget : configuredTargets) {
- topLevelOutputsBuilder.addAll(
- TopLevelArtifactHelper.getAllArtifactsToBuild(
- configuredTarget, request.getTopLevelArtifactContext())
- .getImportantArtifacts());
+ topLevelOutputsBuilder.addAll(getTopLevelTargetOutputs(configuredTarget,
+ request.getTopLevelArtifactContext(), env.getCommandName()));
}
+ actionContextProvider.setTopLevelOutputs(topLevelOutputsBuilder.build());
+ }
+ }
- for (AspectValue aspect : aspects) {
- topLevelOutputsBuilder.addAll(
- TopLevelArtifactHelper.getAllArtifactsToBuild(
- aspect, request.getTopLevelArtifactContext())
- .getImportantArtifacts());
+
+ /**
+ * Returns a list of build or test outputs produced by the configured target.
+ */
+ private ImmutableList<ActionInput> getTopLevelTargetOutputs(ConfiguredTarget configuredTarget,
+ TopLevelArtifactContext topLevelArtifactContext, String commandName) {
+ if (commandName.equals("test") && isTestRule(configuredTarget)) {
+ TestProvider testProvider = configuredTarget.getProvider(TestProvider.class);
+ if (testProvider == null) {
+ return ImmutableList.of();
}
+ return testProvider.getTestParams().getOutputs();
+ } else {
+ return ImmutableList.copyOf(TopLevelArtifactHelper.getAllArtifactsToBuild(configuredTarget,
+ topLevelArtifactContext).getImportantArtifacts());
+ }
+ }
- actionContextProvider.setTopLevelOutputs(topLevelOutputsBuilder.build());
+ private static boolean isTestRule(ConfiguredTarget configuredTarget) {
+ if (configuredTarget instanceof RuleConfiguredTarget) {
+ RuleConfiguredTarget ruleConfiguredTarget = (RuleConfiguredTarget) configuredTarget;
+ return TargetUtils.isTestRuleName(ruleConfiguredTarget.getRuleClassString());
}
+ return false;
}
private static void cleanAndCreateRemoteLogsDir(Path logDir) throws AbruptExitException {
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index e711b27e2c4b93..10c7facd07e913 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -90,7 +90,7 @@ final class RemoteSpawnCache implements SpawnCache {
* <p>This set is empty unless {@link RemoteOutputsMode#TOPLEVEL} is specified. If so, this set is
* used to decide whether to download an output.
*/
- private final ImmutableSet<Artifact> topLevelOutputs;
+ private final ImmutableSet<ActionInput> topLevelOutputs;
RemoteSpawnCache(
Path execRoot,
@@ -100,7 +100,7 @@ final class RemoteSpawnCache implements SpawnCache {
String commandId,
@Nullable Reporter cmdlineReporter,
DigestUtil digestUtil,
- ImmutableSet<Artifact> topLevelOutputs) {
+ ImmutableSet<ActionInput> topLevelOutputs) {
this.execRoot = execRoot;
this.options = options;
this.remoteCache = remoteCache;
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index 2a09f3c878f7f4..639df0a95a38e3 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -118,7 +118,7 @@ public class RemoteSpawnRunner implements SpawnRunner {
* <p>This set is empty unless {@link RemoteOutputsMode#TOPLEVEL} is specified. If so, this set is
* used to decide whether to download an output.
*/
- private final ImmutableSet<Artifact> topLevelOutputs;
+ private final ImmutableSet<ActionInput> topLevelOutputs;
// Used to ensure that a warning is reported only once.
private final AtomicBoolean warningReported = new AtomicBoolean();
@@ -137,7 +137,7 @@ public class RemoteSpawnRunner implements SpawnRunner {
@Nullable RemoteRetrier retrier,
DigestUtil digestUtil,
Path logDir,
- ImmutableSet<Artifact> topLevelOutputs) {
+ ImmutableSet<ActionInput> topLevelOutputs) {
this.execRoot = execRoot;
this.remoteOptions = remoteOptions;
this.executionOptions = executionOptions;
diff --git a/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java b/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
index 818a4da181d830..ab97bfa7f3f745 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/util/Utils.java
@@ -100,7 +100,7 @@ public static boolean shouldDownloadAllSpawnOutputs(
/** Returns {@code true} if outputs contains one or more top level outputs. */
public static boolean hasTopLevelOutputs(
- Collection<? extends ActionInput> outputs, ImmutableSet<Artifact> topLevelOutputs) {
+ Collection<? extends ActionInput> outputs, ImmutableSet<ActionInput> topLevelOutputs) {
if (topLevelOutputs.isEmpty()) {
return false;
}
| diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index 5de687eb85c25c..a568c7bb406d2a 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -1058,8 +1058,62 @@ EOF
[[ -f bazel-bin/a/foobar.txt ]] \
|| fail "Expected toplevel output bazel-bin/a/foobar.txt to be re-downloaded"
+}
+
+function test_download_toplevel_test_rule() {
+ # Test that when using --experimental_remote_download_outputs=toplevel with bazel test only
+ # the test.log and test.xml file are downloaded but not the test binary. However when building
+ # a test then the test binary should be downloaded.
+
+ if [[ "$PLATFORM" == "darwin" ]]; then
+ # TODO(b/37355380): This test is disabled due to RemoteWorker not supporting
+ # setting SDKROOT and DEVELOPER_DIR appropriately, as is required of
+ # action executors in order to select the appropriate Xcode toolchain.
+ return 0
+ fi
+ mkdir -p a
+ cat > a/BUILD <<EOF
+package(default_visibility = ["//visibility:public"])
+cc_test(
+ name = 'test',
+ srcs = [ 'test.cc' ],
+)
+EOF
+ cat > a/test.cc <<EOF
+#include <iostream>
+int main() { std::cout << "Hello test!" << std::endl; return 0; }
+EOF
+
+ # When invoking bazel test only test.log and test.xml should be downloaded.
+ bazel test \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --experimental_inmemory_jdeps_files \
+ --experimental_inmemory_dotd_files \
+ --experimental_remote_download_outputs=toplevel \
+ //a:test >& $TEST_log || fail "Failed to test //a:test with remote execution"
+
+ (! [[ -f bazel-bin/a/test ]]) \
+ || fail "Expected test binary bazel-bin/a/test to not be downloaded"
+
+ [[ -f bazel-testlogs/a/test/test.log ]] \
+ || fail "Expected toplevel output bazel-testlogs/a/test/test.log to be downloaded"
+
+ [[ -f bazel-testlogs/a/test/test.xml ]] \
+ || fail "Expected toplevel output bazel-testlogs/a/test/test.log to be downloaded"
+
+ bazel clean
+
+ # When invoking bazel build the test binary should be downloaded.
+ bazel build \
+ --remote_executor=grpc://localhost:${worker_port} \
+ --experimental_inmemory_jdeps_files \
+ --experimental_inmemory_dotd_files \
+ --experimental_remote_download_outputs=toplevel \
+ //a:test >& $TEST_log || fail "Failed to build //a:test with remote execution"
+ ([[ -f bazel-bin/a/test ]]) \
+ || fail "Expected test binary bazel-bin/a/test to be downloaded"
}
function test_downloads_minimal_bep() {
| test | train | 2019-07-22T13:24:06 | "2019-07-19T00:47:07Z" | lizan | test |
bazelbuild/bazel/8970_9332 | bazelbuild/bazel | bazelbuild/bazel/8970 | bazelbuild/bazel/9332 | [
"timestamp(timedelta=0.0, similarity=0.8974316343048264)"
] | 25caae266b7e1859377336c036077a40c8dd50b5 | b290eeba02095e370eb0b6384d3d790e53523056 | [] | [
"That text might be a little long for a help text. Consider changing it to \r\n\r\n`Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is \"remote,worker,sandboxed,local\". See https://blog.bazel.build/2019/06/19/list-strategy.html.`",
"done for both"
] | "2019-09-05T13:06:09Z" | [
"type: bug",
"team-Remote-Exec"
] | clean-up after enabling list based execution strategy | List based execution strategy was recently introduced at #7480. After it's been enabled, certain scenarios are not possible anymore => code clean-up would be a great thing to do :)
Some places to look at:
- [x] update docs
- [x] `incompatible_list_based_execution_strategy_selection` can be deleted with all related logic
- [x] remote execution fallback to local execution
- [ ] other strategy related logic | [
"src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java",
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java",
"src/test/shell/integration/execution_strategies_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
index 7e04b6768ea9e2..ec83dc053f88fc 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
@@ -58,18 +58,6 @@ public class ExecutionOptions extends OptionsBase {
public static final ExecutionOptions DEFAULTS = Options.getDefaults(ExecutionOptions.class);
- @Option(
- name = "incompatible_list_based_execution_strategy_selection",
- defaultValue = "true",
- documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
- effectTags = {OptionEffectTag.EXECUTION},
- metadataTags = {
- OptionMetadataTag.INCOMPATIBLE_CHANGE,
- OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
- },
- help = "See https://github.com/bazelbuild/bazel/issues/7480")
- public boolean incompatibleListBasedExecutionStrategySelection;
-
@Option(
name = "spawn_strategy",
defaultValue = "",
@@ -78,9 +66,10 @@ public class ExecutionOptions extends OptionsBase {
effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specify how spawn actions are executed by default. "
- + "'standalone' means run all of them locally without any kind of sandboxing. "
- + "'sandboxed' means to run them in a sandboxed environment with limited privileges "
- + "(details depend on platform support).")
+ + "Accepts a comma-separated list of strategies from highest to lowest priority. "
+ + "For each action Bazel picks the strategy with the highest priority that can execute the action. "
+ + "The default value is \"remote,worker,sandboxed,local\"."
+ + "See https://blog.bazel.build/2019/06/19/list-strategy.html for details.")
public List<String> spawnStrategy;
@Option(
@@ -104,8 +93,10 @@ public class ExecutionOptions extends OptionsBase {
effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specify how to distribute compilation of other spawn actions. "
- + "Example: 'Javac=local' means to spawn Java compilation locally. "
- + "'JavaIjar=sandboxed' means to spawn Java Ijar actions in a sandbox. ")
+ + "Accepts a comma-separated list of strategies from highest to lowest priority. "
+ + "For each action Bazel picks the strategy with the highest priority that can execute the action. "
+ + "The default value is \"remote,worker,sandboxed,local\"."
+ + "See https://blog.bazel.build/2019/06/19/list-strategy.html for details.")
public List<Map.Entry<String, List<String>>> strategy;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index 641212257d4d31..5d596f75a59a29 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -125,7 +125,7 @@ public class RemoteSpawnRunner implements SpawnRunner {
String buildRequestId,
String commandId,
GrpcRemoteCache remoteCache,
- @Nullable GrpcRemoteExecutor remoteExecutor,
+ GrpcRemoteExecutor remoteExecutor,
@Nullable RemoteRetrier retrier,
DigestUtil digestUtil,
Path logDir,
@@ -178,11 +178,6 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
commandHash, merkleTree.getRootDigest(), context.getTimeout(), spawnCacheableRemotely);
ActionKey actionKey = digestUtil.computeActionKey(action);
- if (!Spawns.mayBeExecutedRemotely(spawn)) {
- return execLocallyAndUpload(
- spawn, context, inputMap, actionKey, action, command, uploadLocalResults);
- }
-
// Look up action cache, and reuse the action output if it is found.
Context withMetadata =
TracingMetadataUtils.contextWithMetadata(buildRequestId, commandId, actionKey);
@@ -217,12 +212,6 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
spawn, context, inputMap, actionKey, action, command, uploadLocalResults, e);
}
- if (remoteExecutor == null) {
- // Remote execution is disabled and so execute the spawn on the local machine.
- return execLocallyAndUpload(
- spawn, context, inputMap, actionKey, action, command, uploadLocalResults);
- }
-
ExecuteRequest.Builder requestBuilder =
ExecuteRequest.newBuilder()
.setInstanceName(remoteOptions.remoteInstanceName)
| diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
index b8beb81f54d6be..29a549aede99fa 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
@@ -252,47 +252,17 @@ public void cachableSpawnsShouldBeCached_localFallback() throws Exception {
verify(cache).upload(any(), any(), any(), any(), any(), any());
}
- @Test
- public void noRemoteExecExecutesLocallyButUsesCache() throws Exception {
- // Test that if the NO_REMOTE_EXEC execution requirement is specified, the spawn is executed
- // locally, but its result is still uploaded to the remote cache.
-
- remoteOptions.remoteAcceptCached = true;
- remoteOptions.remoteUploadLocalResults = true;
-
- RemoteSpawnRunner runner = spy(newSpawnRunner());
-
- SpawnResult res =
- new SpawnResult.Builder()
- .setStatus(Status.SUCCESS)
- .setExitCode(0)
- .setRunnerName("test")
- .build();
- when(localRunner.exec(any(Spawn.class), any(SpawnExecutionContext.class))).thenReturn(res);
-
- Spawn spawn =
- simpleSpawnWithExecutionInfo(ImmutableMap.of(ExecutionRequirements.NO_REMOTE_EXEC, ""));
- SpawnExecutionContext policy =
- new FakeSpawnExecutionContext(spawn, fakeFileCache, execRoot, outErr);
-
- SpawnResult result = runner.exec(spawn, policy);
-
- assertThat(result.exitCode()).isEqualTo(0);
- assertThat(result.status()).isEqualTo(Status.SUCCESS);
- verify(localRunner).exec(eq(spawn), eq(policy));
- verify(runner)
- .execLocallyAndUpload(
- eq(spawn), eq(policy), any(), any(), any(), any(), /* uploadLocalResults= */ eq(true));
- verify(cache).upload(any(), any(), any(), any(), any(), any());
- }
-
@Test
public void failedLocalActionShouldNotBeUploaded() throws Exception {
// Test that the outputs of a locally executed action that failed are not uploaded.
+ remoteOptions.remoteLocalFallback = true;
remoteOptions.remoteUploadLocalResults = true;
- RemoteSpawnRunner runner = spy(newSpawnRunnerWithoutExecutor());
+ RemoteSpawnRunner runner = spy(newSpawnRunner());
+
+ // Throw an IOException to trigger the local fallback.
+ when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(IOException.class);
Spawn spawn = newSimpleSpawn();
SpawnExecutionContext policy =
@@ -323,10 +293,15 @@ public void treatFailedCachedActionAsCacheMiss_local() throws Exception {
// Test that bazel treats failed cache action as a cache miss and attempts to execute action
// locally
+ remoteOptions.remoteLocalFallback = true;
+ remoteOptions.remoteUploadLocalResults = true;
+
ActionResult failedAction = ActionResult.newBuilder().setExitCode(1).build();
when(cache.getCachedActionResult(any(ActionKey.class))).thenReturn(failedAction);
- RemoteSpawnRunner runner = spy(newSpawnRunnerWithoutExecutor());
+ RemoteSpawnRunner runner = spy(newSpawnRunner());
+ // Throw an IOException to trigger the local fallback.
+ when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(IOException.class);
Spawn spawn = newSimpleSpawn();
SpawnExecutionContext policy =
@@ -393,7 +368,8 @@ public void printWarningIfCacheIsDown() throws Exception {
StoredEventHandler eventHandler = new StoredEventHandler();
reporter.addHandler(eventHandler);
- RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor(reporter);
+ RemoteSpawnRunner runner = newSpawnRunner(reporter);
+ when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(new IOException());
Spawn spawn = newSimpleSpawn();
SpawnExecutionContext policy =
@@ -428,12 +404,13 @@ public void printWarningIfCacheIsDown() throws Exception {
@Test
public void noRemoteExecutorFallbackFails() throws Exception {
- // Errors from the fallback runner should be propogated out of the remote runner.
+ // Errors from the fallback runner should be propagated out of the remote runner.
remoteOptions.remoteUploadLocalResults = true;
remoteOptions.remoteLocalFallback = true;
- RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor();
+ RemoteSpawnRunner runner = newSpawnRunner();
+ when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(new IOException());
Spawn spawn = newSimpleSpawn();
SpawnExecutionContext policy =
@@ -452,12 +429,13 @@ public void noRemoteExecutorFallbackFails() throws Exception {
@Test
public void remoteCacheErrorFallbackFails() throws Exception {
- // Errors from the fallback runner should be propogated out of the remote runner.
+ // Errors from the fallback runner should be propagated out of the remote runner.
remoteOptions.remoteUploadLocalResults = true;
remoteOptions.remoteLocalFallback = true;
- RemoteSpawnRunner runner = newSpawnRunnerWithoutExecutor();
+ RemoteSpawnRunner runner = newSpawnRunner();
+ when(executor.executeRemotely(any(ExecuteRequest.class))).thenThrow(new IOException());
Spawn spawn = newSimpleSpawn();
SpawnExecutionContext policy =
@@ -1007,6 +985,14 @@ private RemoteSpawnRunner newSpawnRunner() {
/* topLevelOutputs= */ ImmutableSet.of());
}
+ private RemoteSpawnRunner newSpawnRunner(Reporter reporter) {
+ return newSpawnRunner(
+ /* verboseFailures= */ false,
+ executor,
+ reporter,
+ /* topLevelOutputs= */ ImmutableSet.of());
+ }
+
private RemoteSpawnRunner newSpawnRunner(ImmutableSet<ActionInput> topLevelOutputs) {
return newSpawnRunner(
/* verboseFailures= */ false, executor, /* reporter= */ null, topLevelOutputs);
@@ -1033,20 +1019,4 @@ private RemoteSpawnRunner newSpawnRunner(
logDir,
topLevelOutputs);
}
-
- private RemoteSpawnRunner newSpawnRunnerWithoutExecutor() {
- return newSpawnRunner(
- /* verboseFailures= */ false,
- /* executor= */ null,
- /* reporter= */ null,
- /* topLevelOutputs= */ ImmutableSet.of());
- }
-
- private RemoteSpawnRunner newSpawnRunnerWithoutExecutor(Reporter reporter) {
- return newSpawnRunner(
- /* verboseFailures= */ false,
- /* executor= */ null,
- reporter,
- /* topLevelOutputs= */ ImmutableSet.of());
- }
}
diff --git a/src/test/shell/integration/execution_strategies_test.sh b/src/test/shell/integration/execution_strategies_test.sh
index f45b14c4e154ed..cb6981b50ded26 100755
--- a/src/test/shell/integration/execution_strategies_test.sh
+++ b/src/test/shell/integration/execution_strategies_test.sh
@@ -44,11 +44,6 @@ fi
source "$(rlocation "io_bazel/src/test/shell/integration_test_setup.sh")" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }
-# Tests that a list based strategy selection is enabled by default
-function test_incompatible_flag_flipped() {
- bazel build --spawn_strategy=worker,local --debug_print_action_contexts &> $TEST_log || fail
- expect_not_log "incompatible_list_based_execution_strategy_selection was not enabled"
-}
# Tests that you can set the spawn strategy flags to a list of strategies.
function test_multiple_strategies() {
| val | train | 2019-09-16T03:51:31 | "2019-07-24T07:29:13Z" | ishikhman | test |
bazelbuild/bazel/9056_9057 | bazelbuild/bazel | bazelbuild/bazel/9056 | bazelbuild/bazel/9057 | [
"timestamp(timedelta=1.0, similarity=0.870290773571367)"
] | 09ec89352c77f442109b779ef8735fa11f91bc4f | 1b3fb1069c9a5cae19a46603517fbb24fd53013d | [
"Website deployed, all works now."
] | [
"could you explain why this is needed?",
"accident, removed"
] | "2019-08-02T09:22:42Z" | [
"type: bug",
"P0",
"team-OSS"
] | "Updating Bazel" link on https://docs.bazel.build/versions/0.28.0/bazel-overview.html 404s | The leftnav bar is not versioned with the rest of the documentation, and if the link target in the navbar does not exist in a particular version, the link 404s.
It has happened with recently added https://docs.bazel.build/versions/master/updating-bazel.html (added in https://github.com/bazelbuild/bazel/commit/4285b4bf14eecbd0f5b7a0b09cad617109c6abab) | [
"site/_layouts/documentation.html"
] | [
"site/_layouts/documentation.html"
] | [] | diff --git a/site/_layouts/documentation.html b/site/_layouts/documentation.html
index d963a8d81628ed..da01c8fc0103ba 100644
--- a/site/_layouts/documentation.html
+++ b/site/_layouts/documentation.html
@@ -6,6 +6,14 @@
<!-- /versions/0.12.3/baz.md -> ["0.12.3", "baz.md"] -->
{% assign versioned_url_parts = page.url | split: '/' | shift | shift %}
{% assign current_version = versioned_url_parts.first %}
+{% assign version_components = current_version | split: '.' %}
+{% if version_components.size < 2 %}
+{% assign major_version = "master" %}
+{% assign minor_version = "master" %}
+{% else % }
+{% assign minor_version = version_components[0] %}
+{% assign minor_version = version_components[1] %}
+{% endif %}
<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
@@ -68,9 +76,11 @@ <h3>Installing and Using Bazel</h3>
</ul>
</li>
+ {% if major_version == "master" or major_version > 0 or minor_version > 28 %}
<li class="sidebar-nav">
<a href="/versions/{{ current_version }}/updating-bazel.html">Updating Bazel</a>
</li>
+ {% endif %}
<li>
<a class="sidebar-nav-heading" data-toggle="collapse"
| null | train | train | 2019-08-02T06:59:25 | "2019-08-02T09:20:28Z" | dslomov | test |
bazelbuild/bazel/9084_9179 | bazelbuild/bazel | bazelbuild/bazel/9084 | bazelbuild/bazel/9179 | [
"timestamp(timedelta=0.0, similarity=0.9223419713715402)"
] | d570771d38937984940ed9af7edfc493503e6cf7 | 06a8028ffbd8d01a148c3ac274bf83a0063d0267 | [] | [
"That cast isn't sound, and it should result in an \"unchecked\" warning. Do you know how (and why) these are suppressed in the Bazel codebase? They should really be treated as errors.",
"I am not sure actually why they are suppressed. I removed the cast anyway.",
"This incurs an unnecessary copy that was not present in the old code. Essentially the problem has been pushed to 'new ArrayList', which has a raw type, which ought to be a compile error if our build was correctly configured. Let's revert to the previous version.\r\n\r\n(I think the right solution is to abolish the type parameter in StarlarkList, so that it extends `Collection<Object>`. If you pass a `StarlarkList<X>` to the interpreter, you have no guarantee that it doesn't insert objects of class Y into the list. The only reason this doesn't happen today is that Blaze never passes mutable lists (other than of `<Object>)` to Starlark functions, but an application that did would start to see very confusing crashes. \r\nBut that's a much bigger change.)",
"fyi, I've merged this PR using Friday's state (without the unnecessary copy, but with the cast)."
] | "2019-08-15T14:15:03Z" | [
"type: feature request",
"P3"
] | enumerate, join, extend functions not accepting dicts | ### Description of the problem:
When trying to pass a `dict` object to any of the Starlark functions `enumerate`, `string.join` or `list.extend`, the error `expected value of type 'sequence' for parameter ...` is thrown.
According to the spec:
- A `dict` is both an `Iterable` and a `Sequence`. (see [sequence types](https://github.com/bazelbuild/starlark/blob/master/spec.md#sequence-types))
- The arguments of [`enumerate`](https://github.com/bazelbuild/starlark/blob/master/spec.md#enumerate), [`extend`](https://github.com/bazelbuild/starlark/blob/master/spec.md#listextend) and [`join`](https://github.com/bazelbuild/starlark/blob/master/spec.md#stringjoin) are iterable sequences.
Also, both Python and the Go implementation accept dictionaries being passed to the above functions. | [
"src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java",
"src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java",
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [
"src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java",
"src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java",
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [
"src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java",
"src/test/starlark/testdata/list_mutation.sky",
"src/test/starlark/testdata/string_misc.sky"
] | diff --git a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
index 62fe34b901f259..830ca5672e75fe 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
@@ -605,12 +605,12 @@ private String getIntegerPrefix(String value) {
name = "enumerate",
doc =
"Returns a list of pairs (two-element tuples), with the index (int) and the item from"
- + " the input list.\n<pre class=\"language-python\">"
+ + " the input sequence.\n<pre class=\"language-python\">"
+ "enumerate([24, 21, 84]) == [(0, 24), (1, 21), (2, 84)]</pre>\n",
parameters = {
// Note Python uses 'sequence' keyword instead of 'list'. We may want to change tihs
// some day.
- @Param(name = "list", type = SkylarkList.class, doc = "input list.", named = true),
+ @Param(name = "list", type = Object.class, doc = "input sequence.", named = true),
@Param(
name = "start",
type = Integer.class,
@@ -618,12 +618,13 @@ private String getIntegerPrefix(String value) {
defaultValue = "0",
named = true)
},
- useEnvironment = true)
- public MutableList<?> enumerate(SkylarkList<?> input, Integer start, Environment env)
+ useEnvironment = true,
+ useLocation = true)
+ public MutableList<?> enumerate(Object input, Integer start, Location loc, Environment env)
throws EvalException {
int count = start;
- ArrayList<SkylarkList<?>> result = new ArrayList<>(input.size());
- for (Object obj : input) {
+ ArrayList<SkylarkList<?>> result = new ArrayList<>();
+ for (Object obj : EvalUtils.toCollection(input, loc, env)) {
result.add(Tuple.of(count, obj));
count++;
}
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
index fe1ffc3e5f96f3..686ed3d7f9a753 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
@@ -28,6 +28,7 @@
import com.google.devtools.build.lib.syntax.StarlarkMutable.BaseMutableList;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Collection;
import java.util.List;
import java.util.RandomAccess;
import javax.annotation.Nullable;
@@ -521,15 +522,15 @@ public Runtime.NoneType insert(
name = "extend",
doc = "Adds all items to the end of the list.",
parameters = {
- @Param(name = "items", type = SkylarkList.class, doc = "Items to add at the end.")
+ @Param(name = "items", type = Object.class, doc = "Items to add at the end.")
},
useLocation = true,
useEnvironment = true
)
public Runtime.NoneType extend(
- SkylarkList<E> items, Location loc, Environment env)
+ Object items, Location loc, Environment env)
throws EvalException {
- addAll(items, loc, env.mutability());
+ addAll(new ArrayList(EvalUtils.toCollection(items, loc, env)), loc, env.mutability());
return Runtime.NONE;
}
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
index 97255220e0a42e..f274d03f370ef1 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
@@ -32,6 +32,7 @@
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.Collection;
/**
* Skylark String module.
@@ -103,15 +104,16 @@ private static String pythonSubstring(String str, int start, Object end, String
name = "elements",
// TODO(cparsons): This parameter should be positional-only.
legacyNamed = true,
- type = SkylarkList.class,
+ type = Object.class,
doc = "The objects to join.")
},
useLocation = true,
useEnvironment = true)
- public String join(String self, SkylarkList<?> elements, Location loc, Environment env)
+ public String join(String self, Object elements, Location loc, Environment env)
throws ConversionException, EvalException {
+ Collection<?> items = EvalUtils.toCollection(elements, loc, env);
if (env.getSemantics().incompatibleStringJoinRequiresStrings()) {
- for (Object item : elements) {
+ for (Object item : items) {
if (!(item instanceof String)) {
throw new EvalException(
loc,
@@ -122,7 +124,7 @@ public String join(String self, SkylarkList<?> elements, Location loc, Environme
}
}
}
- return Joiner.on(self).join(elements);
+ return Joiner.on(self).join(items);
}
@SkylarkCallable(
| diff --git a/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java b/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java
index 62875a76b6ef09..7f024d79ebcd57 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java
@@ -535,8 +535,7 @@ public void testEnumerate() throws Exception {
public void testEnumerateBadArg() throws Exception {
new BothModesTest()
.testIfErrorContains(
- "expected value of type 'sequence' for parameter 'list', "
- + "for call to function enumerate(list, start = 0)",
+ "type 'string' is not a collection",
"enumerate('a')");
}
diff --git a/src/test/starlark/testdata/list_mutation.sky b/src/test/starlark/testdata/list_mutation.sky
index 3dbcf7e4bd4989..c27d74938f3d06 100644
--- a/src/test/starlark/testdata/list_mutation.sky
+++ b/src/test/starlark/testdata/list_mutation.sky
@@ -46,12 +46,13 @@ assert_eq(foo, ['a', 'b', 'c', 'd'])
foo = ['a', 'b']
foo.extend(['c', 'd'])
foo.extend(('e', 'f'))
-assert_eq(foo, ['a', 'b', 'c', 'd', 'e', 'f'])
+foo.extend({'g': None})
+assert_eq(foo, ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
---
(1, 2).extend([3, 4]) ### type 'tuple' has no method extend()
---
-[1, 2].extend(3) ### expected value of type 'sequence' for parameter 'items'
+[1, 2].extend(3) ### type 'int' is not a collection
# remove
diff --git a/src/test/starlark/testdata/string_misc.sky b/src/test/starlark/testdata/string_misc.sky
index 398e263ef7ccce..d80187a9925381 100644
--- a/src/test/starlark/testdata/string_misc.sky
+++ b/src/test/starlark/testdata/string_misc.sky
@@ -1,5 +1,6 @@
# join
assert_eq('-'.join(['a', 'b', 'c']), "a-b-c")
+assert_eq('-'.join({'a': 0, 'b': None, 'c': True}), "a-b-c")
---
join(' ', ['a', 'b', 'c']) ### name 'join' is not defined
@@ -162,6 +163,8 @@ assert_eq("\"", '"')
# enumerate
assert_eq(enumerate("abc".elems()), [(0, "a"), (1, "b"), (2, "c")])
+assert_eq(enumerate({'a': 0, 2: 1, 'ab': 3}), [(0, 'a'), (1, 2), (2, 'ab')])
+assert_eq(enumerate({}), [])
assert_eq(enumerate([False, True, None], 42), [(42, False), (43, True), (44, None)])
---
-enumerate("ab") ### expected value of type 'sequence'
+enumerate("ab") ### type 'string' is not a collection
| val | train | 2019-08-17T03:31:09 | "2019-08-06T00:09:12Z" | Quarz0 | test |
bazelbuild/bazel/9089_9090 | bazelbuild/bazel | bazelbuild/bazel/9089 | bazelbuild/bazel/9090 | [
"timestamp(timedelta=0.0, similarity=0.9163717359713671)"
] | b7d300c6be3e130dec0e62a4f19493105f595d57 | 7d02c0aea7529d40158d91ff0f85894dca601330 | [
"Example:\r\n```\r\nDEBUG: /tmp/winsdk/51c9aa8f783c7ef42fa88749bcc55eec/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:118:5: \r\nAuto-Configuration Warning: registry query result for VC 8.0: \r\n\r\nSTDOUT(start)\r\n\r\nSTDOUT(end)\r\nSTDERR(start):\r\njava.io.IOException: Cannot run program \"C:\\Windows\\system32\\reg.exe\" (in directory \"/tmp/winsdk/51c9aa8f783c7ef42fa88749bcc55eec/external/local_config_winsdk\"): error=2, No such file or directory \r\nSTDERR(end)\r\n```\r\n\r\nThe errors are not fatal though.",
"Blocking https://github.com/bazelbuild/bazel/issues/8572",
"Not a release blocker: the affected file is not embedded into Bazel."
] | [] | "2019-08-06T11:42:14Z" | [
"type: bug",
"P2",
"area-Windows",
"team-OSS"
] | Windows: winsdk_configure errors on other platforms | ### Description of the problem / feature request:
Bazel workspace's `winsdk_configure()` repository rule runs (and throws java.io.IOExceptions) on every platform, not just Windows.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
1. get https://github.com/bazelbuild/bazel/commit/47d0173cc92f5544c0cca718a1f393a01fc863e9
2. `bazel build src:bazel`
3. `export CC_CONFIGURE_DEBUG=1`
4. `bazel-bin/src/bazel build --nobuild //src:bazel`
### What operating system are you running Bazel on?
Linux
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
built at https://github.com/bazelbuild/bazel/commit/47d0173cc92f5544c0cca718a1f393a01fc863e9
| [
"src/main/res/winsdk_configure.bzl"
] | [
"src/main/res/winsdk_configure.bzl"
] | [] | diff --git a/src/main/res/winsdk_configure.bzl b/src/main/res/winsdk_configure.bzl
index 2eb7d0e2ef838e..3b77acbc8a537b 100644
--- a/src/main/res/winsdk_configure.bzl
+++ b/src/main/res/winsdk_configure.bzl
@@ -14,6 +14,16 @@
"""Configure local Resource Compilers for every available target platform.
+Platform support:
+
+- Linux/macOS/non-Windows: this repository rule is almost a no-op.
+ It generates an empty BUILD file, and does not actually discover any
+ toolchains. The register_local_rc_exe_toolchains() method is a no-op.
+
+- Windows: this repository rule discovers the Windows SDK path, the installed
+ rc.exe compilers. The register_local_rc_exe_toolchains() registers a toolchain
+ for each rc.exe compiler.
+
Usage:
load("//src/main/res:winsdk_configure.bzl", "winsdk_configure")
@@ -46,6 +56,9 @@ def _find_rc_exes(root):
return result
def _find_all_rc_exe(repository_ctx):
+ if not repository_ctx.os.name.startswith("windows"):
+ return {}
+
vc = find_vc_path(repository_ctx)
if vc:
env = setup_vc_env_vars(
| null | train | train | 2019-08-06T13:26:10 | "2019-08-06T11:24:54Z" | laszlocsomor | test |
bazelbuild/bazel/9097_9107 | bazelbuild/bazel | bazelbuild/bazel/9097 | bazelbuild/bazel/9107 | [
"timestamp(timedelta=71449.0, similarity=0.8616046097426532)"
] | d2de8ee925710b757a637bc8ad1036546a030756 | 4596a99e3f1ff8b84d077b889e2ef0ca84f1d0f0 | [
"Ccing @laurentlb and @gregestren for comment.",
"Does this need to be the rally call for Starlark customization? Could we get away with natively disabling toolchain resolution for all rule classes that are build settings?",
"In other words: if a `rule` has a `build_setting` attribute, automatically disable toolchain resolution.",
"I prefer to avoid magic checks like that, in favor of simple explicit definitions. There may be further classes of rules that don't need toolchains (or execution platforms), so I'd like to enable them, as well.",
"There's already intentional magic in distinguishing build settings, particularly the implicit surprise `build_setting_default` attribute: https://docs.bazel.build/versions/master/skylark/config.html#instantiating-build-settings.\r\n\r\nWe had lots of discussion about the place magic should have and while I leaned in the same direction you do, the broader consensus was that magic was appropriate here.\r\n\r\nSo for `build_setting` specifically I think we should stay consistent and not introduce more API overhead for them. I also see no reason to let users toggle this either way: Bazel should hard-code this decision for them.\r\n\r\n> There may be further classes of rules that don't need toolchains (or execution platforms), so I'd like to > enable them, \r\n\r\nThis makes sense. When would we expect to need them?",
"> There's already intentional magic in distinguishing build settings, particularly the implicit surprise build_setting_default attribute\r\n\r\nFair enough, I can set the useToolchainResolution flag in the same spot.\r\n\r\n> When would we expect to need [rules that don't use toolchain resolution]?\r\n\r\nOne use case that has come up is custom rules that provide PlatformInfo, although so far that's been in the \"it'd be interesting if we could\" camp, not the \"this is something we need\" camp.\r\n",
"Closing this for now, until we have a need for this."
] | [] | "2019-08-07T14:07:53Z" | [
"type: feature request",
"P2"
] | Starlark rules need to be able to opt out of toolchain resolution | Currently, native rules can use [`RuleClass.Builder.useToolchainResolution`](https://source.bazel.build/bazel/+/a8353612b4791531ae4e2ed463cf0e5d8a4009e8:src/main/java/com/google/devtools/build/lib/packages/RuleClass.java;l=1393;bpt=1) to disable toolchain resolution. This is used for configuration-related rules like `platform`, `constraint_setting`, etc.
With the advent of Starlark-based build settings, some starlark rules are configuration-like and also need to opt out of toolchain resolution, so we need to expose this to Starlark's [`rule`](https://docs.bazel.build/versions/0.28.0/skylark/lib/globals.html#rule) function.
Proposed syntax:
```
config_like_rule = rule(
implementation = _config_like_rule_impl,
attrs = { ... },
use_toolchain_resolution = False,
)
```
| [
"src/main/java/com/google/devtools/build/lib/packages/RuleClass.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/RuleClass.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index f4119496292500..0a08231e4c6bc0 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -853,6 +853,10 @@ public RuleClass build(String name, String key) {
attrBuilder.allowedRuleClasses(ANY_RULE);
}
this.add(attrBuilder);
+
+ // Build setting rules should opt out of toolchain resolution, since they form part of the
+ // configuration.
+ this.useToolchainResolution(false);
}
return new RuleClass(
| null | train | train | 2019-08-07T15:45:46 | "2019-08-06T18:20:43Z" | katre | test |
bazelbuild/bazel/9099_9107 | bazelbuild/bazel | bazelbuild/bazel/9099 | bazelbuild/bazel/9107 | [
"timestamp(timedelta=0.0, similarity=0.9519790750988617)"
] | d2de8ee925710b757a637bc8ad1036546a030756 | 4596a99e3f1ff8b84d077b889e2ef0ca84f1d0f0 | [
"Thanks for fixing this!\r\n\r\ncc @lberki "
] | [] | "2019-08-07T14:07:53Z" | [
"type: feature request",
"P2",
"team-Configurability"
] | build_setting rules should not use toolchain resolution | Following from #9097. Rules created using the build_setting features (https://docs.bazel.build/versions/master/skylark/config.html#instantiating-build-settings) should disable toolchain resolution (and probably also be non-configurable). | [
"src/main/java/com/google/devtools/build/lib/packages/RuleClass.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/RuleClass.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index f4119496292500..0a08231e4c6bc0 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -853,6 +853,10 @@ public RuleClass build(String name, String key) {
attrBuilder.allowedRuleClasses(ANY_RULE);
}
this.add(attrBuilder);
+
+ // Build setting rules should opt out of toolchain resolution, since they form part of the
+ // configuration.
+ this.useToolchainResolution(false);
}
return new RuleClass(
| null | train | train | 2019-08-07T15:45:46 | "2019-08-06T20:01:24Z" | katre | test |
bazelbuild/bazel/9102_9117 | bazelbuild/bazel | bazelbuild/bazel/9102 | bazelbuild/bazel/9117 | [
"timestamp(timedelta=78916.0, similarity=0.8579835952566022)"
] | 858412781d76b7d27c39dc58b7f24cf645bdf035 | 8965cdaeb395980cb61a0e513c6a4f768f8678c0 | [
"It looks like this is being treated as a single filename?\r\n\r\nbazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_arch_core_core_runtime_2_0_0_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_lifecycle_lifecycle_livedata_core_2_0_0_symbols\\symbols.zip",
"I can reproduce this on Windows. Looking.\r\n\r\n```\r\nPS C:\\Users\\jingwen\\Code\\rules_jvm_external\\examples\\android_instrumentation_test> bazel build //src/test:greeter_test_app --an\r\ndroid_aapt=aapt2\r\nINFO: Analyzed target //src/test:greeter_test_app (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nINFO: From Linking external/bazel_tools/src/main/native/windows/windows_jni.dll [for host]:\r\n Creating library bazel-out/host/bin/external/bazel_tools/src/main/native/windows/windows_jni.dll.if.lib and object bazel-out/host/bin/external/bazel_tools/src/main/native/windows/windows_jni.dll.if.exp\r\nERROR: C:/users/jingwen/_bazel_jingwen/w7ee76y7/external/maven/BUILD:31:1: Linking static android resource library for @maven//:androidx_test_espresso_espresso_core failed (Exit 1)\r\nAug 07, 2019 12:24:23 PM com.google.devtools.build.android.ValidateAndLinkResourcesAction main\r\nSEVERE: Error while validating and linking resources\r\ncom.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at com.google.devtools.build.android.aapt2.ResourceLinker$LinkError.of(ResourceLinker.java:112)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$rethrowLinkError$8(ResourceLinker.java:338)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)\r\n at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)\r\n at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)\r\n at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)\r\n at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)\r\n at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.compiledResourcesToPaths(ResourceLinker.java:301)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.linkStatically(ResourceLinker.java:244)\r\n at com.google.devtools.build.android.ValidateAndLinkResourcesAction.main(ValidateAndLinkResourcesAction.java:195)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$13.call(ResourceProcessorBusyBox.java:138)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:239)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nCaused by: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)\r\n at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:116)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.filterZip(ResourceLinker.java:315)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$compiledResourcesToPaths$5(ResourceLinker.java:297)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)\r\n at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\r\n at java.base/java.lang.Thread.run(Thread.java:834)\r\n\r\nException in thread \"main\" com.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at com.google.devtools.build.android.aapt2.ResourceLinker$LinkError.of(ResourceLinker.java:112)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$rethrowLinkError$8(ResourceLinker.java:338)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)\r\n at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)\r\n at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)\r\n at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)\r\n at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)\r\n at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.compiledResourcesToPaths(ResourceLinker.java:301)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.linkStatically(ResourceLinker.java:244)\r\n at com.google.devtools.build.android.ValidateAndLinkResourcesAction.main(ValidateAndLinkResourcesAction.java:195)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$13.call(ResourceProcessorBusyBox.java:138)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:239)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nCaused by: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)\r\n at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:116)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.filterZip(ResourceLinker.java:315)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$compiledResourcesToPaths$5(ResourceLinker.java:297)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)\r\n at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\r\n at java.base/java.lang.Thread.run(Thread.java:834)\r\nTarget //src/test:greeter_test_app failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 11.788s, Critical Path: 9.73s\r\nINFO: 72 processes: 43 local, 29 worker.\r\nFAILED: Build did NOT complete successfully\r\n```",
"Figured out the root cause. The params file contains:\r\n\r\n```\r\n--compiledDep\r\n'bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/androidx_test_monitor_symbols/symbols.zip;bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/androidx_test_core_symbols/symbols.zip'\r\n```\r\n\r\nNote the use of `;` as a delimiter. `--compiledDep` is a list of paths converted with `PathListConverter`\r\n\r\nhttps://github.com/bazelbuild/bazel/blob/13dc4f7d10b4f70a2c2ff9fe068e9c2e73f20dbc/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java#L55-L64\r\n\r\nwhich is delimited with `:` instead `;` \r\n\r\nhttps://github.com/bazelbuild/bazel/blob/a6e3e875c55b1a6d101c79ee5d171a96edb0caa6/src/tools/android/java/com/google/devtools/build/android/Converters.java#L302\r\n\r\nBut the `compiledDeps` execution paths were joined with `getHostPathSeparator()`, which is `;` for Windows only. \r\n\r\nhttps://github.com/bazelbuild/bazel/blob/d0bd3c8273e2a782d7e9b05a8b1fbab368589c9a/src/main/java/com/google/devtools/build/lib/analysis/config/OutputDirectories.java#L279",
"Now I'm running into another error:\r\n\r\n```\r\nERROR: C:/users/jingwen/code/rules_jvm_external/examples/android_instrumentation_test/src/main/BUILD:1:1: Processing Android resources for //src/main:greeter_app failed (Exit 1)\r\nAug 07, 2019 4:24:18 PM com.google.devtools.build.android.ResourceProcessorBusyBox processRequest\r\nSEVERE: Error during processing\r\njava.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Users/jingwen/AppData/Local/Temp/android_resources_tmp14123356876479215233/linked/bin.-pb.apk\r\n at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:111)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\r\n at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)\r\n at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)\r\n at java.base/java.nio.file.Path.of(Path.java:147)\r\n at java.base/java.nio.file.Paths.get(Paths.java:69)\r\n at com.google.devtools.build.android.aapt2.ProtoApk.asApkPath(ProtoApk.java:229)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:565)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:546)\r\n at com.google.devtools.build.android.Aapt2ResourcePackagingAction.main(Aapt2ResourcePackagingAction.java:190)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$14.call(ResourceProcessorBusyBox.java:144)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:242)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\n\r\nException in thread \"main\" java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Users/jingwen/AppData/Local/Temp/android_resources_tmp14123356876479215233/linked/bin.-pb.apk\r\n at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:111)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\r\n at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)\r\n at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)\r\n at java.base/java.nio.file.Path.of(Path.java:147)\r\n at java.base/java.nio.file.Paths.get(Paths.java:69)\r\n at com.google.devtools.build.android.aapt2.ProtoApk.asApkPath(ProtoApk.java:229)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:565)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:546)\r\n at com.google.devtools.build.android.Aapt2ResourcePackagingAction.main(Aapt2ResourcePackagingAction.java:190)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$14.call(ResourceProcessorBusyBox.java:144)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:242)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nTarget //src/test:greeter_test_app failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\n```"
] | [] | "2019-08-07T23:11:09Z" | [
"type: bug",
"P1",
"breakage",
"team-Android"
] | Bazel CI: Android build is failing on Windows | https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1128
```
(02:09:04) ERROR: D:/b/zqacmrtc/external/maven/BUILD:359:1: Couldn't build file external/maven/androidx_lifecycle_lifecycle_livedata_2_0_0_files/androidx_lifecycle_lifecycle_livedata_2_0_0_resources_aapt2-src.jar: Linking static android resource library for @maven//:androidx_lifecycle_lifecycle_livedata_2_0_0 failed (Exit 1)
--
| Aug 07, 2019 2:09:04 AM com.google.devtools.build.android.ValidateAndLinkResourcesAction main
| SEVERE: Error while validating and linking resources
| com.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\android-armeabi-v7a-fastbuild\bin\external\maven\androidx_arch_core_core_runtime_2_0_0_symbols\symbols.zip;bazel-out\android-armeabi-v7a-fastbuild\bin\external\maven\androidx_lifecycle_lifecycle_livedata_core_2_0_0_symbols\symbols.zip
```
A bisect shows the culprit is https://github.com/bazelbuild/bazel/commit/b98ad776b4d79f41e59631ddf7e1e135f8566df5
/cc @jin | [
"src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java",
"src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java",
"src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
index eb61855b672152..bbb6579df4b34a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
@@ -223,21 +223,15 @@ public <T> BusyBoxActionBuilder addTransitiveFlagForEach(
/**
* Adds an efficient flag and inputs based on transitive values.
*
- * <p>Each value will be separated on the command line by the host-specific path separator.
+ * <p>Each value will be separated on the command line by the ':' character, the option parser's
+ * PathListConverter delimiter.
*
* <p>Unlike other transitive input methods in this class, this method adds the values to both the
* command line and the list of inputs.
*/
public BusyBoxActionBuilder addTransitiveVectoredInput(
@CompileTimeConstant String arg, NestedSet<Artifact> values) {
- commandLine.addExecPaths(
- arg,
- VectorArg.join(
- dataContext
- .getActionConstructionContext()
- .getConfiguration()
- .getHostPathSeparator())
- .each(values));
+ commandLine.addExecPaths(arg, VectorArg.join(":").each(values));
inputs.addTransitive(values);
return this;
}
diff --git a/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java b/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
index 2d2c94d23b6ea1..f39b2b753c68d3 100644
--- a/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
+++ b/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
@@ -43,11 +43,8 @@
import com.google.common.xml.XmlEscapers;
import com.google.devtools.build.android.AndroidResourceOutputs.UniqueZipBuilder;
import com.google.protobuf.ByteString;
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
+
+import java.io.*;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -226,7 +223,17 @@ public Path writeManifestAsXmlTo(Path directory) {
/** The apk as path. */
public Path asApkPath() {
- return Paths.get(uri.toString().substring("jar:".length() + 1));
+ String pathString = uri.toString().substring("jar:".length() + 1);
+
+ // On Windows, the fully qualified URI looks like:
+ // jar:////C:/Users/user/AppData/Local/Temp/android_resources_tmp12318742536955859612/linked/bin.-pb.apk
+ //
+ // We want "C:/Users...".
+ if (pathString.startsWith("///")) {
+ pathString = pathString.substring("///".length());
+ }
+
+ return Paths.get(pathString);
}
/** Thrown when errors occur during proto apk processing. */
| null | val | train | 2019-08-08T00:02:11 | "2019-08-07T08:05:26Z" | meteorcloudy | test |
bazelbuild/bazel/9102_9118 | bazelbuild/bazel | bazelbuild/bazel/9102 | bazelbuild/bazel/9118 | [
"timestamp(timedelta=70702.0, similarity=0.8579835952566022)"
] | 00e9d16d69b191bdfdc32bfd6b2bed203e5af844 | fa90d78a716423ee270c99a3e8db350b016848ce | [
"It looks like this is being treated as a single filename?\r\n\r\nbazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_arch_core_core_runtime_2_0_0_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_lifecycle_lifecycle_livedata_core_2_0_0_symbols\\symbols.zip",
"I can reproduce this on Windows. Looking.\r\n\r\n```\r\nPS C:\\Users\\jingwen\\Code\\rules_jvm_external\\examples\\android_instrumentation_test> bazel build //src/test:greeter_test_app --an\r\ndroid_aapt=aapt2\r\nINFO: Analyzed target //src/test:greeter_test_app (0 packages loaded, 0 targets configured).\r\nINFO: Found 1 target...\r\nINFO: From Linking external/bazel_tools/src/main/native/windows/windows_jni.dll [for host]:\r\n Creating library bazel-out/host/bin/external/bazel_tools/src/main/native/windows/windows_jni.dll.if.lib and object bazel-out/host/bin/external/bazel_tools/src/main/native/windows/windows_jni.dll.if.exp\r\nERROR: C:/users/jingwen/_bazel_jingwen/w7ee76y7/external/maven/BUILD:31:1: Linking static android resource library for @maven//:androidx_test_espresso_espresso_core failed (Exit 1)\r\nAug 07, 2019 12:24:23 PM com.google.devtools.build.android.ValidateAndLinkResourcesAction main\r\nSEVERE: Error while validating and linking resources\r\ncom.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at com.google.devtools.build.android.aapt2.ResourceLinker$LinkError.of(ResourceLinker.java:112)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$rethrowLinkError$8(ResourceLinker.java:338)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)\r\n at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)\r\n at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)\r\n at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)\r\n at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)\r\n at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.compiledResourcesToPaths(ResourceLinker.java:301)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.linkStatically(ResourceLinker.java:244)\r\n at com.google.devtools.build.android.ValidateAndLinkResourcesAction.main(ValidateAndLinkResourcesAction.java:195)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$13.call(ResourceProcessorBusyBox.java:138)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:239)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nCaused by: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)\r\n at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:116)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.filterZip(ResourceLinker.java:315)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$compiledResourcesToPaths$5(ResourceLinker.java:297)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)\r\n at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\r\n at java.base/java.lang.Thread.run(Thread.java:834)\r\n\r\nException in thread \"main\" com.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at com.google.devtools.build.android.aapt2.ResourceLinker$LinkError.of(ResourceLinker.java:112)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$rethrowLinkError$8(ResourceLinker.java:338)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)\r\n at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)\r\n at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)\r\n at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)\r\n at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)\r\n at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)\r\n at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.compiledResourcesToPaths(ResourceLinker.java:301)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.linkStatically(ResourceLinker.java:244)\r\n at com.google.devtools.build.android.ValidateAndLinkResourcesAction.main(ValidateAndLinkResourcesAction.java:195)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$13.call(ResourceProcessorBusyBox.java:138)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:239)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nCaused by: java.nio.file.NoSuchFileException: bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_espresso_espresso_idling_resource_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_runner_symbols\\symbols.zip;bazel-out\\android-armeabi-v7a-fastbuild\\bin\\external\\maven\\androidx_test_monitor_symbols\\symbols.zip\r\n at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)\r\n at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)\r\n at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:116)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)\r\n at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.filterZip(ResourceLinker.java:315)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.lambda$compiledResourcesToPaths$5(ResourceLinker.java:297)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)\r\n at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)\r\n at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\r\n at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\r\n at java.base/java.lang.Thread.run(Thread.java:834)\r\nTarget //src/test:greeter_test_app failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 11.788s, Critical Path: 9.73s\r\nINFO: 72 processes: 43 local, 29 worker.\r\nFAILED: Build did NOT complete successfully\r\n```",
"Figured out the root cause. The params file contains:\r\n\r\n```\r\n--compiledDep\r\n'bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/androidx_test_monitor_symbols/symbols.zip;bazel-out/android-armeabi-v7a-fastbuild/bin/external/maven/androidx_test_core_symbols/symbols.zip'\r\n```\r\n\r\nNote the use of `;` as a delimiter. `--compiledDep` is a list of paths converted with `PathListConverter`\r\n\r\nhttps://github.com/bazelbuild/bazel/blob/13dc4f7d10b4f70a2c2ff9fe068e9c2e73f20dbc/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java#L55-L64\r\n\r\nwhich is delimited with `:` instead `;` \r\n\r\nhttps://github.com/bazelbuild/bazel/blob/a6e3e875c55b1a6d101c79ee5d171a96edb0caa6/src/tools/android/java/com/google/devtools/build/android/Converters.java#L302\r\n\r\nBut the `compiledDeps` execution paths were joined with `getHostPathSeparator()`, which is `;` for Windows only. \r\n\r\nhttps://github.com/bazelbuild/bazel/blob/d0bd3c8273e2a782d7e9b05a8b1fbab368589c9a/src/main/java/com/google/devtools/build/lib/analysis/config/OutputDirectories.java#L279",
"Now I'm running into another error:\r\n\r\n```\r\nERROR: C:/users/jingwen/code/rules_jvm_external/examples/android_instrumentation_test/src/main/BUILD:1:1: Processing Android resources for //src/main:greeter_app failed (Exit 1)\r\nAug 07, 2019 4:24:18 PM com.google.devtools.build.android.ResourceProcessorBusyBox processRequest\r\nSEVERE: Error during processing\r\njava.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Users/jingwen/AppData/Local/Temp/android_resources_tmp14123356876479215233/linked/bin.-pb.apk\r\n at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:111)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\r\n at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)\r\n at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)\r\n at java.base/java.nio.file.Path.of(Path.java:147)\r\n at java.base/java.nio.file.Paths.get(Paths.java:69)\r\n at com.google.devtools.build.android.aapt2.ProtoApk.asApkPath(ProtoApk.java:229)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:565)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:546)\r\n at com.google.devtools.build.android.Aapt2ResourcePackagingAction.main(Aapt2ResourcePackagingAction.java:190)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$14.call(ResourceProcessorBusyBox.java:144)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:242)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\n\r\nException in thread \"main\" java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Users/jingwen/AppData/Local/Temp/android_resources_tmp14123356876479215233/linked/bin.-pb.apk\r\n at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:111)\r\n at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\r\n at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)\r\n at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)\r\n at java.base/java.nio.file.Path.of(Path.java:147)\r\n at java.base/java.nio.file.Paths.get(Paths.java:69)\r\n at com.google.devtools.build.android.aapt2.ProtoApk.asApkPath(ProtoApk.java:229)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:565)\r\n at com.google.devtools.build.android.aapt2.ResourceLinker.link(ResourceLinker.java:546)\r\n at com.google.devtools.build.android.Aapt2ResourcePackagingAction.main(Aapt2ResourcePackagingAction.java:190)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$14.call(ResourceProcessorBusyBox.java:144)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:242)\r\n at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:203)\r\nTarget //src/test:greeter_test_app failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\n```"
] | [] | "2019-08-07T23:14:23Z" | [
"type: bug",
"P1",
"breakage",
"team-Android"
] | Bazel CI: Android build is failing on Windows | https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1128
```
(02:09:04) ERROR: D:/b/zqacmrtc/external/maven/BUILD:359:1: Couldn't build file external/maven/androidx_lifecycle_lifecycle_livedata_2_0_0_files/androidx_lifecycle_lifecycle_livedata_2_0_0_resources_aapt2-src.jar: Linking static android resource library for @maven//:androidx_lifecycle_lifecycle_livedata_2_0_0 failed (Exit 1)
--
| Aug 07, 2019 2:09:04 AM com.google.devtools.build.android.ValidateAndLinkResourcesAction main
| SEVERE: Error while validating and linking resources
| com.google.devtools.build.android.aapt2.ResourceLinker$LinkError: java.nio.file.NoSuchFileException: bazel-out\android-armeabi-v7a-fastbuild\bin\external\maven\androidx_arch_core_core_runtime_2_0_0_symbols\symbols.zip;bazel-out\android-armeabi-v7a-fastbuild\bin\external\maven\androidx_lifecycle_lifecycle_livedata_core_2_0_0_symbols\symbols.zip
```
A bisect shows the culprit is https://github.com/bazelbuild/bazel/commit/b98ad776b4d79f41e59631ddf7e1e135f8566df5
/cc @jin | [
"src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java",
"src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java",
"src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
index eb61855b672152..bbb6579df4b34a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/BusyBoxActionBuilder.java
@@ -223,21 +223,15 @@ public <T> BusyBoxActionBuilder addTransitiveFlagForEach(
/**
* Adds an efficient flag and inputs based on transitive values.
*
- * <p>Each value will be separated on the command line by the host-specific path separator.
+ * <p>Each value will be separated on the command line by the ':' character, the option parser's
+ * PathListConverter delimiter.
*
* <p>Unlike other transitive input methods in this class, this method adds the values to both the
* command line and the list of inputs.
*/
public BusyBoxActionBuilder addTransitiveVectoredInput(
@CompileTimeConstant String arg, NestedSet<Artifact> values) {
- commandLine.addExecPaths(
- arg,
- VectorArg.join(
- dataContext
- .getActionConstructionContext()
- .getConfiguration()
- .getHostPathSeparator())
- .each(values));
+ commandLine.addExecPaths(arg, VectorArg.join(":").each(values));
inputs.addTransitive(values);
return this;
}
diff --git a/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java b/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
index 2d2c94d23b6ea1..efc8401adf07ba 100644
--- a/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
+++ b/src/tools/android/java/com/google/devtools/build/android/aapt2/ProtoApk.java
@@ -226,7 +226,17 @@ public Path writeManifestAsXmlTo(Path directory) {
/** The apk as path. */
public Path asApkPath() {
- return Paths.get(uri.toString().substring("jar:".length() + 1));
+ String pathString = uri.toString().substring("jar:".length() + 1);
+
+ // On Windows, the fully qualified URI looks like:
+ // jar:////C:/Users/user/AppData/Local/Temp/android_resources_tmp12318742536955859612/linked/bin.-pb.apk
+ //
+ // We want "C:/Users...".
+ if (pathString.startsWith("///")) {
+ pathString = pathString.substring("///".length());
+ }
+
+ return Paths.get(pathString);
}
/** Thrown when errors occur during proto apk processing. */
| null | train | train | 2019-08-08T01:12:32 | "2019-08-07T08:05:26Z" | meteorcloudy | test |
bazelbuild/bazel/9106_9123 | bazelbuild/bazel | bazelbuild/bazel/9106 | bazelbuild/bazel/9123 | [
"timestamp(timedelta=0.0, similarity=0.9013943924457664)"
] | 6ad1623ed35bee162caf363e51b8c35c4b10fc3c | 4b685fa6659161951ce0418644483a07e440c48e | [] | [] | "2019-08-08T11:16:27Z" | [
"type: bug",
"P1",
"area-Windows",
"team-OSS"
] | Windows: bash-less run argument quoting is wrong | ### Description of the problem / feature request:
The Bash-less "bazel run" (see https://github.com/bazelbuild/bazel/issues/8240) quotes arguments incorrectly.
It works correctly in `--batch` mode, but adds extra `" "` around escaped arguments in server mode.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
`foo/BUILD`:
```
py_binary(
name = "x",
srcs = ["a.py"],
main = "a.py",
args = ["foo", "' '", "bar"],
)
```
`foo/a.py`:
```
from __future__ import print_function
import sys
for i in range(1, len(sys.argv)):
print("arg%d=(%s)" % (i, sys.argv[i]))
```
```
C:\src\gh8240>bazel --nobatch run foo:x --noincompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=( )
arg3=(bar)
C:\src\gh8240>bazel --nobatch run foo:x --incompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=(" ")
arg3=(bar)
C:\src\gh8240>bazel --batch run foo:x --noincompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=( )
arg3=(bar)
C:\src\gh8240>bazel --batch run foo:x --incompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=( )
arg3=(bar)
```
On Linux, the output is always the same for all flag combinations:
```
arg1=(foo)
arg2=( )
arg3=(bar)
```
### What operating system are you running Bazel on?
windows 10
### What's the output of `bazel info release`?
0.28.1
### Have you found anything relevant by searching the web?
This is blocking https://github.com/bazelbuild/bazel/issues/8240 | [
"src/main/cpp/BUILD",
"src/main/cpp/blaze.cc",
"src/main/cpp/blaze_util_platform.h",
"src/main/cpp/blaze_util_posix.cc",
"src/main/cpp/blaze_util_windows.cc",
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java",
"src/tools/launcher/util/BUILD"
] | [
"src/main/cpp/BUILD",
"src/main/cpp/blaze.cc",
"src/main/cpp/blaze_util_platform.h",
"src/main/cpp/blaze_util_posix.cc",
"src/main/cpp/blaze_util_windows.cc",
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java",
"src/tools/launcher/util/BUILD"
] | [
"src/test/shell/integration/py_args_escaping_test.sh"
] | diff --git a/src/main/cpp/BUILD b/src/main/cpp/BUILD
index 7de595dddebf4f..9e18a2b19121e5 100644
--- a/src/main/cpp/BUILD
+++ b/src/main/cpp/BUILD
@@ -64,6 +64,7 @@ cc_library(
"//src/main/cpp/util:logging",
] + select({
"//src/conditions:windows": [
+ "//src/tools/launcher/util",
"//src/main/native/windows:lib-file",
"//src/main/native/windows:lib-process",
],
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 5577d6a593835f..4b8e8f24d3ee6c 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -680,7 +680,7 @@ static void RunBatchMode(
{
WithEnvVars env_obj(PrepareEnvironmentForJvm());
- ExecuteProgram(server_exe, jvm_args_vector);
+ ExecuteServerJvm(server_exe, jvm_args_vector);
BAZEL_DIE(blaze_exit_code::INTERNAL_ERROR)
<< "execv of '" << server_exe << "' failed: " << GetLastErrorString();
}
@@ -2014,7 +2014,7 @@ unsigned int BlazeServer::Communicate(
// Execute the requested program, but before doing so, flush everything
// we still have to say.
fflush(NULL);
- ExecuteProgram(request.argv(0), argv);
+ ExecuteRunRequest(request.argv(0), argv);
}
// We'll exit with exit code SIGPIPE on Unixes due to PropagateSignalOnExit()
diff --git a/src/main/cpp/blaze_util_platform.h b/src/main/cpp/blaze_util_platform.h
index e7f5c3e5024ec0..c7c3aeefd2a7d8 100644
--- a/src/main/cpp/blaze_util_platform.h
+++ b/src/main/cpp/blaze_util_platform.h
@@ -140,11 +140,23 @@ std::string GetSystemJavabase();
// Return the path to the JVM binary relative to a javabase, e.g. "bin/java".
std::string GetJavaBinaryUnderJavabase();
-// Replace the current process with the given program in the current working
-// directory, using the given argument vector.
+// Start the Bazel server's JVM in the current directory.
+//
+// Note on Windows: 'server_jvm_args' is NOT expected to be escaped for
+// CreateProcessW.
+//
+// This function does not return on success.
+void ExecuteServerJvm(const std::string& exe,
+ const std::vector<std::string>& server_jvm_args);
+
+// Execute the "bazel run" request in the current directory.
+//
+// Note on Windows: 'run_request_args' IS expected to be escaped for
+// CreateProcessW.
+//
// This function does not return on success.
-void ExecuteProgram(const std::string& exe,
- const std::vector<std::string>& args_vector);
+void ExecuteRunRequest(const std::string& exe,
+ const std::vector<std::string>& run_request_args);
class BlazeServerStartup {
public:
diff --git a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc
index c7ee7b6b3ffbff..87ba899180f1a5 100644
--- a/src/main/cpp/blaze_util_posix.cc
+++ b/src/main/cpp/blaze_util_posix.cc
@@ -276,7 +276,8 @@ class CharPP {
char** charpp_;
};
-void ExecuteProgram(const string& exe, const vector<string>& args_vector) {
+static void ExecuteProgram(const string& exe,
+ const vector<string>& args_vector) {
BAZEL_LOG(INFO) << "Invoking binary " << exe << " in "
<< blaze_util::GetCwd();
@@ -289,6 +290,16 @@ void ExecuteProgram(const string& exe, const vector<string>& args_vector) {
execv(exe.c_str(), argv.get());
}
+void ExecuteServerJvm(const string& exe,
+ const std::vector<string>& server_jvm_args) {
+ ExecuteProgram(exe, server_jvm_args);
+}
+
+void ExecuteRunRequest(const string& exe,
+ const std::vector<string>& run_request_args) {
+ ExecuteProgram(exe, run_request_args);
+}
+
const char kListSeparator = ':';
bool SymlinkDirectories(const string &target, const string &link) {
diff --git a/src/main/cpp/blaze_util_windows.cc b/src/main/cpp/blaze_util_windows.cc
index 05dd37384a5335..c76885e4bcaf2e 100644
--- a/src/main/cpp/blaze_util_windows.cc
+++ b/src/main/cpp/blaze_util_windows.cc
@@ -52,6 +52,7 @@
#include "src/main/native/windows/file.h"
#include "src/main/native/windows/process.h"
#include "src/main/native/windows/util.h"
+#include "src/tools/launcher/util/launcher_util.h"
namespace blaze {
@@ -477,9 +478,6 @@ namespace {
// Max command line length is per CreateProcess documentation
// (https://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx)
-//
-// Quoting rules are described here:
-// https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
static const int MAX_CMDLINE_LENGTH = 32768;
@@ -487,7 +485,7 @@ struct CmdLine {
WCHAR cmdline[MAX_CMDLINE_LENGTH];
};
static void CreateCommandLine(CmdLine* result, const string& exe,
- const std::vector<string>& args_vector) {
+ const std::vector<std::wstring>& wargs_vector) {
std::wstringstream cmdline;
string short_exe;
if (!exe.empty()) {
@@ -501,7 +499,7 @@ static void CreateCommandLine(CmdLine* result, const string& exe,
}
bool first = true;
- for (const auto& s : args_vector) {
+ for (const std::wstring& wa : wargs_vector) {
if (first) {
// Skip first argument, it is equal to 'exe'.
first = false;
@@ -509,42 +507,7 @@ static void CreateCommandLine(CmdLine* result, const string& exe,
} else {
cmdline << L' ';
}
-
- bool has_space = s.find(" ") != string::npos;
-
- if (has_space) {
- cmdline << L'\"';
- }
-
- wstring ws = blaze_util::CstringToWstring(s.c_str()).get();
- std::wstring::const_iterator it = ws.begin();
- while (it != ws.end()) {
- wchar_t ch = *it++;
- switch (ch) {
- case L'"':
- // Escape double quotes
- cmdline << L"\\\"";
- break;
-
- case L'\\':
- if (it == ws.end()) {
- // Backslashes at the end of the string are quoted if we add quotes
- cmdline << (has_space ? L"\\\\" : L"\\");
- } else {
- // Backslashes everywhere else are quoted if they are followed by a
- // quote or a backslash
- cmdline << (*it == L'"' || *it == L'\\' ? L"\\\\" : L"\\");
- }
- break;
-
- default:
- cmdline << ch;
- }
- }
-
- if (has_space) {
- cmdline << L'\"';
- }
+ cmdline << wa;
}
wstring cmdline_str = cmdline.str();
@@ -722,8 +685,16 @@ int ExecuteDaemon(const string& exe,
STARTUPINFOEXW startupInfoEx = {0};
lpAttributeList->InitStartupInfoExW(&startupInfoEx);
+ std::vector<std::wstring> wesc_args_vector;
+ wesc_args_vector.reserve(args_vector.size());
+ for (const string& a : args_vector) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ std::wstring wesc = bazel::launcher::WindowsEscapeArg2(wa);
+ wesc_args_vector.push_back(wesc);
+ }
+
CmdLine cmdline;
- CreateCommandLine(&cmdline, exe, args_vector);
+ CreateCommandLine(&cmdline, exe, wesc_args_vector);
BOOL ok;
{
@@ -771,11 +742,12 @@ int ExecuteDaemon(const string& exe,
// Run the given program in the current working directory, using the given
// argument vector, wait for it to finish, then exit ourselves with the exitcode
// of that program.
-void ExecuteProgram(const string& exe, const std::vector<string>& args_vector) {
+static void ExecuteProgram(const string& exe,
+ const std::vector<std::wstring>& wargs_vector) {
std::wstring wexe = blaze_util::CstringToWstring(exe.c_str()).get();
CmdLine cmdline;
- CreateCommandLine(&cmdline, "", args_vector);
+ CreateCommandLine(&cmdline, "", wargs_vector);
bazel::windows::WaitableProcess proc;
std::wstring werror;
@@ -796,6 +768,35 @@ void ExecuteProgram(const string& exe, const std::vector<string>& args_vector) {
exit(x);
}
+void ExecuteServerJvm(const string& exe,
+ const std::vector<string>& server_jvm_args) {
+ std::vector<std::wstring> wargs;
+ wargs.reserve(server_jvm_args.size());
+ for (const string& a : server_jvm_args) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ std::wstring wesc = bazel::launcher::WindowsEscapeArg2(wa);
+ wargs.push_back(wesc);
+ }
+
+ ExecuteProgram(exe, wargs);
+}
+
+void ExecuteRunRequest(const string& exe,
+ const std::vector<string>& run_request_args) {
+ std::vector<std::wstring> wargs;
+ wargs.reserve(run_request_args.size());
+ std::wstringstream joined;
+ for (const string& a : run_request_args) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ // The arguments are already escaped (Bash-style or Windows-style, depending
+ // on --[no]incompatible_windows_bashless_run_command).
+ wargs.push_back(wa);
+ joined << L' ' << wa;
+ }
+
+ ExecuteProgram(exe, wargs);
+}
+
const char kListSeparator = ';';
bool SymlinkDirectories(const string &posix_target, const string &posix_name) {
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
index de994231a0dbe6..47f4f68fa82390 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
@@ -519,9 +519,16 @@ public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult opti
return BlazeCommandResult.exitCode(ExitCode.COMMAND_LINE_ERROR);
}
+ String shellEscaped = ShellEscaper.escapeJoinAll(cmdLine);
+ if (OS.getCurrent() == OS.WINDOWS) {
+ // On Windows, we run Bash as a subprocess of the client (via CreateProcessW).
+ // Bash uses its own (Bash-style) flag parsing logic, not the default logic for which
+ // ShellUtils.windowsEscapeArg escapes, so we escape the flags once again Bash-style.
+ shellEscaped = "\"" + shellEscaped.replace("\\", "\\\\").replace("\"", "\\\"") + "\"";
+ }
+
ImmutableList<String> shellCmdLine =
- ImmutableList.<String>of(
- shExecutable.getPathString(), "-c", ShellEscaper.escapeJoinAll(cmdLine));
+ ImmutableList.<String>of(shExecutable.getPathString(), "-c", shellEscaped);
for (String arg : shellCmdLine) {
execDescription.addArgv(ByteString.copyFrom(arg, StandardCharsets.ISO_8859_1));
diff --git a/src/tools/launcher/util/BUILD b/src/tools/launcher/util/BUILD
index 70a4c05f1332cc..c4a66ef90a1901 100644
--- a/src/tools/launcher/util/BUILD
+++ b/src/tools/launcher/util/BUILD
@@ -20,6 +20,7 @@ win_cc_library(
srcs = ["launcher_util.cc"],
hdrs = ["launcher_util.h"],
visibility = [
+ "//src/main/cpp:__pkg__",
"//src/tools/launcher:__subpackages__",
"//tools/test:__pkg__",
],
| diff --git a/src/test/shell/integration/py_args_escaping_test.sh b/src/test/shell/integration/py_args_escaping_test.sh
index 59bf5b14bb2337..f3d4ed42c48d89 100755
--- a/src/test/shell/integration/py_args_escaping_test.sh
+++ b/src/test/shell/integration/py_args_escaping_test.sh
@@ -231,11 +231,41 @@ function test_args_escaping() {
create_py_file_that_prints_args "$ws"
create_build_file_with_many_args "$ws"
- # On all platforms, the target prints good output.
+ # Batch mode, Bash-less run command.
+ if $is_windows; then
+ ( cd "$ws"
+ bazel --batch run --incompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+ fi
+
+ # Batch mode, Bash-ful run command.
+ ( cd "$ws"
+ bazel --batch run --noincompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+
+ # Server mode, Bash-less run command.
+ if $is_windows; then
+ ( cd "$ws"
+ bazel run --incompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+ fi
+
+ # Server mode, Bash-ful run command.
( cd "$ws"
- bazel run --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ bazel run --noincompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
)
assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
}
function test_untokenizable_args() {
| train | train | 2019-08-08T12:13:36 | "2019-08-07T14:04:39Z" | laszlocsomor | test |
bazelbuild/bazel/9108_9123 | bazelbuild/bazel | bazelbuild/bazel/9108 | bazelbuild/bazel/9123 | [
"timestamp(timedelta=1.0, similarity=0.9128970231544254)"
] | 6ad1623ed35bee162caf363e51b8c35c4b10fc3c | 4b685fa6659161951ce0418644483a07e440c48e | [
"https://github.com/bazelbuild/bazel/pull/9123 will fix this"
] | [] | "2019-08-08T11:16:27Z" | [
"type: bug",
"P1",
"area-Windows",
"team-OSS"
] | Windows: bazel --batch run //foo:sh_binary argument quoting is wrong | ### Description of the problem / feature request:
On Windows, in `--batch` mode, either `bazel run` or the sh_binary launcher incorrectly quote arguments for sh_binary.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
`BUILD`:
```
sh_binary(
name = "y",
srcs = ["a.sh"],
args = ["foo", "'\"'", "bar"],
)
```
`a.sh`:
```
#!/bin/bash
i=1
total=$#
while [[ "$i" -le "$total" ]]; do
echo "arg$i=($1)"
i=$((i+1))
shift
done
```
On Windows, `bazel run` fails for this in `--batch` mode:
```
C:\src\gh8240>bazel run foo:y
(...)
arg1=(foo)
arg2=(")
arg3=(bar)
C:\src\gh8240>bazel --batch run foo:y
(...)
/usr/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/usr/bin/bash: -c: line 1: syntax error: unexpected end of file
```
It's also broken with `--incompatible_windows_bashless_run_command`:
```
C:\src\gh8240>bazel run foo:y --noincompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=(")
arg3=(bar)
C:\src\gh8240>bazel run foo:y --incompatible_windows_bashless_run_command
(...)
arg1=(foo)
arg2=("\"")
arg3=(bar)
```
On Linux, the output is always:
```
arg1=(foo)
arg2=(")
arg3=(bar)
```
### What operating system are you running Bazel on?
windows 10
### What's the output of `bazel info release`?
0.28.1
### Have you found anything relevant by searching the web?
Related: https://github.com/bazelbuild/bazel/issues/9106, https://github.com/bazelbuild/bazel/issues/8240 | [
"src/main/cpp/BUILD",
"src/main/cpp/blaze.cc",
"src/main/cpp/blaze_util_platform.h",
"src/main/cpp/blaze_util_posix.cc",
"src/main/cpp/blaze_util_windows.cc",
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java",
"src/tools/launcher/util/BUILD"
] | [
"src/main/cpp/BUILD",
"src/main/cpp/blaze.cc",
"src/main/cpp/blaze_util_platform.h",
"src/main/cpp/blaze_util_posix.cc",
"src/main/cpp/blaze_util_windows.cc",
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java",
"src/tools/launcher/util/BUILD"
] | [
"src/test/shell/integration/py_args_escaping_test.sh"
] | diff --git a/src/main/cpp/BUILD b/src/main/cpp/BUILD
index 7de595dddebf4f..9e18a2b19121e5 100644
--- a/src/main/cpp/BUILD
+++ b/src/main/cpp/BUILD
@@ -64,6 +64,7 @@ cc_library(
"//src/main/cpp/util:logging",
] + select({
"//src/conditions:windows": [
+ "//src/tools/launcher/util",
"//src/main/native/windows:lib-file",
"//src/main/native/windows:lib-process",
],
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 5577d6a593835f..4b8e8f24d3ee6c 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -680,7 +680,7 @@ static void RunBatchMode(
{
WithEnvVars env_obj(PrepareEnvironmentForJvm());
- ExecuteProgram(server_exe, jvm_args_vector);
+ ExecuteServerJvm(server_exe, jvm_args_vector);
BAZEL_DIE(blaze_exit_code::INTERNAL_ERROR)
<< "execv of '" << server_exe << "' failed: " << GetLastErrorString();
}
@@ -2014,7 +2014,7 @@ unsigned int BlazeServer::Communicate(
// Execute the requested program, but before doing so, flush everything
// we still have to say.
fflush(NULL);
- ExecuteProgram(request.argv(0), argv);
+ ExecuteRunRequest(request.argv(0), argv);
}
// We'll exit with exit code SIGPIPE on Unixes due to PropagateSignalOnExit()
diff --git a/src/main/cpp/blaze_util_platform.h b/src/main/cpp/blaze_util_platform.h
index e7f5c3e5024ec0..c7c3aeefd2a7d8 100644
--- a/src/main/cpp/blaze_util_platform.h
+++ b/src/main/cpp/blaze_util_platform.h
@@ -140,11 +140,23 @@ std::string GetSystemJavabase();
// Return the path to the JVM binary relative to a javabase, e.g. "bin/java".
std::string GetJavaBinaryUnderJavabase();
-// Replace the current process with the given program in the current working
-// directory, using the given argument vector.
+// Start the Bazel server's JVM in the current directory.
+//
+// Note on Windows: 'server_jvm_args' is NOT expected to be escaped for
+// CreateProcessW.
+//
+// This function does not return on success.
+void ExecuteServerJvm(const std::string& exe,
+ const std::vector<std::string>& server_jvm_args);
+
+// Execute the "bazel run" request in the current directory.
+//
+// Note on Windows: 'run_request_args' IS expected to be escaped for
+// CreateProcessW.
+//
// This function does not return on success.
-void ExecuteProgram(const std::string& exe,
- const std::vector<std::string>& args_vector);
+void ExecuteRunRequest(const std::string& exe,
+ const std::vector<std::string>& run_request_args);
class BlazeServerStartup {
public:
diff --git a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc
index c7ee7b6b3ffbff..87ba899180f1a5 100644
--- a/src/main/cpp/blaze_util_posix.cc
+++ b/src/main/cpp/blaze_util_posix.cc
@@ -276,7 +276,8 @@ class CharPP {
char** charpp_;
};
-void ExecuteProgram(const string& exe, const vector<string>& args_vector) {
+static void ExecuteProgram(const string& exe,
+ const vector<string>& args_vector) {
BAZEL_LOG(INFO) << "Invoking binary " << exe << " in "
<< blaze_util::GetCwd();
@@ -289,6 +290,16 @@ void ExecuteProgram(const string& exe, const vector<string>& args_vector) {
execv(exe.c_str(), argv.get());
}
+void ExecuteServerJvm(const string& exe,
+ const std::vector<string>& server_jvm_args) {
+ ExecuteProgram(exe, server_jvm_args);
+}
+
+void ExecuteRunRequest(const string& exe,
+ const std::vector<string>& run_request_args) {
+ ExecuteProgram(exe, run_request_args);
+}
+
const char kListSeparator = ':';
bool SymlinkDirectories(const string &target, const string &link) {
diff --git a/src/main/cpp/blaze_util_windows.cc b/src/main/cpp/blaze_util_windows.cc
index 05dd37384a5335..c76885e4bcaf2e 100644
--- a/src/main/cpp/blaze_util_windows.cc
+++ b/src/main/cpp/blaze_util_windows.cc
@@ -52,6 +52,7 @@
#include "src/main/native/windows/file.h"
#include "src/main/native/windows/process.h"
#include "src/main/native/windows/util.h"
+#include "src/tools/launcher/util/launcher_util.h"
namespace blaze {
@@ -477,9 +478,6 @@ namespace {
// Max command line length is per CreateProcess documentation
// (https://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx)
-//
-// Quoting rules are described here:
-// https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
static const int MAX_CMDLINE_LENGTH = 32768;
@@ -487,7 +485,7 @@ struct CmdLine {
WCHAR cmdline[MAX_CMDLINE_LENGTH];
};
static void CreateCommandLine(CmdLine* result, const string& exe,
- const std::vector<string>& args_vector) {
+ const std::vector<std::wstring>& wargs_vector) {
std::wstringstream cmdline;
string short_exe;
if (!exe.empty()) {
@@ -501,7 +499,7 @@ static void CreateCommandLine(CmdLine* result, const string& exe,
}
bool first = true;
- for (const auto& s : args_vector) {
+ for (const std::wstring& wa : wargs_vector) {
if (first) {
// Skip first argument, it is equal to 'exe'.
first = false;
@@ -509,42 +507,7 @@ static void CreateCommandLine(CmdLine* result, const string& exe,
} else {
cmdline << L' ';
}
-
- bool has_space = s.find(" ") != string::npos;
-
- if (has_space) {
- cmdline << L'\"';
- }
-
- wstring ws = blaze_util::CstringToWstring(s.c_str()).get();
- std::wstring::const_iterator it = ws.begin();
- while (it != ws.end()) {
- wchar_t ch = *it++;
- switch (ch) {
- case L'"':
- // Escape double quotes
- cmdline << L"\\\"";
- break;
-
- case L'\\':
- if (it == ws.end()) {
- // Backslashes at the end of the string are quoted if we add quotes
- cmdline << (has_space ? L"\\\\" : L"\\");
- } else {
- // Backslashes everywhere else are quoted if they are followed by a
- // quote or a backslash
- cmdline << (*it == L'"' || *it == L'\\' ? L"\\\\" : L"\\");
- }
- break;
-
- default:
- cmdline << ch;
- }
- }
-
- if (has_space) {
- cmdline << L'\"';
- }
+ cmdline << wa;
}
wstring cmdline_str = cmdline.str();
@@ -722,8 +685,16 @@ int ExecuteDaemon(const string& exe,
STARTUPINFOEXW startupInfoEx = {0};
lpAttributeList->InitStartupInfoExW(&startupInfoEx);
+ std::vector<std::wstring> wesc_args_vector;
+ wesc_args_vector.reserve(args_vector.size());
+ for (const string& a : args_vector) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ std::wstring wesc = bazel::launcher::WindowsEscapeArg2(wa);
+ wesc_args_vector.push_back(wesc);
+ }
+
CmdLine cmdline;
- CreateCommandLine(&cmdline, exe, args_vector);
+ CreateCommandLine(&cmdline, exe, wesc_args_vector);
BOOL ok;
{
@@ -771,11 +742,12 @@ int ExecuteDaemon(const string& exe,
// Run the given program in the current working directory, using the given
// argument vector, wait for it to finish, then exit ourselves with the exitcode
// of that program.
-void ExecuteProgram(const string& exe, const std::vector<string>& args_vector) {
+static void ExecuteProgram(const string& exe,
+ const std::vector<std::wstring>& wargs_vector) {
std::wstring wexe = blaze_util::CstringToWstring(exe.c_str()).get();
CmdLine cmdline;
- CreateCommandLine(&cmdline, "", args_vector);
+ CreateCommandLine(&cmdline, "", wargs_vector);
bazel::windows::WaitableProcess proc;
std::wstring werror;
@@ -796,6 +768,35 @@ void ExecuteProgram(const string& exe, const std::vector<string>& args_vector) {
exit(x);
}
+void ExecuteServerJvm(const string& exe,
+ const std::vector<string>& server_jvm_args) {
+ std::vector<std::wstring> wargs;
+ wargs.reserve(server_jvm_args.size());
+ for (const string& a : server_jvm_args) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ std::wstring wesc = bazel::launcher::WindowsEscapeArg2(wa);
+ wargs.push_back(wesc);
+ }
+
+ ExecuteProgram(exe, wargs);
+}
+
+void ExecuteRunRequest(const string& exe,
+ const std::vector<string>& run_request_args) {
+ std::vector<std::wstring> wargs;
+ wargs.reserve(run_request_args.size());
+ std::wstringstream joined;
+ for (const string& a : run_request_args) {
+ std::wstring wa = blaze_util::CstringToWstring(a.c_str()).get();
+ // The arguments are already escaped (Bash-style or Windows-style, depending
+ // on --[no]incompatible_windows_bashless_run_command).
+ wargs.push_back(wa);
+ joined << L' ' << wa;
+ }
+
+ ExecuteProgram(exe, wargs);
+}
+
const char kListSeparator = ';';
bool SymlinkDirectories(const string &posix_target, const string &posix_name) {
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
index de994231a0dbe6..47f4f68fa82390 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
@@ -519,9 +519,16 @@ public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult opti
return BlazeCommandResult.exitCode(ExitCode.COMMAND_LINE_ERROR);
}
+ String shellEscaped = ShellEscaper.escapeJoinAll(cmdLine);
+ if (OS.getCurrent() == OS.WINDOWS) {
+ // On Windows, we run Bash as a subprocess of the client (via CreateProcessW).
+ // Bash uses its own (Bash-style) flag parsing logic, not the default logic for which
+ // ShellUtils.windowsEscapeArg escapes, so we escape the flags once again Bash-style.
+ shellEscaped = "\"" + shellEscaped.replace("\\", "\\\\").replace("\"", "\\\"") + "\"";
+ }
+
ImmutableList<String> shellCmdLine =
- ImmutableList.<String>of(
- shExecutable.getPathString(), "-c", ShellEscaper.escapeJoinAll(cmdLine));
+ ImmutableList.<String>of(shExecutable.getPathString(), "-c", shellEscaped);
for (String arg : shellCmdLine) {
execDescription.addArgv(ByteString.copyFrom(arg, StandardCharsets.ISO_8859_1));
diff --git a/src/tools/launcher/util/BUILD b/src/tools/launcher/util/BUILD
index 70a4c05f1332cc..c4a66ef90a1901 100644
--- a/src/tools/launcher/util/BUILD
+++ b/src/tools/launcher/util/BUILD
@@ -20,6 +20,7 @@ win_cc_library(
srcs = ["launcher_util.cc"],
hdrs = ["launcher_util.h"],
visibility = [
+ "//src/main/cpp:__pkg__",
"//src/tools/launcher:__subpackages__",
"//tools/test:__pkg__",
],
| diff --git a/src/test/shell/integration/py_args_escaping_test.sh b/src/test/shell/integration/py_args_escaping_test.sh
index 59bf5b14bb2337..f3d4ed42c48d89 100755
--- a/src/test/shell/integration/py_args_escaping_test.sh
+++ b/src/test/shell/integration/py_args_escaping_test.sh
@@ -231,11 +231,41 @@ function test_args_escaping() {
create_py_file_that_prints_args "$ws"
create_build_file_with_many_args "$ws"
- # On all platforms, the target prints good output.
+ # Batch mode, Bash-less run command.
+ if $is_windows; then
+ ( cd "$ws"
+ bazel --batch run --incompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+ fi
+
+ # Batch mode, Bash-ful run command.
+ ( cd "$ws"
+ bazel --batch run --noincompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+
+ # Server mode, Bash-less run command.
+ if $is_windows; then
+ ( cd "$ws"
+ bazel run --incompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ )
+ assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
+ fi
+
+ # Server mode, Bash-ful run command.
( cd "$ws"
- bazel run --verbose_failures :x &>"$TEST_log" || fail "expected success"
+ bazel run --noincompatible_windows_bashless_run_command \
+ --verbose_failures :x &>"$TEST_log" || fail "expected success"
)
assert_good_output_of_the_program_with_many_args
+ rm "$TEST_log"
}
function test_untokenizable_args() {
| val | train | 2019-08-08T12:13:36 | "2019-08-07T14:12:25Z" | laszlocsomor | test |
bazelbuild/bazel/9155_9169 | bazelbuild/bazel | bazelbuild/bazel/9155 | bazelbuild/bazel/9169 | [
"timestamp(timedelta=0.0, similarity=0.8786687211720238)"
] | 2f42d174cefa9b7def2e4cb5117a43d434bbbf12 | 3635f8286626a3ceb8274a8014b498d603ad39dc | [] | [
"Do we want to recommend //src:bazel-dev.exe instead?",
"Good idea! Yes.\r\nWill do in internal review."
] | "2019-08-14T12:22:09Z" | [
"type: documentation (cleanup)",
"P2",
"team-OSS"
] | Building bazel Docs missing install info | > ATTENTION! Please read and follow:
> - if this is a _question_ about how to build / test / query / deploy using Bazel, or a _discussion starter_, send it to [email protected]
> - if this is a _bug_ or _feature request_, fill the form below as best as you can.
### Description of the problem / feature request:
> Looking at the page...
> https://docs.bazel.build/versions/master/install-compile-source.html
>
> It seems relatively straight forward to build a version of bazel (for the current machine) using the downloaded bazel binary to build itself.
>
> So I did as the instructions said..
> ```
> bazel build //src:bazel
> ```
> All is well.. except **Where is the built binary?** and **How do I Install it?**
>
> There is just no information on this, making the whole exercise futile!
>
### Feature requests: what underlying problem are you trying to solve with this feature?
> Original problem.. building "tenserflow" producing "`this rule is missing dependency declarations`" errors, that nothing seems to resolve!
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
> Replace this line with your answer.
### What operating system are you running Bazel on?
> Red Hat Enterprise Linux Server release 7.6 (Maipo)
### What's the output of `bazel info release`?
> release 0.26.1
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
> Replace this line with your answer.
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
> No GIT!
> Installed binary bazel-0.26.1-installer-linux-x86_64.sh
> Compiling from source tar file from same version.
### Have you found anything relevant by searching the web?
> Replace these lines with your answer.
>
> Places to look:
> - StackOverflow: http://stackoverflow.com/questions/tagged/bazel
> - GitHub issues: https://github.com/bazelbuild/bazel/issues
> - email threads on https://groups.google.com/forum/#!forum/bazel-discuss
### Any other information, logs, or outputs that you want to share?
> Replace these lines with your answer.
>
> If the files are large, upload as attachment or provide link.
| [
"site/_layouts/documentation.html",
"site/docs/install-compile-source.md"
] | [
"site/_layouts/documentation.html",
"site/docs/install-compile-source.md"
] | [] | diff --git a/site/_layouts/documentation.html b/site/_layouts/documentation.html
index 0f8515e292431c..a43ac66ff8741a 100644
--- a/site/_layouts/documentation.html
+++ b/site/_layouts/documentation.html
@@ -10,7 +10,7 @@
{% if version_components.size < 2 %}
{% assign major_version = "master" %}
{% assign minor_version = "master" %}
-{% else % }
+{% else %}
{% assign major_version = version_components[0] | plus:0 %}
{% assign minor_version = version_components[1] | plus:0 %}
{% endif %}
diff --git a/site/docs/install-compile-source.md b/site/docs/install-compile-source.md
index d2f550ee2798ed..eac2c5801172b5 100644
--- a/site/docs/install-compile-source.md
+++ b/site/docs/install-compile-source.md
@@ -14,22 +14,138 @@ To build Bazel from source, you can do one of the following:
<h2 id="build-bazel-using-bazel">Build Bazel using Bazel</h2>
-If you already have a Bazel binary, you can build Bazel from a GitHub checkout.
+TL;DR:
-You will need:
+1. [Get the latest Bazel release](https://github.com/bazelbuild/bazel/releases)
-* A GitHub checkout of Bazel's sources at the desired commit.
+2. [Download Bazel's sources from GitHub](https://github.com/bazelbuild/bazel/archive/master.zip)
+ and extract somwhere.
+ Alternatively you can git clone the source tree from https://github.com/bazelbuild/bazel
-* The Bazel version that was the latest when the commit was merged. (Other
- Bazel versions may work too, but are not guaranteed to.) You can either
- download this version from
- [GitHub](https://github.com/bazelbuild/bazel/releases), or build it from
- source, or bootstrap it as described below.
+3. Install the same prerequisites as for bootstrapping (see
+ [for Unix-like systems](#bootstrap-unix-prereq) or
+ [for Windows](#bootstrap-windows-prereq))
-* The same prerequisites as for bootstrapping (JDK, C++ compiler, etc.)
+4. Build Bazel using Bazel: `bazel build //src:bazel`
+ (or `bazel build //src:bazel.exe` on Windows)
-Once you have a Bazel binary to build with and the source tree of Bazel, `cd`
-into the directory and run `bazel build //src:bazel`.
+5. The resulting binary is at `bazel-bin/src/bazel`
+ (or `bazel-bin\src\bazel.exe` on Windows). You can copy it wherever you
+ like and use immediately without further installation.
+
+Detailed instructions follow below.
+
+<h3 id="build-bazel-install-bazel">1. Get the latest Bazel release</h3>
+
+**Goal**: Install or download a release version of Bazel. Make sure you can run
+it by typing `bazel` in a terminal.
+
+**Reason**: To build Bazel from a GitHub source tree, you need a pre-existing
+Bazel binary. You can install one from a package manager or download one from
+GitHub. See <a href="install.html">Installing Bazel</a>. (Or you can [build from
+scratch (bootstrap)](#bootstrap-bazel).)
+
+**Troubleshooting**:
+
+* If you cannot run Bazel by typing `bazel` in a terminal:
+
+ * Maybe your Bazel binary's directory is not on the PATH.
+
+ This is not a big problem. Instead of typing `bazel`, you will need to
+ type the full path.
+
+ * Maybe the Bazel binary itself is not called `bazel` (on Unixes) or
+ `bazel.exe` (on Windows).
+
+ This is not a big problem. You can either rename the binary, or type the
+ binary's name instead of `bazel`.
+
+ * Maybe the binary is not executable (on Unixes).
+
+ You must make the binary executable by running `chmod +x /path/to/bazel`.
+
+<h3 id="build-bazel-git">2. Download Bazel's sources from GitHub</h3>
+
+If you are familiar with Git, then just git clone https://github.com/bazelbuild/bazel
+
+Otherwise:
+
+1. Download the
+ [latest sources as a zip file](https://github.com/bazelbuild/bazel/archive/master.zip).
+
+2. Extract the contents somewhere.
+
+ For example create a `bazel-src` directory under your home directory and
+ extract there.
+
+**Advanced**:
+
+If you want to build Bazel at an earlier commit than HEAD, you'll need the Bazel
+release that was the latest one when the commit was merged. (Other Bazel
+versions may work too, but are not guaranteed to.) You can either download this
+version from [GitHub](https://github.com/bazelbuild/bazel/releases), or build it
+from source, or bootstrap it as described below.
+
+<h3 id="build-bazel-prerequisites">3. Install prerequisites</h3>
+
+Install the same prerequisites as for bootstrapping (see below) -- JDK, C++
+compiler, MSYS2 (if you are building on Windows), etc.
+
+<h3 id="build-bazel-on-unixes">4. Build Bazel on Ubuntu Linux, macOS, and other
+Unix-like systems</h3>
+
+([Scroll down](#build-bazel-on-windows) for instructions for Windows.)
+
+**Goal**: Run Bazel to build a custom Bazel binary (`bazel-bin/src/bazel`).
+
+**Instructions**:
+
+1. Start a Bash terminal
+
+2. `cd` into the directory where you extracted (or cloned) Bazel's sources.
+
+ For example if you extracted the sources under your home directory, run:
+
+ cd ~/bazel-src
+
+3. Build Bazel from source:
+
+ bazel build //src:bazel
+
+4. The output will be at `bazel-bin/src/bazel`
+
+<h3 id="build-bazel-on-windows">4. Build Bazel on Windows</h3>
+
+([Scroll up](#build-bazel-on-unixes) for instructions for Linux, macOS, and other
+Unix-like systems.)
+
+**Goal**: Run Bazel to build a custom Bazel binary (`bazel-bin\src\bazel.exe`).
+
+**Instructions**:
+
+1. Start Command Prompt (Start Menu > Run > "cmd.exe")
+
+2. `cd` into the directory where you extracted (or cloned) Bazel's sources.
+
+ For example if you extracted the sources under your home directory, run:
+
+ cd %USERPROFILE%\bazel-src
+
+3. Build Bazel from source:
+
+ bazel build //src:bazel.exe
+
+4. The output will be at `bazel-bin\src\bazel.exe`
+
+<h3 id="build-bazel-install">5. Install the built binary</h3>
+
+Actually, there's nothing to install.
+
+The output of the previous step is a self-contained Bazel binary. You can copy
+it to any directory and use immediately. (It's useful if that directory is on
+your PATH so that you can run "bazel" everywhere.)
+
+---
<h2 id="bootstrap-bazel">Build Bazel from scratch (bootstrapping)</h2>
@@ -41,24 +157,26 @@ You can also build Bazel from scratch, without using an existing Bazel binary.
1. Download `bazel-<version>-dist.zip` from
[GitHub](https://github.com/bazelbuild/bazel/releases), for example
- `bazel-0.18.0-dist.zip`.
+ `bazel-0.28.1-dist.zip`.
- There is a **single, architecture-independent** distribution archive. There
- are no architecture-specific or OS-specific distribution archives.
+ **Attention**:
- You **have to use the distribution archive** to bootstrap Bazel. You cannot
- use a source tree cloned from GitHub. (The distribution archive contains
- generated source files that are required for bootstrapping and are not part
- of the normal Git source tree.)
+ - There is a **single, architecture-independent** distribution archive.
+ There are no architecture-specific or OS-specific distribution archives.
+ - These sources are **not the same as the GitHub source tree**. You
+ have to use the distribution archive to bootstrap Bazel. You cannot
+ use a source tree cloned from GitHub. (The distribution archive contains
+ generated source files that are required for bootstrapping and are not part
+ of the normal Git source tree.)
-2. Unpack the zip file somewhere on disk.
+2. Unpack the distribution archive somewhere on disk.
We recommend to also verify the signature made by our
[release key](https://bazel.build/bazel-release.pub.gpg) 48457EE0.
-**To build a development version** of Bazel from a GitHub checkout, you need a
-working Bazel binary. [Scroll up](#build-bazel-using-bazel) to see how to build
-Bazel using Bazel.
+**To build a development version** of Bazel from a GitHub source tree, you need
+a working Bazel binary. [Scroll up](#build-bazel-using-bazel) to see how to
+build Bazel using Bazel.
<h3 id="bootstrap-unix">2. Bootstrap Bazel on Ubuntu Linux, macOS, and other Unix-like systems</h3>
@@ -100,7 +218,7 @@ on your `PATH` (such as `/usr/local/bin` on Linux).
To build the `bazel` binary in a reproducible way, also set
[`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/specs/source-date-epoch/)
-in the `compile.sh` step.
+in the "Run the compilation script" step.
<h3 id="bootstrap-windows">2. Bootstrap Bazel on Windows</h3>
@@ -162,12 +280,16 @@ Unix-like systems.)
3. `cd` to the directory where you unpacked the distribution archive.
-4. Run the compilation script: `./compile.sh`
+4. Run the compilation script: `env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" ./compile.sh`
The compiled output is placed into `output/bazel.exe`. This is a self-contained
Bazel binary, without an embedded JDK. You can copy it anywhere or use it
in-place. For convenience we recommend copying this binary to a directory that's
on your `PATH`.
+To build the `bazel.exe` binary in a reproducible way, also set
+[`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/specs/source-date-epoch/)
+in the "Run the compilation script" step.
+
You don't need to run Bazel from the MSYS2 shell. You can run Bazel from the
Command Prompt (`cmd.exe`) or PowerShell.
| null | train | train | 2019-08-14T12:36:00 | "2019-08-13T04:56:08Z" | antofthy | test |
bazelbuild/bazel/9181_9228 | bazelbuild/bazel | bazelbuild/bazel/9181 | bazelbuild/bazel/9228 | [
"timestamp(timedelta=0.0, similarity=0.869423019751391)"
] | 18e8981fab5e2beaf7643df4948f0f5027341764 | d4da8a8dbb8c3fc08292cbdfef1229cc61971117 | [] | [
"I think renaming this would be a breaking change. May need to keep the old name for now.",
"Yes, it's clearly breaking! The question is if it's a change that's allowed to be made according to the compatability policy, the [Backwards Compatability document](https://docs.bazel.build/versions/master/backward-compatibility.html) does not mention what's allowed and not in these edge cases.\r\n\r\nTo draw some inspiration from other projects: the [Go1 compatability document](https://golang.org/doc/go1compat) states:\r\n\r\n> If a compiler or library has a bug that violates the specification, a program that depends on the buggy behavior may break if the bug is fixed. We reserve the right to fix such bugs.\r\n\r\nI think that this is an example of that, as the Starlark implementation in Bazel does not satisfy the [spec](https://github.com/bazelbuild/starlark/blob/master/spec.md#stringreplace).\r\n\r\nI'll leave it up to you and the team to figure this out, but I do think that it would be nice to allow to make some breaking changes without increasing the major-version number in the future.\r\n ",
"This is definitely a breaking change which is not allowed by our policy -- apologies this is not clear by the policy doc, but this is definitely going to break some users and cause some pain if we change it.\r\n\r\nWe should avoid renaming this for now.\r\nThe parameter is tagged with `legacyNamed = true`, so, subject to the rollout of https://github.com/bazelbuild/bazel/issues/8147, this parameter will be positional-only in the future. We can then rename the parameter safely for documentation purposes.",
"2019*",
"StringModuleTest ?",
"StringModule ?",
"Please update:\r\n\r\n> \"The maximum number of replacements. A negative value is ignored.\"",
"Super nit: I feel like `count >= 0` is more readable than `count > -1`.",
"To clarify, there's two breaking changes: the rename and the behavior for negative values.\r\n\r\nThe rename is subsumed by #8147, so we should definitely not do any extra work here. You can add a comment reminding us to get back to it:\r\n\r\n> // TODO(#8147): rename param to \"count\" once it's positional-only.\r\n\r\nThe behavioral change for negatives is also breaking. I feel like it's not very likely people will be broken by it, but it seems like the kind of thing we should guard with a flag. Look for other examples of using incompatible flags in Starlark builtins -- for instance, `incompatibleDisableDepsetItems` in the depset constructor later in this file, and its corresponding definitions in `StarlarkSemantics` and `StarlarkSemanticsOptions`.",
"That's not a super nit. >=0 simply *is* more readable than > -1.",
"Ok, let's do this the proper way, by marking the negative value behaviour change as breaking.\r\n\r\nOther than adding the flag and the handling of it, is there anything else that needs to be done? What's the process for creating issues with the `incompatible-change` and `breaking-change-*` labels?",
"When you file the GitHub issue, you can cc me so that I add the labels.\r\nIf your change is ready this week, we can include it in Bazel 3.2.\r\n\r\nThanks!",
"Also: 'None' is not a legal argument for count, according to the Starlark spec (which matches Pythons 2 and 3 and go.starlark.net implementation).",
"Hm, I'll write a quick followup to change the default value to the internal UNBOUND sentinel and have the incompatible flag also reject the value None.",
"Thanks. I suggest to:\r\n\r\n- Change the default value to unbound\r\n- Raise an error if the argument is None and the incompatible flag is enabled\r\n- After the flag flip, remove noneable=True",
"@alandonovan points out to me that we actually already flipped *and deleted* `--incompatible_restrict_named_params`, so I'll do the rename as part of the follow-up."
] | "2019-08-22T20:49:19Z" | [
"type: bug",
"P2"
] | string.replace incorrectly handles negative value for count | ### Description of the problem:
According to the [spec](https://github.com/bazelbuild/starlark/blob/master/spec.md#stringreplace), a negative value for `count` in `string.replace` should be ignored and this is also what python and the Go implementation do.
```
# Current implementation
"abc".replace("a", "z", -1) # "abc"
# Python/Go
"abc".replace("a", "z", -1) # "zbc"
```
**Side Note:** The parameter `count` of `string.replace` is incorrectly named `maxsplit` in the definition of `replace` [here](https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java#L277). | [
"src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java",
"src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java",
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java",
"src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java",
"src/main/java/com/google/devtools/build/lib/syntax/StringModule.java"
] | [
"src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java",
"src/test/java/com/google/devtools/build/lib/syntax/StringModuleTest.java",
"src/test/starlark/testdata/string_misc.sky"
] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
index 01769336fe6b85..531801020d11a3 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
@@ -508,6 +508,18 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl
help = "If set to true, the command parameter of actions.run_shell will only accept string")
public boolean incompatibleRunShellCommandString;
+ @Option(
+ name = "incompatible_string_replace_count",
+ defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
+ effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
+ metadataTags = {
+ OptionMetadataTag.INCOMPATIBLE_CHANGE,
+ OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
+ },
+ help = "If set to true, a negative count in string.replace() will be ignored")
+ public boolean incompatibleStringReplaceCount;
+
/** Used in an integration test to confirm that flags are visible to the interpreter. */
@Option(
name = "internal_skylark_flag_test_canary",
@@ -652,6 +664,7 @@ public StarlarkSemantics toSkylarkSemantics() {
.incompatibleNoRuleOutputsParam(incompatibleNoRuleOutputsParam)
.incompatibleNoSupportToolsInActionInputs(incompatibleNoSupportToolsInActionInputs)
.incompatibleRunShellCommandString(incompatibleRunShellCommandString)
+ .incompatibleStringReplaceCount(incompatibleStringReplaceCount)
.incompatibleVisibilityPrivateAttributesAtDefinition(
incompatibleVisibilityPrivateAttributesAtDefinition)
.internalSkylarkFlagTestCanary(internalSkylarkFlagTestCanary)
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
index 76c517d50b2fd9..a1d9e2b8dea922 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
@@ -257,6 +257,8 @@ boolean isFeatureEnabledBasedOnTogglingFlags(String enablingFlag, String disabli
public abstract boolean incompatibleRunShellCommandString();
+ public abstract boolean incompatibleStringReplaceCount();
+
public abstract boolean incompatibleVisibilityPrivateAttributesAtDefinition();
public abstract boolean internalSkylarkFlagTestCanary();
@@ -343,6 +345,7 @@ public static Builder builderWithDefaults() {
.incompatibleNoRuleOutputsParam(false)
.incompatibleNoSupportToolsInActionInputs(true)
.incompatibleRunShellCommandString(false)
+ .incompatibleStringReplaceCount(false)
.incompatibleVisibilityPrivateAttributesAtDefinition(false)
.internalSkylarkFlagTestCanary(false)
.incompatibleDoNotSplitLinkingCmdline(true)
@@ -422,6 +425,8 @@ public abstract static class Builder {
public abstract Builder incompatibleRunShellCommandString(boolean value);
+ public abstract Builder incompatibleStringReplaceCount(boolean value);
+
public abstract Builder incompatibleVisibilityPrivateAttributesAtDefinition(boolean value);
public abstract Builder internalSkylarkFlagTestCanary(boolean value);
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
index cf7ac6ccd24eb2..8373c0b97743f0 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
@@ -274,21 +274,32 @@ public String strip(String self, Object charsOrNone) {
type = String.class,
doc = "The string to replace with."),
@Param(
+ // TODO(#8147): rename param to "count" once it's positional-only.
name = "maxsplit",
type = Integer.class,
noneable = true,
defaultValue = "None",
- doc = "The maximum number of replacements.")
- })
- public String replace(String self, String oldString, String newString, Object maxSplitO)
+ doc = "The maximum number of replacements. A negative value is ignored (if --incompatible_string_replace_count is true).")
+ },
+ useStarlarkThread = true)
+ public String replace(String self, String oldString, String newString, Object count, StarlarkThread thread)
throws EvalException {
- int maxSplit = Integer.MAX_VALUE;
- if (maxSplitO != Starlark.NONE) {
- maxSplit = Math.max(0, (Integer) maxSplitO);
+ int maxReplaces = Integer.MAX_VALUE;
+
+ StarlarkSemantics semantics = thread.getSemantics();
+ if (semantics.incompatibleStringReplaceCount()) {
+ if (count != Starlark.NONE && (Integer) count >= 0) {
+ maxReplaces = (Integer) count;
+ }
+ } else {
+ if (count != Starlark.NONE) {
+ maxReplaces = Math.max(0, (Integer) count);
+ }
}
+
StringBuilder sb = new StringBuilder();
int start = 0;
- for (int i = 0; i < maxSplit; i++) {
+ for (int i = 0; i < maxReplaces; i++) {
if (oldString.isEmpty()) {
sb.append(newString);
if (start < self.length()) {
| diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
index 3539c6f7946283..1aeb40851b419e 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
@@ -156,6 +156,7 @@ private static StarlarkSemanticsOptions buildRandomOptions(Random rand) throws E
"--incompatible_no_rule_outputs_param=" + rand.nextBoolean(),
"--incompatible_no_support_tools_in_action_inputs=" + rand.nextBoolean(),
"--incompatible_run_shell_command_string=" + rand.nextBoolean(),
+ "--incompatible_string_replace_count=" + rand.nextBoolean(),
"--incompatible_visibility_private_attributes_at_definition=" + rand.nextBoolean(),
"--incompatible_require_linker_input_cc_api=" + rand.nextBoolean(),
"--incompatible_restrict_string_escapes=" + rand.nextBoolean(),
@@ -207,6 +208,7 @@ private static StarlarkSemantics buildRandomSemantics(Random rand) {
.incompatibleNoRuleOutputsParam(rand.nextBoolean())
.incompatibleNoSupportToolsInActionInputs(rand.nextBoolean())
.incompatibleRunShellCommandString(rand.nextBoolean())
+ .incompatibleStringReplaceCount(rand.nextBoolean())
.incompatibleVisibilityPrivateAttributesAtDefinition(rand.nextBoolean())
.incompatibleRequireLinkerInputCcApi(rand.nextBoolean())
.incompatibleRestrictStringEscapes(rand.nextBoolean())
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/StringModuleTest.java b/src/test/java/com/google/devtools/build/lib/syntax/StringModuleTest.java
new file mode 100644
index 00000000000000..203aa75a4da40b
--- /dev/null
+++ b/src/test/java/com/google/devtools/build/lib/syntax/StringModuleTest.java
@@ -0,0 +1,79 @@
+// Copyright 2020 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.lib.syntax;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.devtools.build.lib.syntax.util.EvaluationTestCase;
+import java.util.Arrays;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.Test;
+
+/**
+ * Tests for SkylarkStringModule.
+ */
+@RunWith(Parameterized.class)
+public class StringModuleTest extends EvaluationTestCase {
+
+ @Parameters(name = "{index}: flag={0}")
+ public static Iterable<? extends Object> data() {
+ return Arrays.asList(
+ "--incompatible_string_replace_count=false",
+ "--incompatible_string_replace_count=true");
+ }
+
+ @Parameter
+ public String flag;
+
+ @Test
+ public void testReplace() throws Exception {
+ // Test that the behaviour is the same for the basic case both before
+ // and after the incompatible change.
+ new Scenario(flag)
+ .testEval("'banana'.replace('a', 'o')", "'bonono'")
+ .testEval("'banana'.replace('a', 'o', 2)", "'bonona'")
+ .testEval("'banana'.replace('a', 'o', 0)", "'banana'")
+ .testEval("'banana'.replace('a', 'e')", "'benene'")
+ .testEval("'banana'.replace('a', '$()')", "'b$()n$()n$()'")
+ .testEval("'banana'.replace('a', '$')", "'b$n$n$'")
+ .testEval("'b$()n$()n$()'.replace('$()', '$($())')", "'b$($())n$($())n$($())'")
+ .testEval("'banana'.replace('a', 'e', 2)", "'benena'")
+ .testEval("'banana'.replace('a', 'e', 0)", "'banana'")
+ .testEval("'banana'.replace('', '-')", "'-b-a-n-a-n-a-'")
+ .testEval("'banana'.replace('', '-', 2)", "'-b-anana'")
+ .testEval("'banana'.replace('', '-', 0)", "'banana'")
+ .testEval("'banana'.replace('', '')", "'banana'")
+ .testEval("'banana'.replace('a', '')", "'bnn'")
+ .testEval("'banana'.replace('a', '', 2)", "'bnna'");
+ }
+
+ @Test
+ public void testReplaceIncompatibleFlag() throws Exception {
+ // Test the scenario that changes with the incompatible flag
+ new Scenario("--incompatible_string_replace_count=false")
+ .testEval("'banana'.replace('a', 'o', -2)", "'banana'")
+ .testEval("'banana'.replace('a', 'e', -1)", "'banana'")
+ .testEval("'banana'.replace('a', 'e', -10)", "'banana'")
+ .testEval("'banana'.replace('', '-', -2)", "'banana'");
+
+ new Scenario("--incompatible_string_replace_count=true")
+ .testEval("'banana'.replace('a', 'o', -2)", "'bonono'")
+ .testEval("'banana'.replace('a', 'e', -1)", "'benene'")
+ .testEval("'banana'.replace('a', 'e', -10)", "'benene'")
+ .testEval("'banana'.replace('', '-', -2)", "'-b-a-n-a-n-a-'");
+ }
+}
diff --git a/src/test/starlark/testdata/string_misc.sky b/src/test/starlark/testdata/string_misc.sky
index ea3aa9d141d5b3..3d426f377571fc 100644
--- a/src/test/starlark/testdata/string_misc.sky
+++ b/src/test/starlark/testdata/string_misc.sky
@@ -43,17 +43,6 @@ assert_eq('b\\n\\n\\'.replace('\\', '$()'), "b$()n$()n$()")
assert_eq('banana'.replace('a', 'e', 2), "benena")
assert_eq('banana'.replace('a', 'e', 0), "banana")
-assert_eq('banana'.replace('a', 'e', -1), "banana")
-assert_eq('banana'.replace('a', 'e', -10), "banana")
-
-assert_eq('banana'.replace('', '-'), "-b-a-n-a-n-a-")
-assert_eq('banana'.replace('', '-', -2), "banana")
-assert_eq('banana'.replace('', '-', 2), "-b-anana")
-assert_eq('banana'.replace('', '-', 0), "banana")
-
-assert_eq('banana'.replace('', ''), "banana")
-assert_eq('banana'.replace('a', ''), "bnn")
-assert_eq('banana'.replace('a', '', 2), "bnna")
# index, rindex
assert_eq('banana'.index('na'), 2)
| train | train | 2020-04-28T23:32:03 | "2019-08-15T14:49:51Z" | Quarz0 | test |
bazelbuild/bazel/9284_9287 | bazelbuild/bazel | bazelbuild/bazel/9284 | bazelbuild/bazel/9287 | [
"timestamp(timedelta=1.0, similarity=0.8663329225639275)"
] | a32bc59d2472b9cd33c5bf54c2fc10431b9f5358 | 696739255ab09e63f5bca8eecfe9abbe5f8a8fc5 | [
"I am investigating with @v-mr ",
"We're seeing same issue in envoyproxy/envoy#8074, seems this only happens when `--nocache_test_results` is passed to bazel. I can reproduce it with `--nocache_test_results` but not without it.",
"Thank you for the data point, @lizan.\r\n\r\n@v-mr has given me a repoduction case and I am bisecting now.",
"@lizan It's possible that the difference with `--nocache_test_results` is that when it is not set the tests aren't executed, which seems to be where the failure is.",
"> It's possible that the difference with --nocache_test_results is that when it is not set the tests aren't executed, which seems to be where the failure is.\r\n\r\n@katre I doubt so because I changed the our RBE image SHA at same time, which should revoke all cache in the first time when I ran without `--nocache_test_results`.",
"Bisect has eventually told me that the culprit is e4ccba45376f74d24ce3506fb4057e1268f01a59. I have no idea why that is, but reverting it from master causes my reproduction to be fixed.\r\n\r\nI'm going to debug this further to try and determine _why_ this change causes this failure.",
"That commit is the one that caused the action key to change, which is apparently what causes the bug to be visible. It's not the commit that actually causes the error.",
"Trying to repro. PRECONDITION_FAILED hints at inputs not being uploaded.",
"I believe the root cause is this line. We should unconditionally upload inputs: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java;l=250?q=RemoteSpawnRunner\r\n\r\nI ll send a fix. Sorry about this :(",
"Fix: https://github.com/bazelbuild/bazel/pull/9287",
"Here's a patch that applies cleanly on 0.29.0: https://github.com/buchgr/bazel/commit/c475d7d98a457e36a261f92ced9f9303e3f84c44",
"Came across this issue from a buildkite \"Emergency\" [message](https://buildkite.com/bazel/bazel-federation/builds/61). Since this issue is closed (and the message refers to a solution \"later today\"), can the message be removed?",
"@brandjon The core issue won't be fixed until 0.29.1 is released, hopefully tomorrow."
] | [] | "2019-08-30T06:44:48Z" | [
"type: bug",
"P1",
"team-Remote-Exec"
] | Bazel 0.29 contains a regression with Remote Build Execution backend | ### Description of the problem / feature request:
Bazel 0.29.0 (https://github.com/bazelbuild/bazel/issues/8572) has regression with Remote Build Execution backend.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
ERROR: <redacted>/test/BUILD:205:5: failed (Exit 34). Note: Remote connection/protocol failed with: execution failed FAILED_PRECONDITION: Precondition check failed.
### What operating system are you running Bazel on?
Linux 4.19.37-5+deb10u1rodete1-amd64 #1 SMP Debian 4.19.37-5+deb10u1rodete1 (2019-07-22 > 2018) x86_64 GNU/Linux
### What's the output of `bazel info release`?
release 0.29.0 | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java"
] | [
"src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java",
"src/test/shell/bazel/remote/remote_execution_http_test.sh",
"src/test/shell/bazel/remote/remote_execution_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index 56c2d8407f9448..8ff410f230c67d 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -245,17 +245,13 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
() -> {
ExecuteRequest request = requestBuilder.build();
- // Upload the command and all the inputs into the remote cache, if remote caching
- // is enabled and not disabled using tags, {@see Spawns#mayBeCachedRemotely}
- if (spawnCacheableRemotely) {
- try (SilentCloseable c = prof.profile(UPLOAD_TIME, "upload missing inputs")) {
- Map<Digest, Message> additionalInputs = Maps.newHashMapWithExpectedSize(2);
- additionalInputs.put(actionKey.getDigest(), action);
- additionalInputs.put(commandHash, command);
- remoteCache.ensureInputsPresent(merkleTree, additionalInputs, execRoot);
- }
+ // Upload the command and all the inputs into the remote cache.
+ try (SilentCloseable c = prof.profile(UPLOAD_TIME, "upload missing inputs")) {
+ Map<Digest, Message> additionalInputs = Maps.newHashMapWithExpectedSize(2);
+ additionalInputs.put(actionKey.getDigest(), action);
+ additionalInputs.put(commandHash, command);
+ remoteCache.ensureInputsPresent(merkleTree, additionalInputs, execRoot);
}
-
ExecuteResponse reply;
try (SilentCloseable c = prof.profile(REMOTE_EXECUTION, "execute remotely")) {
reply = remoteExecutor.executeRemotely(request);
| diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
index 6c787cbc488bb1..36d06126920f71 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
@@ -64,6 +64,7 @@
import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext;
import com.google.devtools.build.lib.exec.util.FakeOwner;
import com.google.devtools.build.lib.remote.common.SimpleBlobStore.ActionKey;
+import com.google.devtools.build.lib.remote.merkletree.MerkleTree;
import com.google.devtools.build.lib.remote.options.RemoteOptions;
import com.google.devtools.build.lib.remote.options.RemoteOutputsMode;
import com.google.devtools.build.lib.remote.util.DigestUtil;
@@ -212,7 +213,7 @@ public void nonCachableSpawnsShouldNotBeCached_localFallback() throws Exception
runner.exec(spawn, policy);
verify(localRunner).exec(spawn, policy);
- verify(cache, never()).upload(any(), any(), any(), any(), any(), any());
+ verify(cache).ensureInputsPresent(any(), any(), eq(execRoot));
verifyNoMoreInteractions(cache);
}
diff --git a/src/test/shell/bazel/remote/remote_execution_http_test.sh b/src/test/shell/bazel/remote/remote_execution_http_test.sh
index a85df0cf6258f5..2925a1a12a55d2 100755
--- a/src/test/shell/bazel/remote/remote_execution_http_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_http_test.sh
@@ -426,4 +426,34 @@ EOF
rm -rf $cache
}
+function test_tag_no_remote_cache() {
+ mkdir -p a
+ cat > a/BUILD <<'EOF'
+genrule(
+ name = "foo",
+ srcs = [],
+ outs = ["foo.txt"],
+ cmd = "echo \"foo\" > \"$@\"",
+ tags = ["no-remote-cache"]
+)
+EOF
+
+ bazel build \
+ --spawn_strategy=local \
+ --remote_cache=grpc://localhost:${worker_port} \
+ //a:foo >& $TEST_log || "Failed to build //a:foo"
+
+ expect_log "1 local"
+
+ bazel clean
+
+ bazel build \
+ --spawn_strategy=local \
+ --remote_cache=grpc://localhost:${worker_port} \
+ //a:foo || "Failed to build //a:foo"
+
+ expect_log "1 local"
+ expect_not_log "remote cache hit"
+}
+
run_suite "Remote execution and remote cache tests"
diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index af6a303831e685..a296e9fe6d73a0 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -1195,6 +1195,56 @@ EOF
//a:foo || "Failed to build //a:foo"
}
+function test_tag_no_remote_cache() {
+ mkdir -p a
+ cat > a/BUILD <<'EOF'
+genrule(
+ name = "foo",
+ srcs = [],
+ outs = ["foo.txt"],
+ cmd = "echo \"foo\" > \"$@\"",
+ tags = ["no-remote-cache"]
+)
+EOF
+
+ bazel build \
+ --remote_executor=grpc://localhost:${worker_port} \
+ //a:foo >& $TEST_log || "Failed to build //a:foo"
+
+ expect_log "1 remote"
+
+ bazel clean
+
+ bazel build \
+ --remote_executor=grpc://localhost:${worker_port} \
+ //a:foo || "Failed to build //a:foo"
+
+ expect_log "1 remote"
+ expect_not_log "remote cache hit"
+}
+
+function test_tag_no_remote_exec() {
+ mkdir -p a
+ cat > a/BUILD <<'EOF'
+genrule(
+ name = "foo",
+ srcs = [],
+ outs = ["foo.txt"],
+ cmd = "echo \"foo\" > \"$@\"",
+ tags = ["no-remote-exec"]
+)
+EOF
+
+ bazel build \
+ --spawn_strategy=remote,local \
+ --remote_executor=grpc://localhost:${worker_port} \
+ //a:foo >& $TEST_log || "Failed to build //a:foo"
+
+ expect_log "1 local"
+ expect_not_log "1 remote"
+}
+
+
# TODO(alpha): Add a test that fails remote execution when remote worker
# supports sandbox.
| val | train | 2019-08-30T08:23:09 | "2019-08-29T19:36:51Z" | v-mr | test |
bazelbuild/bazel/9321_9454 | bazelbuild/bazel | bazelbuild/bazel/9321 | bazelbuild/bazel/9454 | [
"timestamp(timedelta=0.0, similarity=0.8412470147148741)"
] | 51421724b6038844838a74886e894df16b1bcaf1 | 001563f7166f9c2e987d43663d65f4fe95fadfec | [
"cc @laszlocsomor \r\n",
"Chatted about this with @meteorcloudy this week. We don't expand them in the manifest as we do in the runfiles tree. Will send a fix.",
"@buchgr This looks like a different issue, `_dotd/main/gen_tree/foo.obj.d` shouldn't be required on Windows.",
"Maybe using tree artifact triggered some code path that should not run on Windows.",
"@buchgr : thanks for the info! Do you have a repro?",
"Is there a workaround I can use in the meanwhile?",
"@ale64bit : I don't think so.\r\n\r\n/cc @hlopko , @oquenchil , @scentini:\r\nMeanwhile I found it's CppCompileActionTemplate unconditionally creating a `.d` output: https://github.com/bazelbuild/bazel/blob/ed68a81f7938067d05fd7525f4aece6db59326b3/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java#L130-L132\r\n\r\nIf I comment that out and make `dotdFileArtifact = null`, and comment out these lines: https://github.com/bazelbuild/bazel/blob/ed68a81f7938067d05fd7525f4aece6db59326b3/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java#L195-L197\r\n\r\nthen the bug vanishes.",
"Yup that looks like our problem :)",
"I just sent a fix for this, https://github.com/bazelbuild/bazel/pull/9454 ;)"
] | [
"Can you add a comment here what this is for?",
"Can you please also mark dotdTreeArtifact as @Nullable?",
"Done",
"Thanks, done!"
] | "2019-10-01T10:23:57Z" | [
"type: bug",
"P2",
"team-Rules-CPP"
] | Tree artifacts don't seem to work on Windows | ### Description of the problem / feature request:
Tree artifacts don't seem to work on Windows.
### Feature requests: what underlying problem are you trying to solve with this feature?
Generate a `cc_library` from an unknown number of source files, e.g. because they are produced by a tool.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Same as in the accepted answer here: https://stackoverflow.com/questions/48417712/how-to-build-static-library-from-the-generated-source-files-using-bazel-build/48524539#48524539
But with a small modification to make it compatible with Windows:
genccs.bzl: verbatim.
BUILD: verbatim.
genccs.cpp:
```cpp
#include <fstream>
#include <Windows.h>// BEFORE: <sys/stat.h>
using namespace std;
int main (int argc, char *argv[]) {
CreateDirectory(argv[1], NULL); // BEFORE: mkdir(argv[1], S_IRWXU);
ofstream myfile;
myfile.open(string(argv[1]) + string("/foo.cpp"));
myfile << "int main() { return 42; }";
return 0;
}
```
WORKSPACE: empty file.
### What operating system are you running Bazel on?
Windows 10
### What's the output of `bazel info release`?
release 0.29.0
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
N/A
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
N/A
### Have you found anything relevant by searching the web?
Relevant question and answer: https://stackoverflow.com/questions/48417712/how-to-build-static-library-from-the-generated-source-files-using-bazel-build/48524539#48524539
Other relevant links:
https://github.com/bazelbuild/bazel/issues/5093
### Any other information, logs, or outputs that you want to share?
When running `bazel build main` with the above example, I'm getting:
```
INFO: Analyzed target //:main (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: C:/src/treeartifact/BUILD:7:1: output '_dotd/main/gen_tree/foo.obj.d' was not created
ERROR: C:/src/treeartifact/BUILD:7:1: not all outputs were created or valid
Target //:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.087s, Critical Path: 2.23s
INFO: 4 processes: 4 local.
FAILED: Build did NOT complete successfully
```
| [
"src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java",
"src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java"
] | [
"src/test/py/bazel/bazel_windows_cpp_test.py"
] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java
index 4b8a101c3229e6..d7261db061fca0 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java
@@ -1398,12 +1398,18 @@ private Artifact createCompileActionTemplate(
/* additionalBuildVariables= */ ImmutableMap.of()));
semantics.finalizeCompileActionBuilder(configuration, featureConfiguration, builder);
// Make sure this builder doesn't reference ruleContext outside of analysis phase.
+ SpecialArtifact dotdTreeArtifact = null;
+ // The MSVC compiler won't generate .d file, instead we parse the output of /showIncludes flag.
+ // Therefore, dotdTreeArtifact should be null in this case.
+ if (!featureConfiguration.isEnabled(CppRuleClasses.PARSE_SHOWINCLUDES)) {
+ dotdTreeArtifact = CppHelper.getDotdOutputTreeArtifact(
+ actionConstructionContext, label, sourceArtifact, outputName, usePic);
+ }
CppCompileActionTemplate actionTemplate =
new CppCompileActionTemplate(
sourceArtifact,
outputFiles,
- CppHelper.getDotdOutputTreeArtifact(
- actionConstructionContext, label, sourceArtifact, outputName, usePic),
+ dotdTreeArtifact,
builder,
ccToolchain,
outputCategories,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java
index 2609d32a6de6dd..96b8ac27a117ff 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java
@@ -38,6 +38,8 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Nullable;
+
/** An {@link ActionTemplate} that expands into {@link CppCompileAction}s at execution time. */
public final class CppCompileActionTemplate extends ActionKeyCacher
implements ActionTemplate<CppCompileAction> {
@@ -127,9 +129,12 @@ public Iterable<CppCompileAction> generateActionForInputArtifacts(
TreeFileArtifact outputTreeFileArtifact =
ActionInputHelper.treeFileArtifactWithNoGeneratingActionSet(
outputTreeArtifact, PathFragment.create(outputName), artifactOwner);
- TreeFileArtifact dotdFileArtifact =
- ActionInputHelper.treeFileArtifactWithNoGeneratingActionSet(
- dotdTreeArtifact, PathFragment.create(outputName + ".d"), artifactOwner);
+ TreeFileArtifact dotdFileArtifact = null;
+ if (dotdTreeArtifact != null) {
+ dotdFileArtifact =
+ ActionInputHelper.treeFileArtifactWithNoGeneratingActionSet(
+ dotdTreeArtifact, PathFragment.create(outputName + ".d"), artifactOwner);
+ }
expandedActions.add(
createAction(
inputTreeFileArtifact, outputTreeFileArtifact, dotdFileArtifact, privateHeaders));
@@ -176,7 +181,7 @@ private boolean shouldCompileHeaders() {
private CppCompileAction createAction(
Artifact sourceTreeFileArtifact,
Artifact outputTreeFileArtifact,
- Artifact dotdFileArtifact,
+ @Nullable Artifact dotdFileArtifact,
ImmutableList<Artifact> privateHeaders)
throws ActionTemplateExpansionException {
CppCompileActionBuilder builder = new CppCompileActionBuilder(cppCompileActionBuilder);
@@ -192,9 +197,11 @@ private CppCompileAction createAction(
buildVariables.overrideStringVariable(
CompileBuildVariables.OUTPUT_FILE.getVariableName(),
outputTreeFileArtifact.getExecPathString());
- buildVariables.overrideStringVariable(
- CompileBuildVariables.DEPENDENCY_FILE.getVariableName(),
- dotdFileArtifact.getExecPathString());
+ if (dotdFileArtifact != null) {
+ buildVariables.overrideStringVariable(
+ CompileBuildVariables.DEPENDENCY_FILE.getVariableName(),
+ dotdFileArtifact.getExecPathString());
+ }
builder.setVariables(buildVariables.build());
@@ -278,6 +285,9 @@ public Iterable<Artifact> getInputs() {
@Override
public ImmutableSet<Artifact> getOutputs() {
+ if (dotdTreeArtifact == null) {
+ return ImmutableSet.of(outputTreeArtifact);
+ }
return ImmutableSet.of(outputTreeArtifact, dotdTreeArtifact);
}
| diff --git a/src/test/py/bazel/bazel_windows_cpp_test.py b/src/test/py/bazel/bazel_windows_cpp_test.py
index 3b20bec3537259..6299439cb2396d 100644
--- a/src/test/py/bazel/bazel_windows_cpp_test.py
+++ b/src/test/py/bazel/bazel_windows_cpp_test.py
@@ -701,6 +701,66 @@ def testCacheBetweenWorkspaceWithDifferentNames(self):
['build', '--disk_cache=' + cache_dir, ':lib'], cwd=dir_b)
self.AssertExitCode(exit_code, 0, stderr)
+ # Regression test for https://github.com/bazelbuild/bazel/issues/9321
+ def testCcCompileWithTreeArtifactAsSource(self):
+ self.CreateWorkspaceWithDefaultRepos('WORKSPACE')
+ self.ScratchFile('BUILD', [
+ 'load(":genccs.bzl", "genccs")',
+ '',
+ 'genccs(',
+ ' name = "gen_tree",',
+ ')',
+ '',
+ 'cc_library(',
+ ' name = "main",',
+ ' srcs = [ "gen_tree" ]',
+ ')',
+ '',
+ 'cc_binary(',
+ ' name = "genccs",',
+ ' srcs = [ "genccs.cpp" ],',
+ ')',
+ ])
+ self.ScratchFile('genccs.bzl', [
+ 'def _impl(ctx):',
+ ' tree = ctx.actions.declare_directory(ctx.attr.name + ".cc")',
+ ' ctx.actions.run(',
+ ' inputs = [],',
+ ' outputs = [ tree ],',
+ ' arguments = [ tree.path ],',
+ ' progress_message = "Generating cc files into \'%s\'" % tree.path,',
+ ' executable = ctx.executable._tool,',
+ ' )',
+ '',
+ ' return [ DefaultInfo(files = depset([ tree ])) ]',
+ '',
+ 'genccs = rule(',
+ ' implementation = _impl,',
+ ' attrs = {',
+ ' "_tool": attr.label(',
+ ' executable = True,',
+ ' cfg = "host",',
+ ' allow_files = True,',
+ ' default = Label("//:genccs"),',
+ ' )',
+ ' }',
+ ')',
+ ])
+ self.ScratchFile('genccs.cpp', [
+ '#include <fstream>',
+ '#include <Windows.h>',
+ 'using namespace std;',
+ '',
+ 'int main (int argc, char *argv[]) {',
+ ' CreateDirectory(argv[1], NULL);',
+ ' ofstream myfile;',
+ ' myfile.open(string(argv[1]) + string("/foo.cpp"));',
+ ' myfile << "int main() { return 42; }";',
+ ' return 0;',
+ '}',
+ ])
+ exit_code, _, stderr = self.RunBazel(['build', '//:main'])
+ self.AssertExitCode(exit_code, 0, stderr)
if __name__ == '__main__':
unittest.main()
| test | train | 2019-10-01T10:13:32 | "2019-09-03T15:22:24Z" | ale64bit | test |
bazelbuild/bazel/9348_9349 | bazelbuild/bazel | bazelbuild/bazel/9348 | bazelbuild/bazel/9349 | [
"timestamp(timedelta=0.0, similarity=0.8850462468852704)"
] | 6fef731669a83cc22f7cc435befe3561e99fd0e5 | 65ff599a5951331ce95f6051e93c0415e4be77e2 | [] | [] | "2019-09-09T07:53:39Z" | [
"untriaged",
"team-OSS"
] | bash-completion should not be a hard dependency in the .deb package | ### Description of the problem / feature request:
The bazel .deb package includes a hard dependency on the bash-completion package, which makes it annoying for users who don't want bash-completion features.
I think bash-completion should be moved to a weaker dependency type, preferably Suggests ("This is used to declare that one package may be more useful with one or more others. Using this field tells the packaging system and the user that the listed packages are related to this one and can perhaps enhance its usefulness, but that installing this one without them is perfectly reasonable.")
Reference:
https://www.debian.org/doc/debian-policy/ch-relationships.html
### Feature requests: what underlying problem are you trying to solve with this feature?
Users should be able to install bazel .deb packages without bash-completion.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
$ sudo dpkg --purge bash-completion
dpkg: dependency problems prevent removal of bash-completion:
bazel depends on bash-completion.
dpkg: error processing package bash-completion (--purge):
dependency problems - not removing
Errors were encountered while processing:
bash-completion
$ bazel build //scripts/packages/debian:bazel-debian
$ dpkg --info bazel-bin/scripts/packages/debian/bazel__amd64.deb | grep Depends:
Depends: g++, zlib1g-dev, bash-completion, unzip, python
### What operating system are you running Bazel on?
Ubuntu 16.04.
### What's the output of `bazel info release`?
development version
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
bazel build //scripts/packages/debian:bazel-debian
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
https://github.com/bazelbuild/bazel.git
6fef731669a83cc22f7cc435befe3561e99fd0e5
6fef731669a83cc22f7cc435befe3561e99fd0e5 | [
"scripts/packages/debian/BUILD",
"scripts/packages/debian/control"
] | [
"scripts/packages/debian/BUILD",
"scripts/packages/debian/control"
] | [] | diff --git a/scripts/packages/debian/BUILD b/scripts/packages/debian/BUILD
index cffa82cb27b6e6..44e7375e23ec41 100644
--- a/scripts/packages/debian/BUILD
+++ b/scripts/packages/debian/BUILD
@@ -79,7 +79,6 @@ pkg_deb(
# Keep in sync with Depends section in ./control
"g++",
"zlib1g-dev",
- "bash-completion",
"unzip",
"python",
],
@@ -90,6 +89,7 @@ pkg_deb(
suggests = [
# Keep in sync with Suggests section in ./control
"google-jdk | java8-sdk-headless | java8-jdk | java8-sdk | oracle-java8-installer",
+ "bash-completion",
],
version_file = ":version.txt",
visibility = ["//scripts/packages:__pkg__"],
diff --git a/scripts/packages/debian/control b/scripts/packages/debian/control
index 19e2b03efaa67f..ad2455b132121b 100644
--- a/scripts/packages/debian/control
+++ b/scripts/packages/debian/control
@@ -10,8 +10,8 @@ Section: contrib/devel
Priority: optional
Architecture: amd64
# Keep in sync with :bazel-debian in ./BUILD
-Depends: g++, zlib1g-dev, bash-completion, unzip, python
-Suggests: google-jdk | java8-sdk-headless | java8-jdk | java8-sdk | oracle-java8-installer
+Depends: g++, zlib1g-dev, unzip, python
+Suggests: google-jdk | java8-sdk-headless | java8-jdk | java8-sdk | oracle-java8-installer, bash-completion
Description: Bazel is a tool that automates software builds and tests.
Supported build tasks include running compilers and linkers to produce
executable programs and libraries, and assembling deployable packages
| null | train | train | 2019-09-08T22:41:41 | "2019-09-09T07:46:31Z" | mostynb | test |
bazelbuild/bazel/9364_9385 | bazelbuild/bazel | bazelbuild/bazel/9364 | bazelbuild/bazel/9385 | [
"timestamp(timedelta=1.0, similarity=0.8471437419443348)"
] | 6300cf0b989491a9e653b0c3ab12043adf0c1fa2 | e1b762be4170e40c54cd411ffdb25aaec056732a | [
"What message would you suggest?",
"Just to clarify @meisterT's question.\r\n\r\nThe [quoted issue](https://github.com/bazelbuild/bazel-gazelle/issues/609)\r\n\r\n> Please see [bazelbuild/bazel-gazelle#609 (comment)](https://github.com/bazelbuild/bazel-gazelle/issues/609#issuecomment-530017922)\r\n\r\n[states](https://github.com/bazelbuild/bazel-gazelle/issues/609#issuecomment-529958394)\r\n\r\n> A better error message would be awesome as it did take a couple of minutes for my head to jolt and remember the error message corresponded to a missing build file. \r\n\r\nHowever, the error message literally states `BUILD file not found`, so I wonder what additional information you would like to have seen.",
"`BUILD file not found at the top level directory`\r\nwould be a good start\r\n\r\nNote error message currently includes:\r\n`Analysis of target '//src/hack/project:image' failed` \r\nand\r\n`failed; build aborted: no such package '@com_github_google_go_containerregistry//pkg/v1'`\r\nand\r\n`Unable to load package for //:WORKSPACE:`\r\n\r\nSo user has to work out that the two first references above are misleading, and the latter one\r\n`Unable to load package for //:WORKSPACE:` refers to not having a BUILD file at that level.\r\n\r\nAs evidenced by 2 issues opened by different users in `rules_docker`, I'm not the only one who feels this message is not informative enough.\r\nbazelbuild/rules_docker#1139\r\nbazelbuild/rules_docker#1126\r\n\r\nOther error traces from those issues:\r\n```\r\nERROR: Analysis of target '//dockertest:dockertest' failed; build aborted: no such package '@com_github_pkg_errors//': Unable to load package for //:WORKSPACE: BUILD file not found in any of the following directories.\r\n - /Users/jeffhodges/src/github.com/jmhodges/bazel_bugs\r\n```\r\nand\r\n\r\n```\r\nERROR: @io_bazel_rules_docker//container/go/cmd/digester:go_default_library depends on @com_github_pkg_errors//:go_default_library in repository @com_github_pkg_errors which failed to fetch. no such package '@com_github_pkg_errors//': Unable to load package for //:WORKSPACE: BUILD file not found in any of the following directories.\r\n - /.../rules_docker/rules_docker_fork/testing/java_image_no_root\r\n```\r\n\r\nI'm sure many would be able to figure out instantly that this means that the BUILD file is missing at the top level, but several others wont.",
"> `BUILD file not found at the top level directory`\r\n> would be a good start\r\n\r\nSuch a message without context would give the wrong impression that there were a requirement to have a `BUILD` file next next to the `WORKSPACE` file, which, however, is not a requirement. It is perfectly fine to not have a package for the empty string, as long as no one references the empty string as a package name. In that respect, \"top level\" is no different than any other package name: only those packages referenced somewhere have to exist.\r\n\r\nTherefore, I also wouldn't call ...\r\n\r\n> So user has to work out that the two first references above are misleading,\r\n\r\n... the first two references misleading; instead they give the needed context on where the offending reference was found (keep in mind that `bazel` has no means of knowing whether your source layout does or does not intend to have a package with name `''`). It simply follows the standard pattern of all `bazel` error messages that a lot of users find useful.\r\n- First it states which of targets `bazel` was asked to build failed; this information is not redundant, as the command line accepts target patters that can, in general, expand to several targets.\r\n- Then it mentions the root cause, in this case a package depended upon that does not exist.\r\n- Finally, it gives information on the root cause. In this case, why that package does not exist: it has a definition, but that definition depends on an invalid label `//:WORKSPACE`.\r\n- It also explains why the label `//:WORKSPACE` is invalid: that label requires the package `''` to exist, but it found no `BUILD` file for that package.\r\n- Finally, `bazel` even lists the candidate directories where a `BUILD` file could be located in order for the package `''` to exist.\r\n\r\nThis whole chain of reasons is useful to understand why `bazel` even started to look for that package (in this case with the empty string as name).\r\n\r\nSo I still don't see any actionable suggestion on how to improve this already very detailed error message.",
"Agreed, thanks anyway",
"Something that'll help here is an additional educational message along the lines of \r\n\r\n\"Unable to load package for //:WORKSPACE. **A BUILD file is required to mark a directory as a Bazel package**. BUILD file not found in any of the following directories..\"\r\n\r\nMany users understand what packages and targets are, but have no idea BUILD files are use to mark package boundaries. I certainly took a while to learn where to place `:` in target strings.. related https://github.com/bazelbuild/bazel/issues/7834\r\n\r\nMade a PR: https://github.com/bazelbuild/bazel/pull/9385\r\n\r\n@nlopezgi wdyt?",
"Hi @jin,\r\nthat does look to me like it would be a bit easier to understand,\r\nThanks for sending that PR",
"> Just to clarify @meisterT's question.\r\n> \r\n> The [quoted issue](https://github.com/bazelbuild/bazel-gazelle/issues/609)\r\n> \r\n> > Please see [bazelbuild/bazel-gazelle#609 (comment)](https://github.com/bazelbuild/bazel-gazelle/issues/609#issuecomment-530017922)\r\n> \r\n> [states](https://github.com/bazelbuild/bazel-gazelle/issues/609#issuecomment-529958394)\r\n> \r\n> > A better error message would be awesome as it did take a couple of minutes for my head to jolt and remember the error message corresponded to a missing build file.\r\n> \r\n> However, the error message literally states `BUILD file not found`, so I wonder what additional information you would like to have seen.\r\n\r\n@aehlig error messages, such as \"BUILD file not found...\", lack a \"call to action\". People who are new to Bazel will need to spend more effort to get past the error. This happened to me too (I am new to Bazel)!\r\n\r\nIn contrast, this message is friendly and makes the most of the end-user's time:\r\n\r\n> Add a BUILD file to *DIRECTORY*, to mark it as a Bazel package.\r\n\r\nI think that actionable error messages help everyone benefit from using Bazel.",
"@nicoaragon I have an incoming change incorporating your suggestion. Thanks.",
"\r\n> In contrast, this message is friendly and makes the most of the end-user's time:\r\n> \r\n> > Add a BUILD file to _DIRECTORY_, to mark it as a Bazel package.\r\n\r\nIt, however, it not in all cases the right thing to do. Adding a `BUILD` file splits the package into which the `BUILD` file is added, thus rendering other labels incorrect that used to be correct before the addition of the `BUILD` file.\r\n",
"@aehlig \r\n\r\nI think you care for accuracy. Also, you want to prevent people breaking their build.\r\n\r\nI care for end user experience and I want to empower Bazel users to be comfortable changing, and evolving their build. That includes breaking and fixing the build.\r\n\r\nIn this case, I would be happy to make the change and break other labels, as long as Bazel lets me know that I did.\r\n\r\nWhat do you use to measure end user experience?"
] | [] | "2019-09-13T21:47:52Z" | [
"P1",
"more data needed",
"team-ExternalDeps",
"untriaged",
"bad error messaging"
] | Error messaging when BUILD file not present at top level directory is unclear | ### Description of the problem / feature request:
`go_repository` now reads a configuration file, which, by default is WORKSPACE in the main workspace.
The implementation of this feature is such that the error messaging when the file is not present is as follows:
```
ERROR: Analysis of target '//src/hack/project:image' failed; build aborted: no such package '@com_github_google_go_containerregistry//pkg/v1': Unable to load package for //:WORKSPACE: BUILD file not found in any of the following directories.
- /local/path/to/my/git/repository
```
This error message is already causing issues for rules_docker customers, as now this BUILD file is needed in all projects that depend transitively on gazelle.
Please see https://github.com/bazelbuild/bazel-gazelle/issues/609#issuecomment-530017922
Also related:
bazelbuild/rules_docker#1139
bazelbuild/rules_docker#1126
### Feature requests: what underlying problem are you trying to solve with this feature?
I would like to have better messaging for this type of errors.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Depend on gazelle (latest version) from a project that does not have a root BUILD file
fyi @laurentlb
| [
"src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java"
] | [
"src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java"
] | [
"src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java
index 080d1bd392eff1..bafd17aae901f6 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java
@@ -113,10 +113,12 @@ public SkyValue compute(SkyKey skyKey, Environment env)
*/
public static String explainNoBuildFileValue(PackageIdentifier packageKey, Environment env)
throws InterruptedException {
+ String educationalMessage = "A BUILD file marks a directory as a Bazel package. However, ";
if (packageKey.getRepository().isMain()) {
PathPackageLocator pkgLocator = PrecomputedValue.PATH_PACKAGE_LOCATOR.get(env);
StringBuilder message = new StringBuilder();
- message.append("BUILD file not found in any of the following directories.");
+ message.append(educationalMessage);
+ message.append("there are no BUILD files found in any of the following directories:");
for (Root root : pkgLocator.getPathEntries()) {
message
.append("\n - ")
@@ -124,7 +126,8 @@ public static String explainNoBuildFileValue(PackageIdentifier packageKey, Envir
}
return message.toString();
} else {
- return "BUILD file not found in directory '"
+ return educationalMessage
+ + "there is no BUILD file found in the directory '"
+ packageKey.getPackageFragment()
+ "' of external repository "
+ packageKey.getRepository();
| diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
index 6cf030fb119a85..3c81a15c1a626d 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
@@ -92,7 +92,8 @@ public void testMissingDependency() throws Exception {
.containsExactly(
new LoadingFailedCause(
causeLabel,
- "no such package 'bar': BUILD file not found in any of the following directories.\n"
+ "no such package 'bar': A BUILD file marks a directory as a Bazel package. "
+ + "However, there are no BUILD files in any of the following directories:\n"
+ " - /workspace/bar"));
}
| train | train | 2019-09-13T22:57:05 | "2019-09-10T17:00:29Z" | nlopezgi | test |
bazelbuild/bazel/9391_9394 | bazelbuild/bazel | bazelbuild/bazel/9391 | bazelbuild/bazel/9394 | [
"timestamp(timedelta=2220.0, similarity=0.878363727447357)"
] | b6f33cd4b23f6aafe35cf42079a6ccb8d522b8cf | 1479eca4471ae71df1ff8c31f1cc3fd2bbd9893d | [
"@davido Thank you for the detailed bug report, it's great! :) Indeed I checked and the implementation for [java_host_runtime_alias](https://github.com/bazelbuild/bazel/blob/master/tools/jdk/java_toolchain_alias.bzl#L46) doesn't add its files to runfiles. @cushon is there a reason why `java_host_runtime_alias` doesn't return `runfiles` (as opposed to `java_runtime_alias`) or was it implemented this way simply because there was no use case for using the host javabase?",
"> But in the use case above, it was built with remote JDK 11 and thus produced the byte code with major version 55, even though the local JDK is still 8, and that why the tests are failing.\r\n\r\nCan you provide more context about the original problem you were trying to solve? What does the local JDK 8 have to do with the test failure, if you're setting both `--host_javabase` and `--javabase` to JDK 11?\r\n\r\n> java_host_runtime_alias doesn't return runfiles\r\n\r\nIt propagates `DefaultInfo`, is that not sufficient?",
"> Can you provide more context about the original problem you were trying to solve?\r\n\r\nWe are running not Java tests, but prolog tests. The way it's working is: we run `java -jar gerrit.war ` and invoke `prolog-shell` site-program and passing interactively prolog input file, the code is here: [1]:\r\n\r\n```\r\n $ java -jar ${GERRIT_WAR} prolog-shell -q -s load.pl\r\n```\r\n\r\nThe invocation is here: [2]:\r\n\r\n```\r\nsh_test(\r\n name = \"test_examples\",\r\n srcs = [\"run.sh\"],\r\n data = glob([\"*.pl\"]) + [\"//:gerrit.war\"],\r\n)\r\n```\r\n\r\nI'm trying to fix it here, but it doesn't work, unfortunately: [3].\r\n\r\n> It propagates DefaultInfo, is that not sufficient?\r\n\r\nHow can I use it to access `remote_jdk11linux/bin/java` from within `run.sh` bash script?\r\n\r\n[1] https://github.com/GerritCodeReview/gerrit/blob/master/prologtests/examples/run.sh#L39\r\n[2] https://github.com/GerritCodeReview/gerrit/blob/master/prologtests/examples/BUILD#L3\r\n[3] https://gerrit-review.googlesource.com/c/gerrit/+/237472",
"> It propagates DefaultInfo, is that not sufficient?\r\n\r\nI sent a fix in #9398 to create a new provider rather than returning the propagated one. Initially I didn't see the returned `runtime[DefaultInfo]`, but apparently it wasn't enough (or correct?). I asked about this in the PR."
] | [] | "2019-09-16T19:54:43Z" | [
"P2",
"team-Rules-Java"
] | sh_test: @bazel_tools//tools/jdk:current_host_java_runtime is not provided in runfiles directory | While `"@bazel_tools//tools/jdk:current_java_runtime"` is provided in runfiles dierctory (as expected), `"@bazel_tools//tools/jdk:current_host_java_runtime"` is not.
Working reproducer:
WORKSPACE:
```python
workspace(name = "foo")
```
BUILD:
```python
sh_test(
name = "bar",
args = ["$(JAVABASE)/bin/java"],
data = ["@bazel_tools//tools/jdk:current_java_runtime"],
srcs = ["run.sh"],
tags = [
"local",
"manual"
],
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
```
run.sh:
```bash
#!/bin/bash
set -eu
JAVA=$1
[[ "$JAVA" =~ ^(/|[^/]+$) ]] || JAVA="$PWD/$JAVA"
"${JAVA}" -fullversion
```
And executing the test works as expected:
```
$ bazel test bar
INFO: Analyzed target //:bar (1 packages loaded, 369 targets configured).
INFO: Found 1 test target...
Target //:bar up-to-date:
bazel-bin/bar
INFO: Elapsed time: 0.419s, Critical Path: 0.15s
INFO: 2 processes: 2 local.
INFO: Build completed successfully, 4 total actions
//:bar PASSED in 0.1s
Executed 1 out of 1 test: 1 test passes.
INFO: Build completed successfully, 4 total actions
```
And the content of tests.log is:
```
Executing tests from //:bar
-----------------------------------------------------------------------------
java full version "1.8.0_171-b11"
```
Now apply this diff to the working version above:
```diff
$ git diff
diff --git a/BUILD b/BUILD
index e820161..aa678ae 100644
--- a/BUILD
+++ b/BUILD
@@ -1,11 +1,11 @@
sh_test(
name = "bar",
args = ["$(JAVABASE)/bin/java"],
- data = ["@bazel_tools//tools/jdk:current_java_runtime"],
+ data = ["@bazel_tools//tools/jdk:current_host_java_runtime"],
srcs = ["run.sh"],
tags = [
"local",
"manual"
],
- toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
+ toolchains = ["@bazel_tools//tools/jdk:current_host_java_runtime"],
)
```
Now the test is failing:
```
[...]
bazel-out/k8-fastbuild/bin/bar.runfiles/foo/external/remotejdk11_linux/bin/java: No such file or directory
```
Background: Gerrit Code Review supports also building with alternative build toolchains, see: [1]:
```
$ bazel build \
--host_javabase=@bazel_tools//tools/jdk:remote_jdk11 \
--javabase=@bazel_tools//tools/jdk:remote_jdk11 \
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java11 \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_java11 \
:release
```
We also have some tests in place, that are trying to run final artifact `gerrit.war`. But in the use case above, it was built with remote JDK 11 and thus produced the byte code with major version 55, even though the local JDK is still 8, and that why the tests are failing: [2]
```
#### TEST_SRCDIR = /home/jenkins/.cache/bazel/_bazel_jenkins/3c163556d578d35cc78b8cfe3938f51f/execroot/gerrit/bazel-out/k8-fastbuild/bin/prologtests/examples/test_examples.runfiles
/home/jenkins/.cache/bazel/_bazel_jenkins/3c163556d578d35cc78b8cfe3938f51f/execroot/gerrit/bazel-out/k8-fastbuild/bin/prologtests/examples/test_examples.runfiles/gerrit/prologtests/examples /home/jenkins/.cache/bazel/_bazel_jenkins/3c163556d578d35cc78b8cfe3938f51f/execroot/gerrit/bazel-out/k8-fastbuild/bin/prologtests/examples/test_examples.runfiles/gerrit
### Running test t1.pl
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
```
So, the solution is not just to call `java -jar gerrit.war` in the test, but pass the current `@bazel_tools//tools/jdk:current_host_java_runtime` into the test and use the right JDK runtime.
Unfortunately this doesn't seem to work, see the attempt to fix it here: [3].
[1] https://gerrit-review.googlesource.com/c/gerrit/+/235795
[2] http://paste.openstack.org/show/n0YoCw2AI1pLQcfycAad/
[3] https://gerrit-review.googlesource.com/c/gerrit/+/237472 | [
"tools/jdk/java_toolchain_alias.bzl"
] | [
"tools/jdk/java_toolchain_alias.bzl"
] | [] | diff --git a/tools/jdk/java_toolchain_alias.bzl b/tools/jdk/java_toolchain_alias.bzl
index 81b78120673933..f9c2a7123cc881 100644
--- a/tools/jdk/java_toolchain_alias.bzl
+++ b/tools/jdk/java_toolchain_alias.bzl
@@ -46,10 +46,14 @@ java_runtime_alias = rule(
def _java_host_runtime_alias(ctx):
"""An experimental implementation of java_host_runtime_alias using toolchain resolution."""
runtime = ctx.attr._runtime
+ toolchain = runtime[java_common.JavaRuntimeInfo]
return [
- runtime[java_common.JavaRuntimeInfo],
+ toolchain,
runtime[platform_common.TemplateVariableInfo],
- runtime[DefaultInfo],
+ DefaultInfo(
+ runfiles = ctx.runfiles(transitive_files = toolchain.files),
+ files = toolchain.files,
+ ),
]
java_host_runtime_alias = rule(
| null | val | train | 2019-09-16T19:33:10 | "2019-09-16T14:05:19Z" | davido | test |
bazelbuild/bazel/10023_10034 | bazelbuild/bazel | bazelbuild/bazel/10023 | bazelbuild/bazel/10034 | [
"timestamp(timedelta=66.0, similarity=0.8444135097695894)"
] | 8d0ae20c124fb5e0bf9594f8ca4fa8dc07b47b77 | cf62fd11b2682ebe685a953b4c205f6442a7f9e5 | [
"cc @hlopko who created the release",
"It looks related to the error prone upgrade in https://github.com/bazelbuild/bazel/pull/9372, I'm rebuilding the tools and update this thread when I confirm the culprit.",
"@meisterT I can confirm the error prone upgrade to 2.3.3 is the culprit. The new error prone release introduced new error prone checks. This should have been an incompatible change. @cushon FYI\r\n\r\nNext steps:\r\n1. revert d990746fbd74334aee195dbdb2f6658f30108113\r\n2. create java_tools patch release v6.1\r\n3. upgrade the default java_tools in bazel to v6.1\r\n4. cherry-pick commit for step 3 into bazel 1.1",
"This should be fixed by 0a8071af47223989e9ba335e63b8a9595fe6f10f."
] | [] | "2019-10-15T08:44:33Z" | [
"P1",
"team-Rules-Java"
] | java_tools release broken | ### Description of the problem:
java_tools release probably broke a couple of Java projects (with Dagger?)
See for a full list of breakages in downstream:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1234#a822417e-f2f7-4927-abe7-b01289011f67
(Note that it includes more problems than this particular issue.)
One example:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1234#83e0dae2-b545-413c-9311-56b79320a2b6
Example error:
```
ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ecf942666dab041fc60b1286a219db3e/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/BUILD:34:1: Couldn't build file external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/libbuilder.jar: Building external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/libbuilder.jar (2 source files) and running annotation processors (ComponentProcessor) failed (Exit 1)
--
| bazel-out/host/bin/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/_javac/builder/libbuilder_sourcegenfiles/io/bazel/kotlin/builder/KotlinBuilderComponent_Module_ProvidePluginArgEncoderFactory.java:23: error: [RefersToDaggerCodegen] Don't refer to Dagger's internal or generated code
| return providePluginArgEncoder(module, toolchainProvider.get());
| ^
| (see https://errorprone.info/bugpattern/RefersToDaggerCodegen)
| bazel-out/host/bin/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/_javac/builder/libbuilder_sourcegenfiles/io/bazel/kotlin/builder/KotlinBuilderComponent_Module_ProvidePluginArgEncoderFactory.java:33: error: [RefersToDaggerCodegen] Don't refer to Dagger's internal or generated code
| return Preconditions.checkNotNull(instance.providePluginArgEncoder(toolchain), "Cannot return null from a non-@Nullable @Provides method");
| ^
| (see https://errorprone.info/bugpattern/RefersToDaggerCodegen)
```
### What's the output of `bazel info release`?
This is with the 1.1.0rc1
| [
"WORKSPACE",
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE"
] | [
"WORKSPACE",
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE"
] | [
"src/test/shell/bazel/testdata/jdk_http_archives"
] | diff --git a/WORKSPACE b/WORKSPACE
index d905b52ee1e339..b53508d82aa81b 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -119,9 +119,9 @@ distdir_tar(
archives = [
"e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip",
"f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz",
- "java_tools_javac11_linux-v6.0.zip",
- "java_tools_javac11_windows-v6.0.zip",
- "java_tools_javac11_darwin-v6.0.zip",
+ "java_tools_javac11_linux-v6.1.zip",
+ "java_tools_javac11_windows-v6.1.zip",
+ "java_tools_javac11_darwin-v6.1.zip",
"coverage_output_generator-v2.0.zip",
"c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz",
"8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz",
@@ -144,9 +144,9 @@ distdir_tar(
sha256 = {
"e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d",
"f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz": "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52",
- "java_tools_javac11_linux-v6.0.zip": "37acb8380b1dd6c31fd27a19bf3da821c9b02ee93c6163fce36f070a806516b5",
- "java_tools_javac11_windows-v6.0.zip": "384e138ca58842ea563fb7efbe0cb9c5c381bd4de1f6a31f0256823325f81ccc",
- "java_tools_javac11_darwin-v6.0.zip": "5a9f320c33424262e505151dd5c6903e36678a0f0bbdaae67bcf07f41d8c7cf3",
+ "java_tools_javac11_linux-v6.1.zip": "12f7940ed0bc4c2e82238951cdf19b4179c7dcc361d16fe40fe4266538fb4ac6",
+ "java_tools_javac11_windows-v6.1.zip": "e2deb2efff684de78787e0bdc7620f9672d13f04a12856d8e7f677369a8e286b",
+ "java_tools_javac11_darwin-v6.1.zip": "f0c488dac18f18ab1a0d18bbd65288c7a128e90a24d9c16f65bd8243f79483a0",
"coverage_output_generator-v2.0.zip": "3a6951051272d51613ac4c77af6ce238a3db321bf06506fde1b8866eb18a89dd",
"c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz": "e6a76586b264f30679688f65f7e71ac112d1446681010a13bf22d9ca071f34b7",
"8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898",
@@ -174,14 +174,14 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz",
],
- "java_tools_javac11_linux-v6.0.zip": [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_linux-v6.0.zip",
+ "java_tools_javac11_linux-v6.1.zip": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_linux-v6.1.zip",
],
- "java_tools_javac11_windows-v6.0.zip": [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_windows-v6.0.zip",
+ "java_tools_javac11_windows-v6.1.zip": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_windows-v6.1.zip",
],
- "java_tools_javac11_darwin-v6.0.zip": [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_darwin-v6.0.zip",
+ "java_tools_javac11_darwin-v6.1.zip": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_darwin-v6.1.zip",
],
"coverage_output_generator-v2.0.zip": [
"https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.0.zip",
@@ -497,9 +497,9 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz",
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip",
"jdk10-server-release-1804.tar.xz",
- "java_tools_javac11_linux-v6.0.zip",
- "java_tools_javac11_windows-v6.0.zip",
- "java_tools_javac11_darwin-v6.0.zip",
+ "java_tools_javac11_linux-v6.1.zip",
+ "java_tools_javac11_windows-v6.1.zip",
+ "java_tools_javac11_darwin-v6.1.zip",
"coverage_output_generator-v2.0.zip",
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
"zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz",
@@ -528,9 +528,9 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz": "e669c9a897413d855b550b4e39d79614392e6fb96f494e8ef99a34297d9d85d3",
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip": "c39e7700a8d41794d60985df5a20352435196e78ecbc6a2b30df7be8637bffd5",
"jdk10-server-release-1804.tar.xz": "b7098b7aaf6ee1ffd4a2d0371a0be26c5a5c87f6aebbe46fe9a92c90583a84be",
- "java_tools_javac11_linux-v6.0.zip": "37acb8380b1dd6c31fd27a19bf3da821c9b02ee93c6163fce36f070a806516b5",
- "java_tools_javac11_windows-v6.0.zip": "384e138ca58842ea563fb7efbe0cb9c5c381bd4de1f6a31f0256823325f81ccc",
- "java_tools_javac11_darwin-v6.0.zip": "5a9f320c33424262e505151dd5c6903e36678a0f0bbdaae67bcf07f41d8c7cf3",
+ "java_tools_javac11_linux-v6.1.zip": "12f7940ed0bc4c2e82238951cdf19b4179c7dcc361d16fe40fe4266538fb4ac6",
+ "java_tools_javac11_windows-v6.1.zip": "e2deb2efff684de78787e0bdc7620f9672d13f04a12856d8e7f677369a8e286b",
+ "java_tools_javac11_darwin-v6.1.zip": "f0c488dac18f18ab1a0d18bbd65288c7a128e90a24d9c16f65bd8243f79483a0",
"coverage_output_generator-v2.0.zip": "3a6951051272d51613ac4c77af6ce238a3db321bf06506fde1b8866eb18a89dd",
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": "232b1c3511f0d26e92582b7c3cc363be7ac633e371854ca2f2e9f2b50eb72a75",
"zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b",
@@ -558,9 +558,9 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz"],
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip": ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip"],
"jdk10-server-release-1804.tar.xz": ["https://mirror.bazel.build/openjdk.linaro.org/releases/jdk10-server-release-1804.tar.xz"],
- "java_tools_javac11_linux-v6.0.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_linux-v6.0.zip"],
- "java_tools_javac11_windows-v6.0.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_windows-v6.0.zip"],
- "java_tools_javac11_darwin-v6.0.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_darwin-v6.0.zip"],
+ "java_tools_javac11_linux-v6.1.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_linux-v6.1.zip"],
+ "java_tools_javac11_windows-v6.1.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_windows-v6.1.zip"],
+ "java_tools_javac11_darwin-v6.1.zip": ["https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_darwin-v6.1.zip"],
"coverage_output_generator-v2.0.zip": ["https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.0.zip"],
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz"],
"zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz"],
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE
index f96cff43385834..3919a596ae9ca2 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE
@@ -230,30 +230,30 @@ maybe(
maybe(
http_archive,
name = "remote_java_tools_linux",
- sha256 = "37acb8380b1dd6c31fd27a19bf3da821c9b02ee93c6163fce36f070a806516b5",
+ sha256 = "12f7940ed0bc4c2e82238951cdf19b4179c7dcc361d16fe40fe4266538fb4ac6",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_linux-v6.0.zip",
- "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.0/java_tools_javac11_linux-v6.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_linux-v6.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.1/java_tools_javac11_linux-v6.1.zip",
],
)
maybe(
http_archive,
name = "remote_java_tools_windows",
- sha256 = "384e138ca58842ea563fb7efbe0cb9c5c381bd4de1f6a31f0256823325f81ccc",
+ sha256 = "e2deb2efff684de78787e0bdc7620f9672d13f04a12856d8e7f677369a8e286b",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_windows-v6.0.zip",
- "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.0/java_tools_javac11_windows-v6.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_windows-v6.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.1/java_tools_javac11_windows-v6.1.zip",
],
)
maybe(
http_archive,
name = "remote_java_tools_darwin",
- sha256 = "5a9f320c33424262e505151dd5c6903e36678a0f0bbdaae67bcf07f41d8c7cf3",
+ sha256 = "f0c488dac18f18ab1a0d18bbd65288c7a128e90a24d9c16f65bd8243f79483a0",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.0/java_tools_javac11_darwin-v6.0.zip",
- "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.0/java_tools_javac11_darwin-v6.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_darwin-v6.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/javac11-v6.1/java_tools_javac11_darwin-v6.1.zip",
],
)
| diff --git a/src/test/shell/bazel/testdata/jdk_http_archives b/src/test/shell/bazel/testdata/jdk_http_archives
index 2181de92fd4e20..5e81598248e3ba 100644
--- a/src/test/shell/bazel/testdata/jdk_http_archives
+++ b/src/test/shell/bazel/testdata/jdk_http_archives
@@ -47,23 +47,23 @@ http_archive(
################### Remote java_tools with embedded javac 11 ###################
http_archive(
name = "remote_java_tools_javac11_test_linux",
- sha256 = "10d6f00c72e42b6fda378ad506cc93b1dc92e1aec6e2a490151032244b8b8df5",
+ sha256 = "12f7940ed0bc4c2e82238951cdf19b4179c7dcc361d16fe40fe4266538fb4ac6",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v3.0/java_tools_javac11_linux-v3.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_linux-v6.1.zip",
],
)
http_archive(
name = "remote_java_tools_javac11_test_windows",
- sha256 = "b688155d81245b4d1ee52cac447aae5444b1c59dc77158fcbde05554a6bab48b",
+ sha256 = "e2deb2efff684de78787e0bdc7620f9672d13f04a12856d8e7f677369a8e286b",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v3.0/java_tools_javac11_windows-v3.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_windows-v6.1.zip",
],
)
http_archive(
name = "remote_java_tools_javac11_test_darwin",
- sha256 = "28989f78b1ce437c92dd27bb4943b2211ba4db916ccbb3aef83696a8f9b43724",
+ sha256 = "f0c488dac18f18ab1a0d18bbd65288c7a128e90a24d9c16f65bd8243f79483a0",
urls = [
- "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v3.0/java_tools_javac11_darwin-v3.0.zip",
+ "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_darwin-v6.1.zip",
],
)
| train | train | 2019-10-15T11:51:15 | "2019-10-14T17:41:50Z" | meisterT | test |
bazelbuild/bazel/10039_10052 | bazelbuild/bazel | bazelbuild/bazel/10039 | bazelbuild/bazel/10052 | [
"timestamp(timedelta=0.0, similarity=0.848263207399211)"
] | 5a74742d83f1ff68e4d019eca6e4a0643a8eb2cb | d878f5811fa13f1ca7d3afcbcea127ef61c41eee | [
"This is worth at least clarifying which part of the code base is failing to make the connection. From there we can prioritize the right fix. ",
"PR to support Starlark-defined flags starting with `--@`: https://github.com/bazelbuild/bazel/pull/10052"
] | [] | "2019-10-17T03:33:51Z" | [
"P2",
"team-Configurability"
] | Support custom skylark build flags in external dependencies | ### Description of the problem / feature request:
The implementation of Skylark support for custom build flags
(#5577) does not work for custom build flags in external repositories.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Given the following setup:
```
mkdir my-external
touch my-external/WORKSPACE nothing.txt myext.txt top.txt
cat >my-external/BUILD.bazel <<EOF
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
bool_flag(
name = "flag_in_myext",
build_setting_default = False, visibility = ["//visibility:public"],
)
EOF
cat >BUILD.bazel <<EOF
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
bool_flag(
name = "flag_at_top",
build_setting_default = False,
)
alias(
name = "alias_for_flag_in_myext",
actual = "@myext//:flag_in_myext",
)
config_setting(
name = "is_flag_at_top_enabled",
flag_values = {":flag_at_top": "True"},
)
config_setting(
name = "is_flag_in_myext_enabled",
flag_values = {":alias_for_flag_in_myext": "True"},
)
filegroup(
name = "everything",
srcs = select({
":is_flag_at_top_enabled": ["top.txt"],
":is_flag_in_myext_enabled": ["myext.txt"],
"//conditions:default": ["nothing.text"],
}),
)
EOF
cat >WORKSPACE <<EOF
local_repository(name = "myext", path = "my-external")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
url = "https://github.com/bazelbuild/bazel-skylib/archive/b113ed5d05ccddee3093bb157b9b02ab963c1c32.zip",
sha256 = "cea47b31962206b7ebf2088f749243868d5d9305273205bdd8651567d3e027fc",
strip_prefix = "bazel-skylib-b113ed5d05ccddee3093bb157b9b02ab963c1c32",
)
EOF
```
the output looks like
```
$ bazel cquery 'kind("source file", deps(:everything))'
//:nothing.text (null)
$ bazel cquery 'kind("source file", deps(:everything))' --//:flag_at_top
//:top.txt (null)
$ bazel cquery 'kind("source file", deps(:everything))' --@myext//:flag_in_myext
ERROR: Unrecognized option: --@myext//:flag_in_myext
$ bazel cquery 'kind("source file", deps(:everything))' --//:alias_for_flag_in_myext
ERROR: Unrecognized option: //:alias_for_flag_in_myext
```
I would expect the bottom two cases to work and output `//:myext.txt (null)`. The alias would be very convenient for the user to shorten the command line.
### What operating system are you running Bazel on?
Linux
### What's the output of `bazel info release`?
`release 1.0.0`
### Have you found anything relevant by searching the web?
@gregestren suggested reporting this bug/feature request as the core functionality was implemented in #5577.
| [
"src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java",
"src/main/java/com/google/devtools/common/options/OptionsParser.java",
"src/main/java/com/google/devtools/common/options/OptionsParserImpl.java"
] | [
"src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java",
"src/main/java/com/google/devtools/common/options/OptionsParser.java",
"src/main/java/com/google/devtools/common/options/OptionsParserImpl.java"
] | [
"src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java",
"src/test/shell/integration/starlark_configurations_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
index 027fa3432a4401..53d3cdb3ee0e28 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
@@ -653,6 +653,7 @@ private OptionsParser createOptionsParser(BlazeCommand command)
OptionsParser.builder()
.optionsData(optionsData)
.skippedPrefix("--//")
+ .skippedPrefix("--@")
.allowResidue(annotation.allowResidue())
.build();
return parser;
diff --git a/src/main/java/com/google/devtools/common/options/OptionsParser.java b/src/main/java/com/google/devtools/common/options/OptionsParser.java
index c495b7f98e567c..88253ff5f880f4 100644
--- a/src/main/java/com/google/devtools/common/options/OptionsParser.java
+++ b/src/main/java/com/google/devtools/common/options/OptionsParser.java
@@ -183,7 +183,7 @@ public Builder argsPreProcessor(ArgsPreProcessor preProcessor) {
}
/** Any flags with this prefix will be skipped during processing. */
- public Builder skippedPrefix(@Nullable String skippedPrefix) {
+ public Builder skippedPrefix(String skippedPrefix) {
this.implBuilder.skippedPrefix(skippedPrefix);
return this;
}
diff --git a/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java b/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
index d8b47e4a20b44b..a753a9e76deb4e 100644
--- a/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
+++ b/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
@@ -47,7 +47,7 @@ class OptionsParserImpl {
static final class Builder {
private OptionsData optionsData;
private ArgsPreProcessor argsPreProcessor = args -> args;
- @Nullable private String skippedPrefix;
+ private ArrayList<String> skippedPrefixes = new ArrayList<>();
private boolean ignoreInternalOptions = true;
/** Set the {@link OptionsData} to be used in this instance. */
@@ -63,8 +63,8 @@ public Builder argsPreProcessor(ArgsPreProcessor preProcessor) {
}
/** Any flags with this prefix will be skipped during processing. */
- public Builder skippedPrefix(@Nullable String skippedPrefix) {
- this.skippedPrefix = skippedPrefix;
+ public Builder skippedPrefix(String skippedPrefix) {
+ this.skippedPrefixes.add(skippedPrefix);
return this;
}
@@ -77,7 +77,7 @@ public Builder ignoreInternalOptions(boolean ignoreInternalOptions) {
/** Returns a newly-initialized {@link OptionsParserImpl}. */
public OptionsParserImpl build() {
return new OptionsParserImpl(
- this.optionsData, this.argsPreProcessor, this.skippedPrefix, this.ignoreInternalOptions);
+ this.optionsData, this.argsPreProcessor, this.skippedPrefixes, this.ignoreInternalOptions);
}
}
@@ -124,17 +124,17 @@ public static Builder builder() {
private final List<String> warnings = new ArrayList<>();
private final ArgsPreProcessor argsPreProcessor;
- @Nullable private final String skippedPrefix;
+ private final List<String> skippedPrefixes;
private final boolean ignoreInternalOptions;
OptionsParserImpl(
OptionsData optionsData,
ArgsPreProcessor argsPreProcessor,
- @Nullable String skippedPrefix,
+ List<String> skippedPrefixes,
boolean ignoreInternalOptions) {
this.optionsData = optionsData;
this.argsPreProcessor = argsPreProcessor;
- this.skippedPrefix = skippedPrefix;
+ this.skippedPrefixes = skippedPrefixes;
this.ignoreInternalOptions = ignoreInternalOptions;
}
@@ -145,10 +145,13 @@ OptionsData getOptionsData() {
/** Returns a {@link Builder} that is configured the same as this parser. */
Builder toBuilder() {
- return builder()
+ Builder builder = builder()
.optionsData(optionsData)
- .argsPreProcessor(argsPreProcessor)
- .skippedPrefix(skippedPrefix);
+ .argsPreProcessor(argsPreProcessor);
+ for (String skippedPrefix : skippedPrefixes) {
+ builder.skippedPrefix(skippedPrefix);
+ }
+ return builder;
}
/** Implements {@link OptionsParser#asCompleteListOfParsedOptions()}. */
@@ -350,7 +353,7 @@ private ResidueAndPriority parse(
continue; // not an option arg
}
- if (skippedPrefix != null && arg.startsWith(skippedPrefix)) {
+ if (skippedPrefixes.stream().anyMatch(prefix -> arg.startsWith(prefix))) {
unparsedArgs.add(arg);
continue;
}
| diff --git a/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java b/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
index cce15bc6571645..26e375d3195414 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/StarlarkOptionsParsingTest.java
@@ -161,6 +161,19 @@ public void testFlagSpaceValueForm() throws Exception {
assertThat(result.getResidue()).isEmpty();
}
+ // test --@workspace//flag=value
+ @Test
+ public void testFlagNameWithWorkspace() throws Exception {
+ writeBasicIntFlag();
+ rewriteWorkspace("workspace(name = 'starlark_options_test')");
+
+ OptionsParsingResult result = parseStarlarkOptions("--@starlark_options_test//test:my_int_setting=666");
+
+ assertThat(result.getStarlarkOptions()).hasSize(1);
+ assertThat(result.getStarlarkOptions().get("@starlark_options_test//test:my_int_setting")).isEqualTo(666);
+ assertThat(result.getResidue()).isEmpty();
+ }
+
// test --fake_flag=value
@Test
public void testBadFlag_equalsForm() throws Exception {
diff --git a/src/test/shell/integration/starlark_configurations_test.sh b/src/test/shell/integration/starlark_configurations_test.sh
index a8697d49af88e7..a9bce39f6d3694 100755
--- a/src/test/shell/integration/starlark_configurations_test.sh
+++ b/src/test/shell/integration/starlark_configurations_test.sh
@@ -61,8 +61,14 @@ add_to_bazelrc "build --package_path=%workspace%"
#### HELPER FXNS #######################################################
function write_build_setting_bzl() {
- cat > $pkg/build_setting.bzl <<EOF
+ declare -r at_workspace="${1:-}"
+
+ cat > $pkg/provider.bzl <<EOF
BuildSettingInfo = provider(fields = ['name', 'value'])
+EOF
+
+ cat > $pkg/build_setting.bzl <<EOF
+load("@${WORKSPACE_NAME}//$pkg:provider.bzl", "BuildSettingInfo")
def _build_setting_impl(ctx):
return [BuildSettingInfo(name = ctx.attr.name, value = ctx.build_setting_value)]
@@ -74,7 +80,7 @@ drink_attribute = rule(
EOF
cat > $pkg/rules.bzl <<EOF
-load("//$pkg:build_setting.bzl", "BuildSettingInfo")
+load("@${WORKSPACE_NAME}//$pkg:provider.bzl", "BuildSettingInfo")
def _impl(ctx):
_type_name = ctx.attr._type[BuildSettingInfo].name
@@ -88,8 +94,8 @@ def _impl(ctx):
drink = rule(
implementation = _impl,
attrs = {
- "_type":attr.label(default = Label("//$pkg:type")),
- "_temp":attr.label(default = Label("//$pkg:temp")),
+ "_type":attr.label(default = Label("$at_workspace//$pkg:type")),
+ "_temp":attr.label(default = Label("$at_workspace//$pkg:temp")),
},
fragments = ["java"],
)
@@ -101,8 +107,16 @@ load("//$pkg:rules.bzl", "drink")
drink(name = 'my_drink')
-drink_attribute(name = 'type', build_setting_default = 'unknown')
-drink_attribute(name = 'temp', build_setting_default = 'unknown')
+drink_attribute(
+ name = 'type',
+ build_setting_default = 'unknown',
+ visibility = ['//visibility:public'],
+)
+drink_attribute(
+ name = 'temp',
+ build_setting_default = 'unknown',
+ visibility = ['//visibility:public'],
+)
EOF
}
@@ -133,6 +147,19 @@ function test_set_flag() {
expect_log "type=coffee"
}
+function test_set_flag_with_workspace_name() {
+ local -r pkg=$FUNCNAME
+ mkdir -p $pkg
+
+ write_build_setting_bzl "@${WORKSPACE_NAME}"
+
+ bazel build //$pkg:my_drink --@"${WORKSPACE_NAME}"//$pkg:type="coffee" \
+ --experimental_build_setting_api > output 2>"$TEST_log" \
+ || fail "Expected success"
+
+ expect_log "type=coffee"
+}
+
function test_starlark_and_native_flag() {
local -r pkg=$FUNCNAME
mkdir -p $pkg
| val | train | 2019-10-17T05:29:19 | "2019-10-15T12:29:26Z" | moroten | test |
bazelbuild/bazel/10094_10095 | bazelbuild/bazel | bazelbuild/bazel/10094 | bazelbuild/bazel/10095 | [
"timestamp(timedelta=1.0, similarity=0.8938632633421661)"
] | 01138c8f9a1164c47dc6bb06f7c71c5a3f9f694f | 52100d85fa55651c1b7b0b88c3c1d16e6e92b37d | [
"`//src/test/java/com/google/devtools/build/lib/bazel:bazel-rules-tests` is failing. Please take a look at that. It's probably because the mocked NDK doesn't have these files..?"
] | [
"This is not a unique name, if `toolchain.getTargetCpu()` is common between the outer crosstools loop.",
"Thanks for this, I've changed the rule name to contain the toolchain name, and it seems to have fixed the tests."
] | "2019-10-24T11:56:50Z" | [
"team-Android"
] | Android NDK package: add filegroup for Vulkan validation layers | ### Description of the feature request:
Provide a mean to access Vulkan validation layers which are precompiled dynamic libraries shipped in Android NDK.
Android NDK BUILD file is generated by Bazel itself (`@androidndk`), and offers predefined rules/target related to the NDK. Currently, I cannot find an easy way to refer to the Vulkan validation layers. These layers are shipped in:
`$ANDROID_NDK_HOME/sources/third_party/vulkan/src/build-android/jniLibs/<ABI>/libVkLayer_*.so`
Where ABI is arm64-v8a, x86, etc.
### Feature requests: what underlying problem are you trying to solve with this feature?
Easily add Vulkan validation layers to Android app.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Try to refer to the Vulkan validation layers using Bazel. I think that currently you need a repository rule that can access ANDROID_NDK_HOME environment variable, and search for those layers yourself.
### Have you found anything relevant by searching the web?
Nothing relevant shows up.
| [
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt",
"src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_vulkan_validation_layers_template.txt"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
index dc33d59a0aa264..7c5cd30e452b2f 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryFunction.java
@@ -85,11 +85,13 @@ private static String createBuildFile(
String ccToolchainSuiteTemplate = getTemplate("android_ndk_cc_toolchain_suite_template.txt");
String ccToolchainTemplate = getTemplate("android_ndk_cc_toolchain_template.txt");
String stlFilegroupTemplate = getTemplate("android_ndk_stl_filegroup_template.txt");
+ String vulkanValidationLayersTemplate = getTemplate("android_ndk_vulkan_validation_layers_template.txt");
String miscLibrariesTemplate = getTemplate("android_ndk_misc_libraries_template.txt");
StringBuilder ccToolchainSuites = new StringBuilder();
StringBuilder ccToolchainRules = new StringBuilder();
StringBuilder stlFilegroups = new StringBuilder();
+ StringBuilder vulkanValidationLayers = new StringBuilder();
for (CrosstoolStlPair crosstoolStlPair : crosstools) {
// Create the cc_toolchain_suite rule
@@ -131,6 +133,15 @@ private static String createBuildFile(
.replace("%name%", entry.getKey())
.replace("%fileGlobPattern%", entry.getValue()));
}
+
+ // Create the Vulkan validation layers libraries
+ for (CToolchain toolchain : crosstool.getToolchainList()) {
+ vulkanValidationLayers.append(
+ vulkanValidationLayersTemplate
+ .replace("%toolchainName%", toolchain.getToolchainIdentifier())
+ .replace("%cpu%", toolchain.getTargetCpu()));
+ }
+
}
return buildFileTemplate
@@ -139,6 +150,7 @@ private static String createBuildFile(
.replace("%ccToolchainSuites%", ccToolchainSuites)
.replace("%ccToolchainRules%", ccToolchainRules)
.replace("%stlFilegroups%", stlFilegroups)
+ .replace("%vulkanValidationLayers%", vulkanValidationLayers)
.replace("%miscLibraries%", miscLibrariesTemplate);
}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt
index 0d0fbb45652c6f..b8e58e5d5a6262 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt
@@ -52,6 +52,12 @@ alias(
%stlFilegroups%
+################################################################
+# Vulkan validation layers libraries
+################################################################
+
+%vulkanValidationLayers%
+
################################################################
# Miscellaneous runtime libraries
################################################################
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_vulkan_validation_layers_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_vulkan_validation_layers_template.txt
new file mode 100644
index 00000000000000..dd32111cb8f98e
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_vulkan_validation_layers_template.txt
@@ -0,0 +1,4 @@
+cc_library(
+ name = "vulkan_validation_layers_%toolchainName%",
+ srcs = glob(["ndk/sources/third_party/vulkan/src/build-android/jniLibs/%cpu%/libVkLayer_*.so"]),
+)
| null | train | train | 2020-04-23T08:54:55 | "2019-10-24T09:43:13Z" | hevrard | test |
bazelbuild/bazel/10154_10301 | bazelbuild/bazel | bazelbuild/bazel/10154 | bazelbuild/bazel/10301 | [
"timestamp(timedelta=79204.0, similarity=0.8918293338897928)"
] | fc287a3fda683f267ff586fdf45ca7ec06ffe316 | ca93782b924a0e4f94443c33061d0518fea31dd4 | [
"Easiest note first: As the error reports, we currently only support a single argument to `--platforms`. The flag is plural in order to allow for a future migration to supporting multiplatform builds without requiring everyone to change their flag settings, but we are not there currently. However, this should not be a crash, so I will fix that ASAP to instead gracefully report an error.\r\n\r\nSecond note: You will need to discuss with the CPP rules team how to migrate the `--compiler` flag, but trying to do a multiplatform build is not the appropriate way. In general, our view is that when we implement multiplatform builds, the specified targets will be build for all platforms, ie:\r\n\r\n```py\r\nbazel build --platforms=//:x86,//:gcc //:foo\r\n```\r\n\r\nWill build `foo` twice, once for platform `//:x86` and once for platform `//:gcc`. This is almost certainly not what you want.\r\n\r\nYou should create a new issue for the migration of the `--compiler` flag, or ask on the [bazel-discuss](https://groups.google.com/forum/#!forum/bazel-discuss) mailing list.",
"That explains the use case of `--platforms` and the misunderstanding from my side. I will write about my thoughts on bazel-discuss one day soon, so this issue can be closed after the crash fix."
] | [
"Is this commented out code intentional? If yes please include a TODO explaining its purpose.",
"I initially added it, then realized it changes semantics and broke tests, and forgot to completely remove. Now it's really gone."
] | "2019-11-25T15:53:59Z" | [
"type: bug",
"P1",
"team-Configurability"
] | Crash when specifying multiple platforms | ### Description of the problem / feature request:
When porting `--cpu` and `--compiler` and other command line options to `constraint_setting`, it makes sense to have multiple platforms, for example one for the cpu and one for the compiler.
Specifying multiple `--platforms` will ignore all but the last. Using a comma-separated list makes Bazel crash.
By the way, why is it called platform**s** when only one platform can be specified?
(My other use case is to use platforms to set groups of `constraint_values` at ones. This could be replaced by `build_setting`s, but the command line would be really long unless using configs in bazelrc as a replacement.)
### Feature requests: what underlying problem are you trying to solve with this feature?
Allow multiple platforms to be specified. Conflicting `constraint_values` should produce an error.
It would be beneficial to let `--platforms` accumulate so that some can be set through bazelrc, for example with the automatic linux/windows configs, and others appended manually.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```
cat > BUILD.bazel <<EOF
constraint_setting(name = "cs_foo")
constraint_value(name = "cv_foo", constraint_setting = ":cs_foo")
platform(name = "foo", constraint_values = [":cv_foo"])
config_setting(name = "is_foo", constraint_values = [":cv_foo"])
constraint_setting(name = "cs_bar")
constraint_value(name = "cv_bar", constraint_setting = ":cs_bar")
platform(name = "bar", constraint_values = [":cv_bar"])
config_setting(name = "is_bar", constraint_values = [":cv_bar"])
filegroup(
name = "my_filegroup",
srcs = select({
":is_foo": ["foo.txt"],
":is_bar": ["bar.txt"],
}),
)
EOF
# If both :foo and :bar would be used (what I expected), the select() should error out due to multiple matches.
bazel build --platforms=:foo --platform=:bar :my_filegroup
# This will crash. See the stack trace at the end.
bazel build --platforms=:foo,:bar :my_filegroup
```
### What operating system are you running Bazel on?
Linux (Ubuntu)
### What's the output of `bazel info release`?
`release 1.1.0`
### Have you found anything relevant by searching the web?
- StackOverflow: http://stackoverflow.com/questions/tagged/bazel
Not much about multiple platforms.
- GitHub issues: https://github.com/bazelbuild/bazel/issues
https://github.com/bazelbuild/bazel/issues?page=2&q=is%3Aissue+multiple+platform&utf8=%E2%9C%93 gave nothing.
- email threads on https://groups.google.com/forum/#!forum/bazel-discuss
The closest I get to potentially handle multiple platforms is [Cross compiling with Bazel](https://groups.google.com/forum/#!searchin/bazel-discuss/platforms$20multiple|sort:date/bazel-discuss/yTRS5h2o7mI/zzv-faZJEQAJ).
### Any other information, logs, or outputs that you want to share?
The Bazel crash stack trace when specifying multiple platforms. The same stack trace in both Bazel 0.26.1 as in Bazel 1.1.0. Bazel 0.25.2 does not crash, it just chooses the first of the specified platforms.
```
$ bin/bazel build --platforms=:foo,:bar :some_target
INFO: Writing tracer profile to '/.../command.profile.gz'
Internal error thrown during build. Printing stack trace: java.lang.IllegalArgumentException: Platform mapping only supports a single target platform but found [//:foo, //:bar]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:216)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.computeMapping(PlatformMappingValue.java:213)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.lambda$map$0(PlatformMappingValue.java:191)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4875)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4870)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.map(PlatformMappingValue.java:191)
at com.google.devtools.build.lib.skyframe.BuildConfigurationValue.keyWithPlatformMapping(BuildConfigurationValue.java:90)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.toConfigurationKey(SkyframeExecutor.java:2154)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.getConfigurations(SkyframeExecutor.java:1923)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.createConfigurations(SkyframeExecutor.java:1493)
at com.google.devtools.build.lib.analysis.BuildView.update(BuildView.java:246)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.runAnalysisPhase(AnalysisPhaseRunner.java:212)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.execute(AnalysisPhaseRunner.java:124)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:141)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:268)
at com.google.devtools.build.lib.runtime.commands.BuildCommand.exec(BuildCommand.java:99)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:540)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:204)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:596)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:647)
at java.base/java.lang.Thread.run(Unknown Source)
INFO: Elapsed time: 0.111s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Internal error thrown during build. Printing stack trace: java.lang.IllegalArgumentException: Platform mapping only supports a single target platform but found [//:foo, //:bar]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:216)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.computeMapping(PlatformMappingValue.java:213)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.lambda$map$0(PlatformMappingValue.java:191)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4875)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4870)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.map(PlatformMappingValue.java:191)
at com.google.devtools.build.lib.skyframe.BuildConfigurationValue.keyWithPlatformMapping(BuildConfigurationValue.java:90)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.toConfigurationKey(SkyframeExecutor.java:2154)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.getConfigurations(SkyframeExecutor.java:1923)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.createConfigurations(SkyframeExecutor.java:1493)
at com.google.devtools.build.lib.analysis.BuildView.update(BuildView.java:246)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.runAnalysisPhase(AnalysisPhaseRunner.java:212)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.execute(AnalysisPhaseRunner.java:124)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:141)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:268)
at com.google.devtools.build.lib.runtime.commands.BuildCommand.exec(BuildCommand.java:99)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:540)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:204)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:596)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:647)
at java.base/java.lang.Thread.run(Unknown Source)
java.lang.IllegalArgumentException: Platform mapping only supports a single target platform but found [//:foo, //:bar]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:216)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.computeMapping(PlatformMappingValue.java:213)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.lambda$map$0(PlatformMappingValue.java:191)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4875)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4870)
at com.google.devtools.build.lib.skyframe.PlatformMappingValue.map(PlatformMappingValue.java:191)
at com.google.devtools.build.lib.skyframe.BuildConfigurationValue.keyWithPlatformMapping(BuildConfigurationValue.java:90)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.toConfigurationKey(SkyframeExecutor.java:2154)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.getConfigurations(SkyframeExecutor.java:1923)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.createConfigurations(SkyframeExecutor.java:1493)
at com.google.devtools.build.lib.analysis.BuildView.update(BuildView.java:246)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.runAnalysisPhase(AnalysisPhaseRunner.java:212)
at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.execute(AnalysisPhaseRunner.java:124)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:141)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:268)
at com.google.devtools.build.lib.runtime.commands.BuildCommand.exec(BuildCommand.java:99)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:540)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:204)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:596)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:647)
FAILED: Build did NOT complete successfully (0 packages loaded)
``` | [
"src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java"
] | [
"src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
index 756fb44b1e1e1c..12344564ede28c 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
@@ -16,8 +16,11 @@
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
+import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.ThreadSafety;
+import com.google.devtools.build.lib.events.Event;
+import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.skylarkbuildapi.platform.PlatformConfigurationApi;
import com.google.devtools.build.lib.util.RegexFilter;
import java.util.List;
@@ -49,6 +52,19 @@ public class PlatformConfiguration extends BuildConfiguration.Fragment
this.targetFilterToAdditionalExecConstraints = targetFilterToAdditionalExecConstraints;
}
+ @Override
+ public void reportInvalidOptions(EventHandler reporter, BuildOptions buildOptions) {
+ PlatformOptions platformOptions = buildOptions.get(PlatformOptions.class);
+ // TODO(https://github.com/bazelbuild/bazel/issues/6519): Implement true multiplatform builds.
+ if (platformOptions.platforms.size() > 1) {
+ reporter.handle(
+ Event.warn(
+ String.format(
+ "--platforms only supports a single target platform: using the first option %s",
+ this.targetPlatform)));
+ }
+ }
+
@Override
public Label getHostPlatform() {
return hostPlatform;
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
index 151068e997b4d7..d4d6de299c64e2 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
@@ -210,12 +210,8 @@ private BuildConfigurationValue.Key computeMapping(
if (!originalOptions.get(PlatformOptions.class).platforms.isEmpty()) {
List<Label> platforms = originalOptions.get(PlatformOptions.class).platforms;
- Preconditions.checkArgument(
- platforms.size() == 1,
- "Platform mapping only supports a single target platform but found %s",
- platforms);
-
- Label targetPlatform = Iterables.getOnlyElement(platforms);
+ // Platform mapping only supports a single target platform, others are ignored.
+ Label targetPlatform = Iterables.getFirst(platforms, null);
if (!platformsToFlags.containsKey(targetPlatform)) {
// This can happen if the user has set the platform and any other flags that would normally
// be mapped from it on the command line instead of relying on the mapping.
| null | train | train | 2019-11-25T11:51:57 | "2019-11-01T20:47:30Z" | moroten | test |
bazelbuild/bazel/10176_10577 | bazelbuild/bazel | bazelbuild/bazel/10176 | bazelbuild/bazel/10577 | [
"timestamp(timedelta=0.0, similarity=0.880780684099557)"
] | 3a5b187603808959337372a12217e1abbe73f156 | 103a7895bbe36df97c0453cf584e1bac99dc9b8b | [] | [
"This is a new dependency, and it's totally unnecessary. There is already code in StructImpl.java to escape Java strings into JSON notation (see L319); please re-use it.",
"Don't use String.valueOf(x) here; it's equivalent to x.toString() except when x is null, which can't happen because this statement is dominated by the check on L291 (and even if it could, I would prefer to see a crash in that case than to silently emit incorrect JSON).\r\n\r\nUse: (String) entry.getKey()",
"Could you also apply escaping to the field names on L280? Field names should be valid identifiers, but this is not guaranteed, and we don't want to emit corrupt JSON in that case. \r\n\r\nAt that point, there are three places that emit quote escape(s) quote; could you refactor jsonEscapeString to accept a StringBuilder and emit the quotes too? Thanks.",
"Sounds good.",
"Done.",
"The appendColon logic has no business being in here, as it can be composed separately an no extra cost, resulting in a simpler function.",
"If you like, use append('\"') to avoid the internal loop.",
"Let's call this function appendJSONStringLiteral, the StringBuilder 'out', and the String s.",
"Sounds good.",
"Not sure I completely understand your suggestion. Was my change what you had in mind?",
"Done."
] | "2020-01-14T00:22:39Z" | [
"type: bug",
"P3",
"good first issue"
] | struct.to_json doesn't escape keys | ### Description of the problem / feature request:
struct.to_json doesn't escape keys.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```python
print(struct(**{ "\"": 1 }).to_json()) # outputs {""":1}
```
### What operating system are you running Bazel on?
macOS
### What's the output of `bazel info release`?
release 0.27.0
### Have you found anything relevant by searching the web?
N/A
### Any other information, logs, or outputs that you want to share?
https://github.com/bazelbuild/bazel/blob/a3421e204f22e478382bb8487b96df9dcd8e463a/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java#L300
Keys are not escaped. | [
"src/main/java/com/google/devtools/build/lib/packages/StructImpl.java"
] | [
"src/main/java/com/google/devtools/build/lib/packages/StructImpl.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java b/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
index 0b0cc35526cd19..5030af2ca86f6e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
@@ -270,9 +270,8 @@ private static void printJson(Object value, StringBuilder sb, String container,
for (String field : ((ClassObject) value).getFieldNames()) {
sb.append(join);
join = ",";
- sb.append("\"");
- sb.append(field);
- sb.append("\":");
+ appendJSONStringLiteral(sb, field);
+ sb.append(':');
printJson(((ClassObject) value).getValue(field), sb, "struct field", field);
}
sb.append("}");
@@ -289,9 +288,8 @@ private static void printJson(Object value, StringBuilder sb, String container,
container,
key != null ? " '" + key + "'" : "");
}
- sb.append("\"");
- sb.append(entry.getKey());
- sb.append("\":");
+ appendJSONStringLiteral(sb, (String) entry.getKey());
+ sb.append(':');
printJson(entry.getValue(), sb, "dict value", String.valueOf(entry.getKey()));
}
sb.append("}");
@@ -305,9 +303,7 @@ private static void printJson(Object value, StringBuilder sb, String container,
}
sb.append("]");
} else if (value instanceof String) {
- sb.append("\"");
- sb.append(jsonEscapeString((String) value));
- sb.append("\"");
+ appendJSONStringLiteral(sb, (String) value);
} else if (value instanceof Integer || value instanceof Boolean) {
sb.append(value);
} else {
@@ -318,10 +314,12 @@ private static void printJson(Object value, StringBuilder sb, String container,
}
}
- private static String jsonEscapeString(String string) {
- return escapeDoubleQuotesAndBackslashesAndNewlines(string)
+ private static void appendJSONStringLiteral(StringBuilder out, String s) {
+ out.append('"');
+ out.append(escapeDoubleQuotesAndBackslashesAndNewlines(s)
.replace("\r", "\\r")
- .replace("\t", "\\t");
+ .replace("\t", "\\t"));
+ out.append('"');
}
@Override
| null | test | val | 2020-02-24T23:06:32 | "2019-11-06T12:07:04Z" | ashi009 | test |
bazelbuild/bazel/10215_10337 | bazelbuild/bazel | bazelbuild/bazel/10215 | bazelbuild/bazel/10337 | [
"timestamp(timedelta=0.0, similarity=0.852479485346196)"
] | d3f8efca72a0e2013467c033df1bf58dd76e8a10 | bb795521426ea9315ff59cc93ad520e69e3ae541 | [
"The problem could well be alleviated by skipping lines that begin with a `#`. This is probably somewhere in the `read_netrc` function in `tools/build_defs/repo/utils.bzl` at around line 231, where `continue`ing after passing a check for `line.startswith(\"#\")` might suffice. ",
"@shs96c https://github.com/bazelbuild/bazel/pull/10337"
] | [] | "2019-11-29T05:44:16Z" | [
"team-ExternalDeps",
"untriaged"
] | .netrc files with comments break http_archive downloads | ### Description of the problem / feature request:
With the following `~/.netrc`, `bazel build ...` fails when the `WORKSPACE` has an un-downloaded repository:
```ini
# Production
machine build.company login foo password bar
machine build-prod.company login foo password bar
# Staging
machine build.stage.company login foo password bar
machine build-dev.company login foo password bar
```
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run `bazel build` with the above `.netrc` in the user's home directory.
### What operating system are you running Bazel on?
macOS 10.14.4
### What's the output of `bazel info release`?
`release 1.1.0`
### Have you found anything relevant by searching the web?
Looks like this was caused by https://github.com/bazelbuild/bazel/pull/9388, which does not handle `#` as a token
### Any other information, logs, or outputs that you want to share?
```
ERROR: An error occurred during the fetch of repository 'build_bazel_rules_apple':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/http.bzl", line 72
_get_auth(ctx, all_urls)
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/http.bzl", line 52, in _get_auth
read_netrc(ctx, netrcfile)
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 287, in read_netrc
fail(<1 more arguments>)
Unexpected token '#' while reading /Users/build/.netrc
ERROR: no such package '@build_bazel_rules_apple//apple': Traceback (most recent call last):
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/http.bzl", line 72
_get_auth(ctx, all_urls)
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/http.bzl", line 52, in _get_auth
read_netrc(ctx, netrcfile)
File "/private/var/tmp/_bazel_build/a0b0a7899b2e91189412dbb548223580/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 287, in read_netrc
fail(<1 more arguments>)
Unexpected token '#' while reading /Users/build/.netrc
```
| [
"tools/build_defs/repo/utils.bzl"
] | [
"tools/build_defs/repo/utils.bzl"
] | [
"src/test/shell/bazel/skylark_repository_test.sh"
] | diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl
index a369f61954155b..3866b0c23bad5a 100644
--- a/tools/build_defs/repo/utils.bzl
+++ b/tools/build_defs/repo/utils.bzl
@@ -228,7 +228,10 @@ def read_netrc(ctx, filename):
currentmacro = ""
cmd = None
for line in contents.splitlines():
- if macdef:
+ if line.startswith("#"):
+ # Comments start with #. Ignore these lines.
+ continue
+ elif macdef:
# as we're in a macro, just determine if we reached the end.
if line:
currentmacro += line + "\n"
| diff --git a/src/test/shell/bazel/skylark_repository_test.sh b/src/test/shell/bazel/skylark_repository_test.sh
index 3b753e42abbc78..3ed8f489d8c0bf 100755
--- a/src/test/shell/bazel/skylark_repository_test.sh
+++ b/src/test/shell/bazel/skylark_repository_test.sh
@@ -1604,6 +1604,7 @@ cd pub
mget *
quit
+# this is a comment
machine example.com login
myusername password mysecret default
login anonymous password [email protected]
| test | train | 2019-11-29T11:55:32 | "2019-11-11T22:09:33Z" | segiddins | test |
bazelbuild/bazel/10282_10301 | bazelbuild/bazel | bazelbuild/bazel/10282 | bazelbuild/bazel/10301 | [
"timestamp(timedelta=2126.0, similarity=0.8618771476892152)"
] | fc287a3fda683f267ff586fdf45ca7ec06ffe316 | ca93782b924a0e4f94443c33061d0518fea31dd4 | [] | [
"Is this commented out code intentional? If yes please include a TODO explaining its purpose.",
"I initially added it, then realized it changes semantics and broke tests, and forgot to completely remove. Now it's really gone."
] | "2019-11-25T15:53:59Z" | [
"type: bug",
"P1",
"team-Configurability"
] | Cycle error when --platforms is not a platform | ### Description of the problem / feature request:
If you try to use a number of things as a platform, you get a massive garbage error from the cycle detector.
Examples include:
* `sh_binary`
* `rust_binary`
* `config_setting`
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This can be reproduced in the repo at https://github.com/m3rcuriel/bazel/tree/cycle_repro by running `bazel build //... --platforms=//:garbage` or even `bazel build //... --platforms=//:test`.
### What operating system are you running Bazel on?
5.3.7.b-3-hardened #1 SMP PREEMPT @1572019254 x86_64 GNU/Linux
### What's the output of `bazel info release`?
`release 0.29.1- (@non-git)`
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
This version comes from the AUR. Also fails with bazel HEAD (11/20/19) built with the bazel from AUR.
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
```
[email protected]:bazelbuild/bazel
2b7e21db100bdc0bd319f37106ed3d9e7c8dbe74
2b7e21db100bdc0bd319f37106ed3d9e7c8dbe74
```
### Have you found anything relevant by searching the web?
Inspired by https://github.com/bazelbuild/rules_rust/issues/267.
| [
"src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java"
] | [
"src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java",
"src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
index 756fb44b1e1e1c..12344564ede28c 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java
@@ -16,8 +16,11 @@
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
+import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.ThreadSafety;
+import com.google.devtools.build.lib.events.Event;
+import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.skylarkbuildapi.platform.PlatformConfigurationApi;
import com.google.devtools.build.lib.util.RegexFilter;
import java.util.List;
@@ -49,6 +52,19 @@ public class PlatformConfiguration extends BuildConfiguration.Fragment
this.targetFilterToAdditionalExecConstraints = targetFilterToAdditionalExecConstraints;
}
+ @Override
+ public void reportInvalidOptions(EventHandler reporter, BuildOptions buildOptions) {
+ PlatformOptions platformOptions = buildOptions.get(PlatformOptions.class);
+ // TODO(https://github.com/bazelbuild/bazel/issues/6519): Implement true multiplatform builds.
+ if (platformOptions.platforms.size() > 1) {
+ reporter.handle(
+ Event.warn(
+ String.format(
+ "--platforms only supports a single target platform: using the first option %s",
+ this.targetPlatform)));
+ }
+ }
+
@Override
public Label getHostPlatform() {
return hostPlatform;
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
index 151068e997b4d7..d4d6de299c64e2 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PlatformMappingValue.java
@@ -210,12 +210,8 @@ private BuildConfigurationValue.Key computeMapping(
if (!originalOptions.get(PlatformOptions.class).platforms.isEmpty()) {
List<Label> platforms = originalOptions.get(PlatformOptions.class).platforms;
- Preconditions.checkArgument(
- platforms.size() == 1,
- "Platform mapping only supports a single target platform but found %s",
- platforms);
-
- Label targetPlatform = Iterables.getOnlyElement(platforms);
+ // Platform mapping only supports a single target platform, others are ignored.
+ Label targetPlatform = Iterables.getFirst(platforms, null);
if (!platformsToFlags.containsKey(targetPlatform)) {
// This can happen if the user has set the platform and any other flags that would normally
// be mapped from it on the command line instead of relying on the mapping.
| null | test | train | 2019-11-25T11:51:57 | "2019-11-20T20:19:18Z" | m3rcuriel | test |
bazelbuild/bazel/10335_10745 | bazelbuild/bazel | bazelbuild/bazel/10335 | bazelbuild/bazel/10745 | [
"timestamp(timedelta=0.0, similarity=0.9347991512158604)"
] | fa5280b15e63c9e93f6aef45bf71eb43b9330d3b | 0d58ce0e91946ccc4ac28c01c25a5c1ec1d91d94 | [
"@irengrig This flag was added in https://github.com/bazelbuild/bazel/commit/613de1fbbff10de5d6f99f15882fb145a5007f7e. Can you add the labels to get this tested on the incompatible pipeline?",
"If this flag is not available in 2.0 and 2.1, can we remove the labels so bazelisk works well?",
"We're supposed to cut Bazel 3.0 now. Was this flag flipped?",
"Argh, no. Let me send a change.",
"I prepared a PR for flipping this some time ago, but it was blocked on the release of Bazel 2.2.\r\nFeel free to use https://github.com/bazelbuild/bazel/pull/10745 as inspiration :).",
"Indeed! Let me just import it then."
] | [] | "2020-02-10T18:55:57Z" | [
"P2",
"team-Rules-Server",
"incompatible-change"
] | incompatible_load_proto_toolchain_for_javalite_from_com_google_protobuf: Use javalite toolchain from Protobuf master | Flag: `--incompatible_load_proto_toolchain_for_javalite_from_com_google_protobuf`
Available since: 2.2
Will be flipped in: 3.0
Tracking issue: #9992
Historically, the runtime for `java_lite_proto_library` was developed in a dedicated branch of the [Protobuf repository](https://github.com/protocolbuffers/protobuf/tree/javalite). Recently, this was changed, and the latest javalite runtime/toolchain is now available on master (and will be in future releases). This incompatible flag changes the default value of `--proto_toolchain_for_javalite` to point to the new toolchain on master.
To become compatible with this incompatible change, users will have to update their version of Protobuf. We will not flip this flag before a compatible Protobuf release has been available for at least 6 weeks.
Note for triage: This is probably `P2` and `team-Rules-Server`. Please also add `incompatible-change` and `breaking-change-3.0` (and maybe assign it to me).
# Migration
If you are using `java_proto_library`, you need to update your `WORKSPACE` to load Protobuf (`@com_google_protobuf`) to version 3.11.3 or later. Starting with Bazel 3.0, you can start removing uses of `@com_google_protobuf_javalite` from your `BUILD`-files and delete it from `WORKSPACE`.
//cc @steeve @lberki @hlopko | [
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java",
"src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java
index 636aab18349995..1e9e4f79409828 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoAspect.java
@@ -22,7 +22,7 @@
public class BazelJavaLiteProtoAspect extends JavaLiteProtoAspect {
public static final String DEFAULT_PROTO_TOOLCHAIN_LABEL =
- "@com_google_protobuf_javalite//:javalite_toolchain";
+ "@com_google_protobuf//:javalite_toolchain";
public BazelJavaLiteProtoAspect(RuleDefinitionEnvironment env) {
super(BazelJavaSemantics.INSTANCE, DEFAULT_PROTO_TOOLCHAIN_LABEL, env);
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
index 941638dba6dd00..ba8725eb45bf87 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
@@ -187,7 +187,7 @@ public static class Options extends FragmentOptions {
@Option(
name = "incompatible_load_proto_toolchain_for_javalite_from_com_google_protobuf",
- defaultValue = "false",
+ defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
| null | val | val | 2020-02-10T19:21:51 | "2019-11-28T18:15:27Z" | Yannic | test |
bazelbuild/bazel/10350_10351 | bazelbuild/bazel | bazelbuild/bazel/10350 | bazelbuild/bazel/10351 | [
"timestamp(timedelta=0.0, similarity=0.8538744602440044)"
] | 18d01e7f6d8a3f5b4b4487e9d61a6d4d0f74f33a | 4d165601acdd106ec896c202ad4efd33412df490 | [
"Thank you for the fix!\r\n\r\nOn CentOS 7 this is what I get:\r\n\r\n```\r\n$ ~/bazel-master/bazel-bin/third_party/ijar/zipper Cc foo.zip @args.txt\r\nFile bart does not seem to exist.\r\n```\r\n\r\nEven though args.txt says `bar`, not `bart`. I guess that's the memory junk your PR fixes. Thanks!"
] | [] | "2019-12-02T17:55:58Z" | [] | zipper: File foo�ؖ� does not seem to exist. | ### Description of the problem / feature request:
When invoking zipper with an argument file (`@args.txt`), it occasionally fails with an error of `File <yourfilename> <junk> does not seem to exist`. It looks like a string termination bug.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```console
$ touch foo bar
# Insert a newline between lines, but don't include a terminating \n.
$ echo foo > args.txt; echo -n bar >> args.txt
$ zipper Cc foo.zip @args.txt
```
### What operating system are you running Bazel on?
CentOS 7.2 and macOS High Sierra
### What's the output of `bazel info release`?
1.1.0+vmware
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
na
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
na
### Have you found anything relevant by searching the web?
No hits.
### Any other information, logs, or outputs that you want to share?
Looks like a string termination bug in zip_main.cc:
https://github.com/bazelbuild/bazel/blob/8075057af6108ebc23c146f18eecec911d4b8c00/third_party/ijar/zip_main.cc#L253-L274
Each '\n' is replaced by '\0', but if a file doesn't end with '\n', the final file entry isn't terminated. Behavior is then undefined.
Valgrind also shows that something is awry:
```console
beasleyr@sc-dbc1213 tmp.qmQJvjLcyS$ valgrind .../zipper c foo.zip @args.txt
==1872== Memcheck, a memory error detector
==1872== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==1872== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==1872== Command: .../zipper c foo.zip @args.txt
==1872==
==1872== Conditional jump or move depends on uninitialised value(s)
==1872== at 0x4A07B5A: index (mc_replace_strmem.c:222)
==1872== by 0x403839: devtools_ijar::parse_filelist(char*, char**, int, bool) (in .../zipper)
==1872== by 0x403907: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872==
==1872== Conditional jump or move depends on uninitialised value(s)
==1872== at 0x4A07B5E: index (mc_replace_strmem.c:222)
==1872== by 0x403839: devtools_ijar::parse_filelist(char*, char**, int, bool) (in .../zipper)
==1872== by 0x403907: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872==
==1872== Syscall param stat(file_name) points to uninitialised byte(s)
==1872== at 0x3B13ADADF5: _xstat (xstat.c:38)
==1872== by 0x406F82: devtools_ijar::stat_file(char const*, devtools_ijar::Stat*) (in .../zipper)
==1872== by 0x4063C8: devtools_ijar::ZipBuilder::EstimateSize(char const* const*, char const* const*, int) (in .../zipper)
==1872== by 0x403929: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872== Address 0x4c33cef is 31 bytes inside a block of size 32 alloc'd
==1872== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==1872== by 0x4036A9: devtools_ijar::read_filelist(char*) (in .../zipper)
==1872== by 0x402803: main (in .../zipper)
==1872==
==1872== Conditional jump or move depends on uninitialised value(s)
==1872== at 0x4A07FA8: strlen (mc_replace_strmem.c:403)
==1872== by 0x4063E2: devtools_ijar::ZipBuilder::EstimateSize(char const* const*, char const* const*, int) (in .../zipper)
==1872== by 0x403929: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872==
==1872== Syscall param stat(file_name) points to uninitialised byte(s)
==1872== at 0x3B13ADADF5: _xstat (xstat.c:38)
==1872== by 0x406F82: devtools_ijar::stat_file(char const*, devtools_ijar::Stat*) (in .../zipper)
==1872== by 0x4033CB: devtools_ijar::add_file(std::unique_ptr<devtools_ijar::ZipBuilder, std::default_delete<devtools_ijar::ZipBuilder> > const&, char*, char*, bool, bool, bool) (in .../zipper)
==1872== by 0x403996: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872== Address 0x4c33cef is 31 bytes inside a block of size 32 alloc'd
==1872== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==1872== by 0x4036A9: devtools_ijar::read_filelist(char*) (in .../zipper)
==1872== by 0x402803: main (in .../zipper)
==1872==
==1872== Conditional jump or move depends on uninitialised value(s)
==1872== at 0x4A07FA8: strlen (mc_replace_strmem.c:403)
==1872== by 0x40342A: devtools_ijar::add_file(std::unique_ptr<devtools_ijar::ZipBuilder, std::default_delete<devtools_ijar::ZipBuilder> > const&, char*, char*, bool, bool, bool) (in .../zipper)
==1872== by 0x403996: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872==
==1872== Conditional jump or move depends on uninitialised value(s)
==1872== at 0x4A081A5: strncpy (mc_replace_strmem.c:476)
==1872== by 0x40345D: devtools_ijar::add_file(std::unique_ptr<devtools_ijar::ZipBuilder, std::default_delete<devtools_ijar::ZipBuilder> > const&, char*, char*, bool, bool, bool) (in .../zipper)
==1872== by 0x403996: devtools_ijar::create(char*, char**, bool, bool, bool) (in .../zipper)
==1872== by 0x3B13A1ED5C: (below main) (libc-start.c:226)
==1872==
==1872==
==1872== HEAP SUMMARY:
==1872== in use at exit: 72,902 bytes in 7 blocks
==1872== total heap usage: 13 allocs, 6 frees, 89,461 bytes allocated
==1872==
==1872== LEAK SUMMARY:
==1872== definitely lost: 160 bytes in 3 blocks
==1872== indirectly lost: 38 bytes in 3 blocks
==1872== possibly lost: 0 bytes in 0 blocks
==1872== still reachable: 72,704 bytes in 1 blocks
==1872== suppressed: 0 bytes in 0 blocks
==1872== Rerun with --leak-check=full to see details of leaked memory
==1872==
==1872== For counts of detected and suppressed errors, rerun with: -v
==1872== Use --track-origins=yes to see where uninitialised values come from
==1872== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 8 from 6)
``` | [
"third_party/ijar/zip_main.cc"
] | [
"third_party/ijar/zip_main.cc"
] | [] | diff --git a/third_party/ijar/zip_main.cc b/third_party/ijar/zip_main.cc
index eac095e136c042..b375da39ecc236 100644
--- a/third_party/ijar/zip_main.cc
+++ b/third_party/ijar/zip_main.cc
@@ -251,11 +251,12 @@ char **read_filelist(char *filename) {
}
size_t sizeof_array = sizeof(char *) * (nb_entries + 1);
- void *result = malloc(sizeof_array + file_stat.total_size);
+ void *result = malloc(sizeof_array + file_stat.total_size + 1);
// copy the content
char **filelist = static_cast<char **>(result);
char *content = static_cast<char *>(result) + sizeof_array;
memcpy(content, data, file_stat.total_size);
+ content[file_stat.total_size] = '\0';
free(data);
// Create the corresponding array
int j = 1;
| null | train | train | 2019-12-02T18:25:07 | "2019-12-02T17:48:17Z" | ghost | test |
bazelbuild/bazel/10421_10426 | bazelbuild/bazel | bazelbuild/bazel/10421 | bazelbuild/bazel/10426 | [
"timestamp(timedelta=1.0, similarity=0.8747858287546479)"
] | 8a8a4345da87967f4c7229fb527442bf839f4a87 | a151626df7d33b11a44bff722aca089cac60d845 | [
"Why aren't you parsing the proto message (instead of using grep/sed)?\r\n\r\nIf that isn't an option for you, perhaps you can just use proto2json step in between, e.g. using https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/JsonFormat.html?",
"@meisterT \r\n\r\n> Why aren't you parsing the proto message (instead of using grep/sed)?\r\n\r\nAvoiding grep/sed is exactly what I'd like to do, hence why I'm asking for JSON output. `jq` or similar would support doing what I want in a much cleaner fashion if I had JSON.\r\n\r\n> If that isn't an option for you, perhaps you can just use proto2json step in between, e.g. using https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/JsonFormat.html?\r\n\r\nAs JSON is a first-class format for proto3, I was hoping that the format could also become a first-class format for aquery instead of needing an extra step to be supported. This would also make it easy to integrate aquery with the large ecosystem of JSON-based tooling that already exists without having to add extra proto-to-json conversion steps into existing tools.",
"Do you perhaps want to send us a PR?\r\n\r\nalso cc @joeleba ",
"If the FR sounds reasonable, I can give it a try. Do you have any pointers on where to start? I'm not familiar with the codebase.",
"Check how we do text proto format in https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java",
"@meisterT PTAL @ #10426 "
] | [
"nit: Indentation.",
"We can probably pass this in as an argument in the constructor? Makes it easier to test.",
"nit: Indentation.",
"Same for the rest of the instances of `jsonPrinter`.",
"Makes what easier to test?",
"For the textproto case we call `TextFormat.print()`, a static method that does not permit any injection. Why do we need something else in jsonproto case?",
"Fair enough."
] | "2019-12-16T20:47:28Z" | [
"P3",
"team-Performance"
] | Add JSON output format to aquery |
### Description of the problem / feature request:
Add --output=json to `bazel aquery`
### Feature requests: what underlying problem are you trying to solve with this feature?
I recently encountered the need to use aquery to find all the outputs being generated by a particular set of rules. The results needed post-processing to extract the exec_path. We ended up using a bunch of grep/sed. Having a more common text format like JSON would have allowed us to avoid regex-based processing of structured data.
### What operating system are you running Bazel on?
MacOS Mojave 10.14
### What's the output of `bazel info release`?
release 0.26.1
### Have you found anything relevant by searching the web?
No
### Any other information, logs, or outputs that you want to share?
No
| [
"src/main/java/com/google/devtools/build/lib/BUILD",
"src/main/java/com/google/devtools/build/lib/query2/BUILD",
"src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java",
"src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java",
"src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java"
] | [
"src/main/java/com/google/devtools/build/lib/BUILD",
"src/main/java/com/google/devtools/build/lib/query2/BUILD",
"src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java",
"src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java",
"src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java"
] | [
"src/test/shell/integration/aquery_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/BUILD b/src/main/java/com/google/devtools/build/lib/BUILD
index 875cf2473a2ba9..08cff8593d537c 100644
--- a/src/main/java/com/google/devtools/build/lib/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/BUILD
@@ -685,6 +685,7 @@ java_library(
"//third_party:guava",
"//third_party:jsr305",
"//third_party/protobuf:protobuf_java",
+ "//third_party/protobuf:protobuf_java_util",
"@remoteapis//:build_bazel_remote_execution_v2_remote_execution_java_proto",
],
)
diff --git a/src/main/java/com/google/devtools/build/lib/query2/BUILD b/src/main/java/com/google/devtools/build/lib/query2/BUILD
index 63d5a913431ec0..3a43ae314f3119 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/query2/BUILD
@@ -53,6 +53,7 @@ java_library(
"//third_party:guava",
"//third_party:jsr305",
"//third_party/protobuf:protobuf_java",
+ "//third_party/protobuf:protobuf_java_util",
],
)
diff --git a/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java b/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java
index ee4158bbbb66cf..9283a24a07eb76 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphProtoOutputFormatterCallback.java
@@ -25,6 +25,7 @@
import com.google.devtools.build.lib.skyframe.SkyframeExecutor;
import com.google.devtools.build.lib.skyframe.actiongraph.ActionGraphDump;
import com.google.protobuf.TextFormat;
+import com.google.protobuf.util.JsonFormat;
import java.io.IOException;
import java.io.OutputStream;
@@ -34,7 +35,8 @@ public class ActionGraphProtoOutputFormatterCallback extends AqueryThreadsafeCal
/** Defines the types of proto output this class can handle. */
public enum OutputType {
BINARY("proto"),
- TEXT("textproto");
+ TEXT("textproto"),
+ JSON("jsonproto");
private final String formatName;
@@ -50,6 +52,7 @@ public String formatName() {
private final OutputType outputType;
private final ActionGraphDump actionGraphDump;
private final AqueryActionFilter actionFilters;
+ private final JsonFormat.Printer jsonPrinter = JsonFormat.printer();
ActionGraphProtoOutputFormatterCallback(
ExtendedEventHandler eventHandler,
@@ -110,6 +113,10 @@ public void close(boolean failFast) throws IOException {
case TEXT:
TextFormat.print(actionGraphContainer, printStream);
break;
+ case JSON:
+ jsonPrinter.appendTo(actionGraphContainer, printStream);
+ printStream.println();
+ break;
default:
throw new IllegalStateException("Unknown outputType " + outputType.formatName());
}
diff --git a/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java
index 5e0e91ed8cb207..00d777241b0e0e 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/aquery/ActionGraphQueryEnvironment.java
@@ -178,6 +178,14 @@ public ConfiguredTargetValueAccessor getAccessor() {
accessor,
StreamedOutputHandler.OutputType.TEXT,
actionFilters),
+ new ActionGraphProtoV2OutputFormatterCallback(
+ eventHandler,
+ aqueryOptions,
+ out,
+ skyframeExecutor,
+ accessor,
+ StreamedOutputHandler.OutputType.JSON,
+ actionFilters),
new ActionGraphTextOutputFormatterCallback(
eventHandler, aqueryOptions, out, skyframeExecutor, accessor, actionFilters))
: ImmutableList.of(
@@ -197,6 +205,14 @@ public ConfiguredTargetValueAccessor getAccessor() {
accessor,
OutputType.TEXT,
actionFilters),
+ new ActionGraphProtoOutputFormatterCallback(
+ eventHandler,
+ aqueryOptions,
+ out,
+ skyframeExecutor,
+ accessor,
+ OutputType.JSON,
+ actionFilters),
new ActionGraphTextOutputFormatterCallback(
eventHandler, aqueryOptions, out, skyframeExecutor, accessor, actionFilters));
}
diff --git a/src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java
index da45a892b91bd7..d0ed6178db18d6 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/aquery/AqueryOptions.java
@@ -28,7 +28,7 @@ public class AqueryOptions extends CommonQueryOptions {
effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
help =
"The format in which the aquery results should be printed. Allowed values for aquery "
- + "are: text, textproto, proto.")
+ + "are: text, textproto, proto, jsonproto.")
public String outputFormat;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
index e6d82f7bde0422..5b05015b50b510 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
@@ -193,6 +193,14 @@ private static ImmutableList<QueryFunction> getCqueryFunctions() {
accessor,
aspectResolver,
OutputType.TEXT),
+ new ProtoOutputFormatterCallback(
+ eventHandler,
+ cqueryOptions,
+ out,
+ skyframeExecutor,
+ accessor,
+ aspectResolver,
+ OutputType.JSON),
new BuildOutputFormatterCallback(
eventHandler, cqueryOptions, out, skyframeExecutor, accessor));
}
diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
index 11884c29c245fb..2de9e3ab8ab48e 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
@@ -45,8 +45,8 @@ public enum Transitions {
effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
help =
"The format in which the cquery results should be printed. Allowed values for cquery "
- + "are: label, textproto, transitions, proto. If you select 'transitions', you also "
- + "have to specify the --transitions=(lite|full) option.")
+ + "are: label, textproto, transitions, proto, jsonproto. If you select "
+ + "'transitions', you also have to specify the --transitions=(lite|full) option.")
public String outputFormat;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java
index 10eaf03b92e842..cc79c8b1b3e25f 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java
@@ -35,6 +35,7 @@
import com.google.devtools.build.lib.skyframe.SkyframeExecutor;
import com.google.protobuf.Message;
import com.google.protobuf.TextFormat;
+import com.google.protobuf.util.JsonFormat;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
@@ -45,7 +46,8 @@ class ProtoOutputFormatterCallback extends CqueryThreadsafeCallback {
/** Defines the types of proto output this class can handle. */
public enum OutputType {
BINARY("proto"),
- TEXT("textproto");
+ TEXT("textproto"),
+ JSON("jsonproto");
private final String formatName;
@@ -60,6 +62,7 @@ public String formatName() {
private final OutputType outputType;
private final AspectResolver resolver;
+ private final JsonFormat.Printer jsonPrinter = JsonFormat.printer();
private AnalysisProtos.CqueryResult.Builder protoResult;
@@ -108,6 +111,10 @@ private void writeData(Message message) throws IOException {
case TEXT:
TextFormat.print(message, printStream);
break;
+ case JSON:
+ jsonPrinter.appendTo(message, printStream);
+ printStream.append('\n');
+ break;
default:
throw new IllegalStateException("Unknown outputType " + outputType.formatName());
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java b/src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java
index b857b6eed6e60b..6412f0394be549 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/actiongraph/v2/StreamedOutputHandler.java
@@ -16,6 +16,7 @@
import com.google.devtools.build.lib.analysis.AnalysisProtosV2.ActionGraphComponent;
import com.google.devtools.build.lib.analysis.AnalysisProtosV2.ActionGraphContainer;
import com.google.protobuf.CodedOutputStream;
+import com.google.protobuf.util.JsonFormat;
import java.io.IOException;
import java.io.PrintStream;
@@ -24,7 +25,8 @@ public class StreamedOutputHandler {
/** Defines the types of proto output this class can handle. */
public enum OutputType {
BINARY("proto"),
- TEXT("textproto");
+ TEXT("textproto"),
+ JSON("jsonproto");
private final String formatName;
@@ -40,6 +42,7 @@ public String formatName() {
private final OutputType outputType;
private final CodedOutputStream outputStream;
private final PrintStream printStream;
+ private final JsonFormat.Printer jsonPrinter = JsonFormat.printer();
public StreamedOutputHandler(
OutputType outputType, CodedOutputStream outputStream, PrintStream printStream) {
@@ -62,6 +65,10 @@ public void printActionGraphComponent(ActionGraphComponent message) throws IOExc
case TEXT:
printStream.print(wrapperActionGraphComponent(message));
break;
+ case JSON:
+ jsonPrinter.appendTo(message, printStream);
+ printStream.println();
+ break;
}
}
@@ -76,6 +83,7 @@ public void close() throws IOException {
outputStream.flush();
break;
case TEXT:
+ case JSON:
printStream.flush();
printStream.close();
break;
| diff --git a/src/test/shell/integration/aquery_test.sh b/src/test/shell/integration/aquery_test.sh
index 30425c154a8b8e..e57d63e6f79288 100755
--- a/src/test/shell/integration/aquery_test.sh
+++ b/src/test/shell/integration/aquery_test.sh
@@ -132,7 +132,6 @@ EOF
assert_not_contains "echo unused" output
}
-
function test_aquery_include_artifacts() {
local pkg="${FUNCNAME[0]}"
mkdir -p "$pkg" || fail "mkdir -p $pkg"
@@ -187,6 +186,32 @@ EOF
assert_not_contains "echo unused" output
}
+function test_aquery_jsonproto() {
+ local pkg="${FUNCNAME[0]}"
+ mkdir -p "$pkg" || fail "mkdir -p $pkg"
+ cat > "$pkg/BUILD" <<'EOF'
+genrule(
+ name = "bar",
+ srcs = ["dummy.txt"],
+ outs = ["bar_out.txt"],
+ cmd = "echo unused > $(OUTS)",
+)
+EOF
+ echo "hello aquery" > "$pkg/in.txt"
+
+ bazel aquery --output=jsonproto "//$pkg:bar" > output 2> "$TEST_log" \
+ || fail "Expected success"
+ cat output >> "$TEST_log"
+ assert_contains "\"execPath\": \"$pkg/dummy.txt\"" output
+ assert_contains "\"mnemonic\": \"Genrule\"" output
+ assert_contains "\"mnemonic\": \".*-fastbuild\"" output
+ assert_contains "echo unused" output
+
+ bazel aquery --output=jsonproto --noinclude_commandline "//$pkg:bar" > output \
+ 2> "$TEST_log" || fail "Expected success"
+ assert_not_contains "echo unused" output
+}
+
function test_aquery_skylark_env() {
local pkg="${FUNCNAME[0]}"
mkdir -p "$pkg" || fail "mkdir -p $pkg"
@@ -1113,4 +1138,33 @@ EOF
assert_contains "mnemonic: \".*-fastbuild\"" output
assert_contains "echo unused" output
}
+
+function test_basic_aquery_jsonproto_v2() {
+ local pkg="${FUNCNAME[0]}"
+ mkdir -p "$pkg" || fail "mkdir -p $pkg"
+ cat > "$pkg/BUILD" <<'EOF'
+genrule(
+ name = "bar",
+ srcs = ["dummy.txt"],
+ outs = ["bar_out.txt"],
+ cmd = "echo unused > $(OUTS)",
+)
+EOF
+ bazel aquery --incompatible_proto_output_v2 --output=jsonproto "//$pkg:bar" > output 2> "$TEST_log" \
+ || fail "Expected success"
+ cat output >> "$TEST_log"
+
+ # Verify than ids come in integers instead of strings.
+ assert_contains "\"id\": 1," output
+ assert_not_contains "\"id\": \"1\"" output
+
+ # Verify that paths are broken down to path fragments.
+ assert_contains "\"pathFragment\": {" output
+
+ # Verify that the appropriate action was included.
+ assert_contains "\"label\": \"dummy.txt\"" output
+ assert_contains "\"mnemonic\": \"Genrule\"" output
+ assert_contains "\"mnemonic\": \".*-fastbuild\"" output
+ assert_contains "echo unused" output
+}
run_suite "${PRODUCT_NAME} action graph query tests"
| train | train | 2019-12-18T09:15:00 | "2019-12-16T10:20:14Z" | devnev | test |
bazelbuild/bazel/10476_10477 | bazelbuild/bazel | bazelbuild/bazel/10476 | bazelbuild/bazel/10477 | [
"timestamp(timedelta=1.0, similarity=0.8933290516067647)"
] | 223ef9d28bc8ec03ead471c74c32cd86f0baf835 | c1362f559d4eb34acf8db2d20afdbaa82e15dbb9 | [
"Sorry for the unintended breakage and thank you for catching and fixing it!"
] | [
"Code review brought up the question of why not just use `-f` here instead of `! -d`:\r\n\r\n```\r\nif [[ -x \"$wrapper\" && -f \"$wrapper\" ]]; then\r\n```\r\n\r\nIt looks fine to me, because symlinks are handled correctly that way, too (\"If file is a symbolic link, test will fully dereference it and then evaluate the expression against the file referenced\"), but wanted to check with you.",
"Honestly I just went with what it was before, so I didn’t really think about alternatives. If there’s a preferred change, I’m fine with that 👍",
"I’m also not able to make the changes to the pr currently, so feel free to edit it yourself if you want"
] | "2019-12-22T16:13:48Z" | [
"type: bug",
"P1",
"team-OSS"
] | bazel.sh attempts to exec directory {WORKSPACE_DIR}/tools/bazel | ### Description of the problem / feature request:
Using Bazel installed via apt, since 2.0.0 it attempts to exec `{WORKSPACE}/tools/bazel` if it exists, even as directory. This path is commonly used as a directory for storing Bazel related tools and the path is not obviously documented as being special.
The error seen is:
```
/usr/bin/bazel: line 196: <path to workspace snipped>/tools/bazel: Is a directory
/usr/bin/bazel: line 196: exec: <path to workspace snipped>/tools/bazel: cannot execute: Is a directory
```
The commit that introduced this was https://github.com/bazelbuild/bazel/commit/d3f8efca72a0e2013467c033df1bf58dd76e8a10 by @philwo
In particular, these lines in bazel.sh:
https://github.com/bazelbuild/bazel/blob/d5ae460f1581ddf27514b4be18255481b47b4075/scripts/packages/bazel.sh#L193-L197
Prior to this commit, the wrapper was also checked if it was not a directory:
https://github.com/bazelbuild/bazel/blob/40f464c32f4b14d92689dfc1db4c00ecd5d58645/scripts/packages/bazel.sh#L79-L81
Proposed solution is to re-add the directory exclusion check, which I will do shortly in a PR.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create an standard workspace with a folder at `tools/bazel`. Using Bazel intalled via apt, run any bazel command (just `bazel` will do)
### What operating system are you running Bazel on?
Ubuntu 18.04
### What's the output of `bazel info release`?
release 2.0.0
### Have you found anything relevant by searching the web?
Previous similar issue: https://github.com/bazelbuild/bazel/issues/3422
| [
"scripts/packages/bazel.sh"
] | [
"scripts/packages/bazel.sh"
] | [] | diff --git a/scripts/packages/bazel.sh b/scripts/packages/bazel.sh
index 7ffb79b7aac8b6..055641dd1cbf96 100755
--- a/scripts/packages/bazel.sh
+++ b/scripts/packages/bazel.sh
@@ -191,7 +191,7 @@ if [[ ! -x $BAZEL_REAL ]]; then
fi
readonly wrapper="${workspace_dir}/tools/bazel"
-if [[ -x "$wrapper" ]]; then
+if [[ -x "$wrapper" && ! -d "$wrapper" ]]; then
export BAZEL_REAL
exec -a "$0" "${wrapper}" "$@"
fi
| null | test | train | 2019-12-22T02:16:53 | "2019-12-22T16:06:55Z" | aaliddell | test |
bazelbuild/bazel/10484_10493 | bazelbuild/bazel | bazelbuild/bazel/10484 | bazelbuild/bazel/10493 | [
"timestamp(timedelta=0.0, similarity=0.9135102898837365)"
] | e06c2e8365fecbc6a7f8b42f627637fba94ffb91 | 9056773c28979edc23782d8c0484c1ac0f011a76 | [
"cc @cushon ",
"Suspecting a combination of https://github.com/bazelbuild/bazel/commit/a5ee2c4d979441e663cf53b2ace4daa05e5033d8 and https://github.com/bazelbuild/bazel/commit/46c95dcbe2889e515a2b44b9dec00d6c13f7e9fa (/cc @lberki).\r\n\r\nSubmitted #10493 to fix this for now.\r\nLonger-term, we should make `ProtoInfo` mandatory for `blacklisted_protos`."
] | [
"Using direct instead of transitive sources un-does a change made in 01df1e5c3aaf709e9388293514ae978e59ae2cbb that I think is going to break some uses of `proto_lang_toolchain.blacklisted_protos`.",
"Yep, this is exactly what I found out after debugging the aforementioned test failures. Adding _both_ here isn't very nice so I'll try adding the set of transitive original sources (I'd totally ask Yannic to do so, but since the tests that break are internal, he'd be flying blind...)",
"...and it blends! I'm sending this out (+my changes) for internal review."
] | "2019-12-27T15:10:50Z" | [
"team-Rules-Server",
"untriaged"
] | proto_lang_toolchain and blacklisted_protos with ProtoInfo not propagated correctly | ### Description of the problem / feature request:
With protobuf's `proto_lang_toolchain`, after this change https://github.com/protocolbuffers/protobuf/commit/7b28278c7d4f4175e70aef2f89d304696eb85ae3 it seems the `blacklisted_protos` are no longer working correctly and removing that field has no effect on the build.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See https://github.com/protocolbuffers/protobuf/issues/7046 for a repro case
### What operating system are you running Bazel on?
macOS
### What's the output of `bazel info release`?
release 1.2.0 (I also tried with 2.0.0 with no change)
### Have you found anything relevant by searching the web?
The protobuf commit linked above referenced this bazel change https://github.com/bazelbuild/bazel/commit/a5ee2c4d979441e663cf53b2ace4daa05e5033d8
I'm also wondering if the issue is with protobuf's use of `strip_import_prefix` on the `proto_library` targets they define: https://github.com/protocolbuffers/protobuf/commit/a03d332aca5d33c5d4b2cd25037c9e37d57eff02 | [
"src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java"
] | [
"src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java
index ea124b56ee52cb..5f011d81bb5d24 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchain.java
@@ -44,8 +44,12 @@ public ConfiguredTarget create(RuleContext ruleContext)
ProtoInfo protoInfo = protos.get(ProtoInfo.PROVIDER);
// TODO(cushon): it would be nice to make this mandatory and stop adding files to build too
if (protoInfo != null) {
- blacklistedProtos.addTransitive(protoInfo.getTransitiveProtoSources());
+ // TODO(yannic): Switch to getTransitiveProtoSources() and remove references to
+ // original proto sources when ProtoInfo is mandatory.
+ blacklistedProtos.addAll(protoInfo.getOriginalDirectProtoSources());
} else {
+ // Only add files from FileProvider if |protos| is not a proto_library to avoid adding
+ // the descriptor_set of proto_library to the list of blacklisted files.
blacklistedProtos.addTransitive(protos.getProvider(FileProvider.class).getFilesToBuild());
}
}
| diff --git a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
index dd09ca1189405c..ad2ab914537e03 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
@@ -39,6 +39,19 @@ public void setUp() throws Exception {
invalidatePackages();
}
+ private void validateProtoLangToolchain(ProtoLangToolchainProvider toolchain) throws Exception {
+ assertThat(toolchain.commandLine()).isEqualTo("cmd-line");
+ assertThat(toolchain.pluginExecutable().getExecutable().getRootRelativePathString())
+ .isEqualTo("x/plugin");
+
+ TransitiveInfoCollection runtimes = toolchain.runtime();
+ assertThat(runtimes.getLabel())
+ .isEqualTo(Label.parseAbsolute("//x:runtime", ImmutableMap.of()));
+
+ assertThat(prettyArtifactNames(toolchain.blacklistedProtos()))
+ .containsExactly("x/metadata.proto", "x/descriptor.proto", "x/any.proto");
+ }
+
@Test
public void protoToolchain() throws Exception {
scratch.file(
@@ -62,19 +75,63 @@ public void protoToolchain() throws Exception {
update(ImmutableList.of("//foo:toolchain"), false, 1, true, new EventBus());
- ProtoLangToolchainProvider toolchain =
- getConfiguredTarget("//foo:toolchain").getProvider(ProtoLangToolchainProvider.class);
+ validateProtoLangToolchain(
+ getConfiguredTarget("//foo:toolchain").getProvider(ProtoLangToolchainProvider.class));
+ }
- assertThat(toolchain.commandLine()).isEqualTo("cmd-line");
- assertThat(toolchain.pluginExecutable().getExecutable().getRootRelativePathString())
- .isEqualTo("x/plugin");
+ @Test
+ public void protoToolchainBlacklistProtoLibraries() throws Exception {
+ scratch.file(
+ "x/BUILD",
+ TestConstants.LOAD_PROTO_LIBRARY,
+ "cc_binary(name = 'plugin', srcs = ['plugin.cc'])",
+ "cc_library(name = 'runtime', srcs = ['runtime.cc'])",
+ "proto_library(name = 'descriptors', srcs = ['metadata.proto', 'descriptor.proto'])",
+ "proto_library(name = 'any', srcs = ['any.proto'], import_prefix = 'bar')");
- TransitiveInfoCollection runtimes = toolchain.runtime();
- assertThat(runtimes.getLabel())
- .isEqualTo(Label.parseAbsolute("//x:runtime", ImmutableMap.of()));
+ scratch.file(
+ "foo/BUILD",
+ TestConstants.LOAD_PROTO_LANG_TOOLCHAIN,
+ "proto_lang_toolchain(",
+ " name = 'toolchain',",
+ " command_line = 'cmd-line',",
+ " plugin = '//x:plugin',",
+ " runtime = '//x:runtime',",
+ " blacklisted_protos = ['//x:descriptors', '//x:any']",
+ ")");
- assertThat(prettyArtifactNames(toolchain.blacklistedProtos()))
- .containsExactly("x/metadata.proto", "x/descriptor.proto", "x/any.proto");
+ update(ImmutableList.of("//foo:toolchain"), false, 1, true, new EventBus());
+
+ validateProtoLangToolchain(
+ getConfiguredTarget("//foo:toolchain").getProvider(ProtoLangToolchainProvider.class));
+ }
+
+ @Test
+ public void protoToolchainMixedBlacklist() throws Exception {
+ scratch.file(
+ "x/BUILD",
+ TestConstants.LOAD_PROTO_LIBRARY,
+ "cc_binary(name = 'plugin', srcs = ['plugin.cc'])",
+ "cc_library(name = 'runtime', srcs = ['runtime.cc'])",
+ "proto_library(name = 'metadata', srcs = ['metadata.proto'])",
+ "proto_library(name = 'descriptor', srcs = ['descriptor.proto'], import_prefix = 'bar')",
+ "filegroup(name = 'any', srcs = ['any.proto'])");
+
+ scratch.file(
+ "foo/BUILD",
+ TestConstants.LOAD_PROTO_LANG_TOOLCHAIN,
+ "proto_lang_toolchain(",
+ " name = 'toolchain',",
+ " command_line = 'cmd-line',",
+ " plugin = '//x:plugin',",
+ " runtime = '//x:runtime',",
+ " blacklisted_protos = ['//x:metadata', '//x:descriptor', '//x:any']",
+ ")");
+
+ update(ImmutableList.of("//foo:toolchain"), false, 1, true, new EventBus());
+
+ validateProtoLangToolchain(
+ getConfiguredTarget("//foo:toolchain").getProvider(ProtoLangToolchainProvider.class));
}
@Test
| train | train | 2020-01-08T20:43:38 | "2019-12-23T23:08:03Z" | keith | test |
bazelbuild/bazel/10535_10732 | bazelbuild/bazel | bazelbuild/bazel/10535 | bazelbuild/bazel/10732 | [
"timestamp(timedelta=0.0, similarity=0.8829708662674945)"
] | 8ce7fd1222cf3f9f5fc487d774b96cbaf89b999a | 5d87b3170461ae23b76fba851da55f9ca0502e60 | [
"@borkaehw @SrodriguezO ",
"Sounds like a good suggestion. I will check if I have bandwidth in the following few weeks. Anyone is welcome to implement this as well. Thanks."
] | [
"It looks like a bad idea. Can someone help?",
"Yes, I don't think this will work (reliably), because the WorkerSpawnRunner instance is shared for all worker strategy executions (multiplex and non-multiplex). I think this might cause the name of all running worker actions to change to \"multiplex-worker\" or \"worker\", depending on whether the most recently executed action was a multiplexed one or not.\r\n\r\nI can't immediately think of a good solution for this, except maybe instantiating two WorkerSpawnRunners (one for multiplexed workers, one for non-multiplexed workers). But it might make the code much more complex.\r\n\r\nMaybe @susinmotion or @jmmv have a good idea.",
"What about appending 'multiplex' to the existing name of the worker if it's multiplex?\r\nI'm also pretty happy with the logging only solution... what do you think?",
"I think the challenge is that when `WorkerSpawnRunner` is constructed, we don't have `Spawn` object to know if it's multiplex or not. I don't think we should set it in `exec()` since `this.supportsMultiplexWorkers` could be undefined in a certain period of time.\r\n\r\n@susinmotion do you mean we could undo the change in `getName()`? It's nice to see information when build is in progress though, like\r\n```\r\n<Mnemonic> <Target> 10s multiplex-worker\r\n```\r\n\r\nI also notice the message is generated in `UiStateTracker.java`. Is there anything we could do there?",
"Yes, I did mean undoing the change in getName(), but I also see why that'd be nice info to have.\r\nLet me take a closer look!",
"What we care about is the name that is used for logging, right?\r\n\r\nIf so, why not just change the `context.report()` calls in this file to specify the exec-specific name instead of calling `getName()`? They all happen within `exec()`, so at that point we have the right context information.",
"Sounds like a great idea. Just force-pushed, please take another look.",
"nit: Should be something like `Returns a user-friendly name for this worker type.`\r\n\r\nhttps://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment",
"This logic is duplicated in `WorkerKey`. Maybe it can be reused?",
"nit: This name is a bit confusing given that the return value may not be related to multiplexing at all. Maybe `getNameForReporting` or something? And add a docstring to indicate what this does and why it's separate from `getName`.",
"Done.",
"Good idea, done.",
"Sounds reasonable. I think we have no choice but to keep the logic in `WorkerSpawnRunner` since there is no `WorkerKey` yet when we call the first `context.report()`. But in order to get rid of the duplicate logic, we will have to use a new member variable.\r\n\r\nSome explanation of design choices:\r\n1. We could replace the second `context.report()` by\r\n```\r\ncontext.report(ProgressStatus.EXECUTING, key.getWorkerTypeName());\r\n```\r\nBut I like it to be consistent calling the same function `getNameForReporting()` in the same file. What do you think?\r\n\r\n2. It looks like `Spawns.supportsMultiplexWorkers(spawn)` has been called multiple times in `WorkerSpawnRunner`. We could store it in a variable in `exec()` and pass it all the way down to `actuallyExec()` and `execInWorker()`. It may look cleaner. If you like it, what would be the variable name? `isSupportsMultiplexWorkers`?\r\nWhat do you think?",
"This comment doesn't make a lot of sense here. Where do these magic strings come from? If they are important, they should be part of the docstring. And if they must be these specific values, there should be some validation. I would remove this.",
"Have a static function `WorkerKey#makeWorkerTypeName(String name)` that builds the name, and then call it from wherever you need. No need for member fields.",
"Thanks, I think it will work. Just to verify, would the function be `WorkerKey#makeWorkerTypeName(boolean proxied)` instead? Passing `String name` to the function doesn't make sense to me, would you mind to elaborate more?",
"I assume `boolean` makes more sense, just updated. Let me know if you have different thought.",
"This is computed twice in this function. Add a `proxiedKey` local variable to reuse the result?",
"I think it'd be better if this took a key as input instead of a boolean, given that the input seems to always come from a key.\r\n\r\nBut humm... hold on. Given that `WorkerKey` knows whether it's proxied or not already, shouldn't this be a `getWorkerTypeName` member function without arguments?",
"> given that the input seems to always come from a key\r\n\r\nNot always, the input on this line comes from `Spawn`.\r\nhttps://github.com/bazelbuild/bazel/pull/10732/files#diff-4ebed75948b31f1a40fc7f782b6d31ceR127\r\n\r\nI think since this is a static function, we don't always have the information about proxy.\r\n\r\nLike on the same line https://github.com/bazelbuild/bazel/pull/10732/files#diff-4ebed75948b31f1a40fc7f782b6d31ceR127, we can only tell by passing argument to the static function.\r\n\r\nIf we prefer to take a key as argument, I would like to know what would the key look like. Previously you suggested `String name`, what is a `name`?",
"I assume you meant the entire `WorkerKey.makeWorkerTypeName(key.getProxied())` statement, not just the `key.getProxied()`, since `key.getProxied()` is used three times in this functoin.\r\n\r\nLet me know if you have more concerns. Thanks.",
"All usages of `makeWorkerTypeName` are of the form: `WorkerKey.makeWorkerTypeName(key.getProxied())`, which is a very strange way of saying `key.getProxiedWorkerTypeName()`.\r\n\r\nThere is only once exception, which is `WorkerKey.makeWorkerTypeName(Spawns.supportsMultiplexWorkers(spawn))`. Maybe that one just needs special-casing: make the two strings constants and duplicate the conditional at that call site? Or add a `WorkerKey.getProxiedWorkerTypeName` member function that calls the static `makeWorkerTypeName`?\r\n\r\nI guess it doesn't matter much and any of these \"solutions\" are actually worse. So I think this is good enough; can't see of an easy way to handle this single corner case.",
"Sounds good, thanks! Let's keep it in mind, I am happy to improve this when we have better solution."
] | "2020-02-07T23:42:31Z" | [
"type: feature request",
"P3",
"team-Local-Exec"
] | Show debug information about multiplex worker vs regular persistent worker | ### Description of the problem / feature request:
Currently when we replace our persistent worker with [multiplex worker](https://docs.bazel.build/versions/master/multiplex-worker.html), it is unclear which one is being used. `--worker_verbose` shows "Create new ... worker (id #)", but does not display the debug information for multiplex worker.
### Feature requests: what underlying problem are you trying to solve with this feature?
Add additional debug information for better developer experience.
### Any other information, logs, or outputs that you want to share?
It sounds to me we could add additional information in [WorkerKey](https://github.com/bazelbuild/bazel/blob/8c96c0614684243b0a51d0ad8ddc27b0258b4af1/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java) and then print this debug information in [WorkerFactory](https://github.com/bazelbuild/bazel/blob/8c96c0614684243b0a51d0ad8ddc27b0258b4af1/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java)? | [
"src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java",
"src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java",
"src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java"
] | [
"src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java",
"src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java",
"src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java"
] | [
"src/test/java/com/google/devtools/build/lib/worker/WorkerKeyTest.java",
"src/test/shell/integration/bazel_worker_multiplexer_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java
index be835737dfa77f..7e879f1afbb2a5 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java
@@ -54,8 +54,9 @@ public void setOptions(WorkerOptions workerOptions) {
@Override
public Worker create(WorkerKey key) throws Exception {
int workerId = pidCounter.getAndIncrement();
+ String workTypeName = WorkerKey.makeWorkerTypeName(key.getProxied());
Path logFile =
- workerBaseDir.getRelative("worker-" + workerId + "-" + key.getMnemonic() + ".log");
+ workerBaseDir.getRelative(workTypeName + "-" + workerId + "-" + key.getMnemonic() + ".log");
Worker worker;
boolean sandboxed = workerOptions.workerSandboxing || key.mustBeSandboxed();
@@ -77,9 +78,10 @@ public Worker create(WorkerKey key) throws Exception {
reporter.handle(
Event.info(
String.format(
- "Created new %s %s worker (id %d), logging to %s",
+ "Created new %s %s %s (id %d), logging to %s",
sandboxed ? "sandboxed" : "non-sandboxed",
key.getMnemonic(),
+ workTypeName,
workerId,
logFile)));
}
@@ -89,7 +91,7 @@ public Worker create(WorkerKey key) throws Exception {
Path getSandboxedWorkerPath(WorkerKey key, int workerId) {
String workspaceName = key.getExecRoot().getBaseName();
return workerBaseDir
- .getRelative("worker-" + workerId + "-" + key.getMnemonic())
+ .getRelative(WorkerKey.makeWorkerTypeName(key.getProxied()) + "-" + workerId + "-" + key.getMnemonic())
.getRelative(workspaceName);
}
@@ -110,7 +112,7 @@ public void destroyObject(WorkerKey key, PooledObject<Worker> p) throws Exceptio
reporter.handle(
Event.info(
String.format(
- "Destroying %s worker (id %d)", key.getMnemonic(), p.getObject().getWorkerId())));
+ "Destroying %s %s (id %d)", key.getMnemonic(), WorkerKey.makeWorkerTypeName(key.getProxied()), p.getObject().getWorkerId())));
}
p.getObject().destroy();
}
@@ -126,8 +128,8 @@ public boolean validateObject(WorkerKey key, PooledObject<Worker> p) {
StringBuilder msg = new StringBuilder();
msg.append(
String.format(
- "%s worker (id %d) can no longer be used, because its files have changed on disk:",
- key.getMnemonic(), worker.getWorkerId()));
+ "%s %s (id %d) can no longer be used, because its files have changed on disk:",
+ key.getMnemonic(), WorkerKey.makeWorkerTypeName(key.getProxied()), worker.getWorkerId()));
TreeSet<PathFragment> files = new TreeSet<>();
files.addAll(key.getWorkerFilesWithHashes().keySet());
files.addAll(worker.getWorkerFilesWithHashes().keySet());
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java
index ab96192d18105a..5aa7bc70c0bab3 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java
@@ -110,6 +110,15 @@ public boolean getProxied() {
return proxied;
}
+ /** Returns a user-friendly name for this worker type. */
+ public static String makeWorkerTypeName(boolean proxied) {
+ if (proxied) {
+ return "multiplex-worker";
+ } else {
+ return "worker";
+ }
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) {
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java
index a11fb631f98b3e..580151d244e496 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java
@@ -124,7 +124,7 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
return fallbackRunner.exec(spawn, context);
}
- context.report(ProgressStatus.SCHEDULING, getName());
+ context.report(ProgressStatus.SCHEDULING, WorkerKey.makeWorkerTypeName(Spawns.supportsMultiplexWorkers(spawn)));
return actuallyExec(spawn, context);
}
@@ -335,7 +335,7 @@ private WorkResponse execInWorker(
try (ResourceHandle handle =
resourceManager.acquireResources(owner, spawn.getLocalResources())) {
- context.report(ProgressStatus.EXECUTING, getName());
+ context.report(ProgressStatus.EXECUTING, WorkerKey.makeWorkerTypeName(key.getProxied()));
try {
worker.prepareExecution(inputFiles, outputs, key.getWorkerFilesWithHashes().keySet());
} catch (IOException e) {
| diff --git a/src/test/java/com/google/devtools/build/lib/worker/WorkerKeyTest.java b/src/test/java/com/google/devtools/build/lib/worker/WorkerKeyTest.java
index a0a0fe2feae249..83bbc01ad11e58 100644
--- a/src/test/java/com/google/devtools/build/lib/worker/WorkerKeyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/worker/WorkerKeyTest.java
@@ -48,6 +48,8 @@ public class WorkerKeyTest {
public void testWorkerKeyGetter() {
assertThat(workerKey.mustBeSandboxed()).isEqualTo(true);
assertThat(workerKey.getProxied()).isEqualTo(true);
+ assertThat(WorkerKey.makeWorkerTypeName(false)).isEqualTo("worker");
+ assertThat(WorkerKey.makeWorkerTypeName(true)).isEqualTo("multiplex-worker");
// Hash code contains args, env, execRoot, and mnemonic.
assertThat(workerKey.hashCode()).isEqualTo(322455166);
}
diff --git a/src/test/shell/integration/bazel_worker_multiplexer_test.sh b/src/test/shell/integration/bazel_worker_multiplexer_test.sh
index d64c3ec097c26b..564bffea232692 100755
--- a/src/test/shell/integration/bazel_worker_multiplexer_test.sh
+++ b/src/test/shell/integration/bazel_worker_multiplexer_test.sh
@@ -371,8 +371,8 @@ EOF
bazel build --worker_quit_after_build :hello_world_1 &> $TEST_log \
|| fail "build failed"
- expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work worker (id [0-9]\+)"
- expect_log "Destroying Work worker (id [0-9]\+)"
+ expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work multiplex-worker (id [0-9]\+)"
+ expect_log "Destroying Work multiplex-worker (id [0-9]\+)"
expect_log "Build completed, shutting down worker pool..."
}
@@ -389,9 +389,9 @@ EOF
bazel build --worker_quit_after_build :hello_world_1 &> $TEST_log \
|| fail "build failed"
- expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work worker (id [0-9]\+)"
+ expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work multiplex-worker (id [0-9]\+)"
- worker_log=$(egrep -o -- 'logging to .*/b(azel|laze)-workers/worker-[0-9]-Work.log' "$TEST_log" | sed 's/^logging to //')
+ worker_log=$(egrep -o -- 'logging to .*/b(azel|laze)-workers/multiplex-worker-[0-9]-Work.log' "$TEST_log" | sed 's/^logging to //')
[ -e "$worker_log" ] \
|| fail "Worker log was not found"
@@ -420,8 +420,8 @@ EOF
bazel build --worker_quit_after_build :hello_world &> $TEST_log \
|| fail "build failed"
- expect_not_log "Created new ${WORKER_TYPE_LOG_STRING} Work worker (id [0-9]\+)"
- expect_not_log "Destroying Work worker (id [0-9]\+)"
+ expect_not_log "Created new ${WORKER_TYPE_LOG_STRING} Work multiplex-worker (id [0-9]\+)"
+ expect_not_log "Destroying Work multiplex-worker (id [0-9]\+)"
# WorkerSpawnStrategy falls back to standalone strategy, so we still expect the output to be generated.
[ -e "$BINS/hello_world.out" ] \
@@ -460,12 +460,12 @@ EOF
bazel build :hello_clean &> $TEST_log \
|| fail "build failed"
assert_equals "hello clean" "$(cat $BINS/hello_clean.out)"
- expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work worker (id [0-9]\+)"
+ expect_log "Created new ${WORKER_TYPE_LOG_STRING} Work multiplex-worker (id [0-9]\+)"
bazel clean &> $TEST_log \
|| fail "clean failed"
expect_log "Clean command is running, shutting down worker pool..."
- expect_log "Destroying Work worker (id [0-9]\+)"
+ expect_log "Destroying Work multiplex-worker (id [0-9]\+)"
}
function test_crashed_worker_causes_log_dump() {
| train | val | 2020-02-27T19:53:16 | "2020-01-07T18:50:29Z" | fenghaolw | test |
bazelbuild/bazel/10541_10677 | bazelbuild/bazel | bazelbuild/bazel/10541 | bazelbuild/bazel/10677 | [
"timestamp(timedelta=1.0, similarity=0.919713396807798)"
] | 75ed889beae02388800a022831f20e6c78be98dd | 73ab9d2dd921d32453a67fded47db1d15ffd2bec | [
"Super-useful! \r\n\r\nHappy to help with (at least) configuration-related terms."
] | [
"Non-alphabetical order?",
"Replace italics with link to phase entries?",
"Replace italics with links?\r\n\r\nMore generally, I think italics signify highlighting of a newly introduced concept. Which is the same role a link to a glossary definition provides (and in a better way). \r\n\r\nI know we used italics throughout when specing up the doc, which made sense since organization was changing and not all links were available yet. But as it stabilizes it probably makes sense to deprecate them for proper definition links?\r\n\r\nI have no problem retaining italics for concepts that don't have/deserve their own definition for whatever reason.",
"link \"query\" to concept definition?",
"Some of these have extensive \"dive in deeper\" docs elsewhere (e.g. cquery or platforms). What should be the process for that?\r\n\r\n* Have a standardized **See also:** section at the bottom of each entry?\r\n* Arbitrary inline text / links?\r\n* Don't link out at all?",
"We like to use italics on the first mention of a special term, especially here where the term is the one that is being defined. This being said, it's best used with care, as you can inadvertently draw the reader's eye to parts of a paragraph that aren't actually the most important part.\r\n\r\nI like the recommendation for replacing the italics with links to other entries in the glossary where appropriate, as the document is fairly long.",
"Might want to consider introducing an extra layer of sections here, like:\r\n\r\n## A\r\n\r\n### Action \r\n...\r\n### Action key\r\n...\r\n## B\r\n\r\n### Blaze\r\n...",
"Very optional comment, but we normally don't consider the leading period when we alphabetize terms. So, maybe consider moving this under the B terms?",
"I would suggest:\r\n\r\n\"A command to run during the build, for example, a call to a compiler that takes artifacts as inputs and produces other artifacts as outputs.\"",
"I suggest:\r\n\r\n\"The cache key of an action. Computed based on action metadata, which might include the command to be execution in the action, compiler flags, library locations, or system headers, depending on the action. Enables Bazel to cache or invalidate individual actions deterministically.\"",
"The first sentence in the definition for \"action cache\" needs some work. What is this trying to express?",
"I'd go with something like:\r\n\r\n\"An in-memory graph of actions and the artifacts that these actions read and generate. The graph might include artifacts that exist as source files (for example, in the file system), as well as generated intermediate or final artifacts that are not mentioned in BUILD files ...\"",
"My sense here is that \"derived by Bazel\" might need a bit more information. What is intended to be expressed here?",
"Oh, boy.\r\n\r\nThis is something where I think users would benefit from a link to another document on the site that describes use cases for this in greater depth. I'm guessing that this page is a good candidate:\r\n\r\nhttps://docs.bazel.build/versions/2.0.0/skylark/aspects.html",
"`Top-level` alone is ambiguous.\r\nUpdate to `Top-level target`.",
"I think we should have way more links to the actual documentation (I think around 50% of the entries have a corresponding section in the documentation, with much more information than this glossary).\r\n\r\nThis page already represents a lot of work, so I'm happy if we do that in a followup PR.",
"Do you mean \"a source file or a generated file\"?",
"Took another stab at this. PTAL.",
"Going with \"a source file or a generated file\".",
"We should link out, and I like the *See also:* approach. I'll add link outs in a follow up PR to keep this iteration scoped down.",
"Hmm, would a table-of-contents be better here?",
"Agreed, and done. It looks much better without italics everywhere.",
"Yep, I'm happy to do a follow up to add link-outs to full documentation pages. ",
"SGTM. Happy to help with the content of them if you need.",
"Soft pitch on my other work: this would look good with those right-side context menus vs. a top ToC that takes up a bunch of vertical real estate.",
"I think external links are great to have but it's probably better to have them listed as a separate optional block under each term\r\n\r\nOne of the goals of having such a glossary is that it is for the most part self-contained like an Oxford English Dictionary and such :)",
"this word should be part of the previous bullet point",
"Strange ] around the See also: text",
"thanks.",
"Looks a lot better, thanks!",
"Should \"with provides attribute\" by \"with provider attributes\" or \"with provided attributes, maybe?\"",
"I think that what this needs here is something that effectively summarizes the function of the BUILD file without really going too deep into the details.\r\n\r\nFor example:\r\n\r\n\"A BUILD file is a text file written in the Starlark language that tells Bazel what software outputs to build, what their dependencies are, and how to build them. Bazel takes a BUILD file as input and uses the file to create a graph of dependencies and to derive the actions that must be completed to build intermediate and final software outputs.\"",
"Should try to be consistent in this page between \".bzl\" file and \"bzl\" file -- my preference would be to maintain the leading period here, just as we do when talking about \".c\" or \".h\" files.",
"Probably a bit clearer as ...\r\n\r\n\"The dependency graph that Bazel constructs and traverses to perform a build.\"",
"Maybe:\r\n\r\n\"A build is considered complete when all artifacts on which a set of requested targets depend are verified as up-to-date.\"",
"Make sure to set up \"bazel\" in monospaced font when you are referring to a command or something that is launched via a command.",
"Set off the actual command names here with a monospaced font, in Markdown by enclosing the term in backticks (`).\r\n\r\nFor example:\r\n\r\n`bazel build`",
"As above and probably a good idea to check everwhere, make sure that actual command-line commands are set off from other text using backticks.",
"Looking at this line ...\r\n\r\n\"it's wasteful to include `--javacopt` in `//:c`,'s configuration because ...\"\r\n\r\nAs a general practice, it's a good idea to take a look at places where you are using the possessive case with apostrophe-s ('s). For example, here, the following is a lot clearer:\r\n\r\n\"... it's wasteful to include `--javacopt` in the configuration of `//:c` because ...: ",
"Consider setting up \"select()\" with backticks here.",
"Remove extra period character after first line.",
"I'd say something like this to make it a bit more clear:\r\n\r\n\"A build is correct when its output faithfully reflects the state of its transitive inputs.\"\r\n\r\n... and then replace the second sentence with something meaningful about hermeticity and non-determinism?",
"Maybe this case is a good one for italics:\r\n\r\n\"Also known as _nested sets_ in Bazel's internal implementation.\"",
"I propose here:\r\n\r\n\"An execution strategy that selects between local and remote execution based on various heuristics, and uses the execution results of the faster successful method. Certain actions are executed faster locally (for example, linking) and others are faster remotely (for example, highly parallelizable compilation). A dynamic execution strategy can provide the best possible incremental and clean build times.\"",
"I propose ...\r\n\r\n\"Executes in the actions in the action graph ...\"\r\n\r\nand ...\r\n\r\n\"These actions invoke executable scripts and programs that read and write artifacts.\"",
"Maybe:\r\n\r\n\"Prepared during the loading phase by creating a _symlink forest_ of directories that represent the transitive closure of packages on which a build depends.\"",
"This is the `provides` attribute in the aspects declaration. Clarified with formatting.",
"Thanks for the advice! Updated -- sounds much clearer.",
"I think this is easier to explain with a bit of a different sentence structure:\r\n\r\n\"A build is hermetic if there are no external influences on its build and test operations, which helps to make sure that results are deterministic and correct. For example, hermetic builds typically disallow network access to actions, restrict access to declared inputs, use fixed timestamps and timezones, restrict access to environment variables, and use fixed seeds for random number generators.\"",
"Maybe a few adjustments along the lines of:\r\n\r\n\"An incremental build reuses the results of earlier builds to reduce build time and resource usage. Dependency checking and caching aim to produce correct results for this type of build. An incremental build is the opposite of a clean build.\"",
"Replace \"fully qualified\" with \"fully-qualified.\"\r\n",
"Set off `path/to/package` and `:target` with backticks.",
"Again, take a look at usage of backticks to specify monospaced fonts throughout the document.\r\n\r\nGenerally, we want to signal typographically whenever a special term is used to indicate a filename, file type, or snippet of command or code that a user might have to enter. So, here, preferentially, we would use `WOKRSPACE`, `BUILD` and `.bzl` to set off the terms, though I imagine this is very inconsistent throughout the doc set.",
"As above, function name like `glob()` should be set off with backticks.",
"A couple of notes here:\r\n\r\nThe context of the term is not clear -- where is the mnemonic declared? In BUILD files, in .bzl files? Second, it's not clear who is supposed to be understanding when worded like this.\r\n\r\nFor example, this might better be something like:\r\n\r\n\"A *mnemonic* is a short, human-readable string in a `.bzl` file that describes what an action is doing. Mnemonics can be used as identifiers ...\"",
"As above, it helps users out to set apart file types like `.jar`, `.a` and `.so` with backticks as you have here with `cc_library`.",
"Thanks! I think you may be looking at an older revision of the file in this PR - I've done a pass for the backtick change throughout the document.",
"Thanks! I've reworded it to make it clearer. PTAL."
] | "2020-01-29T11:58:02Z" | [
"type: feature request",
"type: documentation (cleanup)",
"untriaged",
"team-OSS"
] | Documentation: create a Bazel glossary | Feature request: create a glossary for abstractions used in the Bazel build system and ecosystem.
Work in progress: https://github.com/jin/bazel-glossary | [
"site/_layouts/documentation.html"
] | [
"site/_layouts/documentation.html",
"site/docs/glossary.md"
] | [] | diff --git a/site/_layouts/documentation.html b/site/_layouts/documentation.html
index 36d154a35bb56c..a70c35b277c08e 100644
--- a/site/_layouts/documentation.html
+++ b/site/_layouts/documentation.html
@@ -268,6 +268,8 @@ <h3>Rules</h3>
<h3>Reference</h3>
<ul class="sidebar-nav">
<li><a href="/versions/{{ current_version }}/user-manual.html">Commands and Options</a></li>
+ <!-- TODO(jingwen): version this when the page is in a versioned docset. -->
+ <li><a href="/versions/master/glossary.html">Glossary</a></li>
<li><a href="/versions/{{ current_version }}/skylark/build-style.html">BUILD Style Guide</a></li>
<li><a href="/versions/{{ current_version }}/command-line-reference.html">Command Line Reference</a></li>
<li><a href="/versions/{{ current_version }}/test-encyclopedia.html">Writing Tests</a></li>
diff --git a/site/docs/glossary.md b/site/docs/glossary.md
new file mode 100644
index 00000000000000..fb491081d2b5ea
--- /dev/null
+++ b/site/docs/glossary.md
@@ -0,0 +1,573 @@
+---
+layout: documentation
+title: Bazel Glossary
+---
+
+# Bazel Glossary
+
+#### Action
+
+A command to run during the build, for example, a call to a compiler that takes
+[artifacts](#artifact) as inputs and produces other artifacts as outputs.
+Includes metadata like the command line arguments, action key, environment
+variables, and declared input/output artifacts.
+
+#### Action cache
+
+An on-disk cache that stores a mapping of executed [actions](#action) to the
+outputs they created. The cache key is known as the [action key](#action-key). A
+core component for Bazel's incrementality model. The cache is stored in the
+output base directory and thus survives Bazel server restarts.
+
+#### Action graph
+
+An in-memory graph of [actions](#action) and the [artifacts](#artifact) that
+these actions read and generate. The graph might include artifacts that exist as
+source files (for example, in the file system) as well as generated
+intermediate/final artifacts that are not mentioned in BUILD files. Produced
+during the [analysis phase](#analysis-phase) and used during the [execution
+phase](#execution-phase).
+
+#### Action graph query (aquery)
+
+A [query](#query-concept) tool that can query over build [actions](#action).
+This provides the ability to analyze how [build rules](#rule) translate into the
+actual work builds do.
+
+#### Action key
+
+The cache key of an [action](#action). Computed based on action metadata, which
+might include the command to be execution in the action, compiler flags, library
+locations, or system headers, depending on the action. Enables Bazel to cache or
+invalidate individual actions deterministically.
+
+#### Analysis phase
+
+The second phase of a build. Processes the [target graph](#target-graph)
+specified in [BUILD files](#build-file) to produce an in-memory [action
+graph](#action-graph) that determines the order of actions to run during the
+[execution phase](#execution-phase). This is the phase in which rule
+implementations are evaluated.
+
+#### Artifact
+
+A source file or a generated file. Can also be a directory of files, known as
+"tree artifacts". Tree artifacts are black boxes to Bazel: Bazel does not treat
+the files in tree artifacts as individual artifacts and thus cannot reference
+them directly as action inputs / outputs. An artifact can be an input to
+multiple actions, but must only be generated by at most one action.
+
+#### Aspect
+
+A mechanism for rules to create additional [actions](#action) in their
+dependencies. For example, if target A depends on B, one can apply an aspect on
+A that traverses *up* a dependency edge to B, and runs additional actions in B
+to generate and collect additional output files. These additional actions are
+cached and reused between targets requiring the same aspect. Created with the
+`aspect()` Starlark Build API function. Can be used, for example, to generate
+metadata for IDEs, and create actions for linting.
+
+**See also:** [Aspects documentation](skylark/aspects.html)
+
+#### Aspect-on-aspect
+
+An aspect composition mechanism, where aspects can be applied on other aspects.
+For an aspect A to inspect aspect B, aspect A must declare the *providers* it
+needs from aspect B (with the `required_aspect_providers` attribute), and aspect
+B must declare the providers it returns (with the `provides` attribute). For
+example, this can be used by IDE aspects to generate files using information
+also generated by aspects, like the `java_proto_library` aspect.
+
+#### .bazelrc
+
+Bazel’s configuration file used to change the default values for [startup
+flags](#startup-flags) and [command flags](#command-flags), and to define common
+groups of options that can then be set together on the Bazel command line using
+a `--config` flag. Bazel can combine settings from multiple bazelrc files
+(systemwide, per-workspace, per-user, or from a custom location), and a
+bazelrc file may also import settings from other bazelrcs.
+
+#### Blaze
+
+The Google-internal version of Bazel. Google’s main build system for its
+mono-repository.
+
+#### BUILD File
+
+A BUILD file is the main configuration file that tells Bazel what software
+outputs to build, what their dependencies are, and how to build them. Bazel
+takes a BUILD file as input and uses the file to create a graph of dependencies
+and to derive the actions that must be completed to build intermediate and final
+software outputs. A BUILD file marks a directory and any sub-directories not
+containing a BUILD file as a [package](#package), and can contain
+[targets](#target) created by [rules](#rule). The file can also be named
+BUILD.bazel.
+
+#### BUILD.bazel File
+
+See [BUILD File](#build-file). Takes precedence over a `BUILD` file in the same
+directory.
+
+#### .bzl File
+
+A file that defines rules, [macros](#macro), and constants written in
+[Starlark](#starlark). These can then be imported into [BUILD
+files](#build-file) using the load() function.
+
+<!-- TODO: #### Build event protocol -->
+
+<!-- TODO: #### Build flag -->
+
+#### Build graph
+
+The dependency graph that Bazel constructs and traverses to perform a build.
+Includes nodes like [targets](#target), [configured
+targets](#configured-target), [actions](#action), and [artifacts](#artifact). A
+build is considered complete when all [artifacts](#artifact) on which a set of
+requested targets depend are verified as up-to-date.
+
+#### Build setting
+
+A Starlark-defined piece of [configuration](#configuration).
+[Transitions](#transition) can set build settings to change a subgraph's
+configuration. If exposed to the user as a [command-line flag](#command-flags),
+also known as a build flag.
+
+#### Clean build
+
+A build that doesn't use the results of earlier builds. This is generally slower
+than an [incremental build](#incremental-build) but commonly considered to be
+more [correct](#correctness). Bazel guarantees both clean and incremental builds
+are always correct.
+
+#### Client-server model
+
+The `bazel` command-line client automatically starts a background server on the
+local machine to execute Bazel [commands](#command). The server persists across
+commands but automatically stops after a period of inactivity (or explicitly via
+bazel shutdown). Splitting Bazel into a server and client helps amortize JVM
+startup time and supports faster [incremental builds](#incremental-build)
+because the [action graph](#action-graph) remains in memory across commands.
+
+#### Command
+
+Used on the command line to invoke different Bazel functions, like `bazel
+build`, `bazel test`, `bazel run`, and `bazel query`.
+
+#### Command flags
+
+A set of flags specific to a [command](#command). Command flags are specified
+*after* the command (`bazel build <command flags>`). Flags can be applicable to
+one or more commands. For example, `--configure` is a flag exclusively for the
+`bazel sync` command, but `--keep_going` is applicable to `sync`, `build`,
+`test` and more. Flags are often used for [configuration](#configuration)
+purposes, so changes in flag values can cause Bazel to invalidate in-memory
+graphs and restart the [analysis phase](#analysis-phase).
+
+#### Configuration
+
+Information outside of [rule](#rule) definitions that impacts how rules generate
+[actions](#action). Every build has at least one configuration specifying the
+target platform, action environment variables, and command-line [build
+flags](#command-flags). [Transitions](#transition) may create additional
+configurations, e.g. for host tools or cross-compilation.
+
+#### Configuration trimming
+
+The process of only including the pieces of [configuration](#configuration) a
+target actually needs. For example, if you build Java binary `//:j` with C++
+dependency `//:c`, it's wasteful to include the value of `--javacopt` in the
+configuration of `//:c` because changing `--javacopt` unnecessarily breaks C++
+build cacheability.
+
+#### Configured query (cquery)
+
+A [query](#query-concept) tool that queries over [configured
+targets](#configured-target) (after the [analysis phase](#analysis-phase)
+completes). This means `select()` and [build flags](#command-flags) (e.g.
+`--platforms`) are accurately reflected in the results.
+
+#### Configured target
+
+The result of evaluating a [target](#target) with a
+[configuration](#configuration). The [analysis phase](#analysis-phase) produces
+this by combining the build's options with the targets that need to be built.
+For example, if `//:foo` builds for two different architectures in the same
+build, it has two configured targets: `<//:foo, x86>` and `<//:foo, arm>`.
+
+#### Correctness
+
+A build is correct when its output faithfully reflects the state of its
+transitive inputs. To achieve correct builds, Bazel strives to be
+[hermetic](#hermeticity), reproducible, and making [build
+analysis](#analysis-phase) and [action execution](#execution-phase)
+deterministic.
+
+#### Dependency
+
+A directed edge between two [targets](#target). A target `//:foo` has a *target
+dependency* on target `//:bar` if `//:foo`'s attribute values contain a
+reference to `//:bar`. `//:foo` has an *action dependency* on `//:bar` if an
+action in `//:foo` depends on an input [artifact](#artifact) created by an
+action in `//:bar`.
+
+#### Depset
+
+A data structure for collecting data on transitive dependencies. Optimized so
+that merging depsets is time and space efficient, because it’s common to have
+very large depsets (e.g. hundreds of thousands of files). Implemented to
+recursively refer to other depsets for space efficiency reasons. [Rule](#rule)
+implementations should not "flatten" depsets by converting them to lists unless
+the rule is at the top level of the build graph. Flattening large depsets incurs
+huge memory consumption. Also known as *nested sets* in Bazel's internal
+implementation.
+
+#### Disk cache
+
+A local on-disk blob store for the remote caching feature. Can be used in
+conjunction with an actual remote blob store.
+
+#### Distdir
+
+A read-only directory containing files that Bazel would otherwise fetch from the
+internet using repository rules. Enables builds to run fully offline.
+
+#### Dynamic execution
+
+An execution strategy that selects between local and remote execution based on
+various heuristics, and uses the execution results of the faster successful
+method. Certain [actions](#action) are executed faster locally (for example,
+linking) and others are faster remotely (for example, highly parallelizable
+compilation). A dynamic execution strategy can provide the best possible
+incremental and clean build times.
+
+#### Execution phase
+
+The third phase of a build. Executes the [actions](#action) in the [action
+graph](#action-graph) created during the [analysis phase](#analysis-phase).
+These actions invoke executables (compilers, scripts) to read and write
+[artifacts](#artifact). *Spawn strategies* control how these actions are
+executed: locally, remotely, dynamically, sandboxed, docker, and so on.
+
+#### Execution root
+
+A directory in the [workspace](#workspace)’s [output base](#output-base)
+directory where local [actions](#action) are executed in
+non-[sandboxed](#sandboxing) builds. The directory contents are mostly symlinks
+of input [artifacts](#artifact) from the workspace. The execution root also
+contains symlinks to external repositories as other inputs and the `bazel-out`
+directory to store outputs. Prepared during the [loading phase](#loading-phase)
+by creating a *symlink forest* of the directories that represent the transitive
+closure of packages on which a build depends. Accessible with `bazel info
+execution_root` on the command line.
+
+#### File
+
+See [Artifact](#artifact).
+
+#### Hermeticity
+
+A build is hermetic if there are no external influences on its build and test
+operations, which helps to make sure that results are deterministic and
+[correct](#correctness). For example, hermetic builds typically disallow network
+access to actions, restrict access to declared inputs, use fixed timestamps and
+timezones, restrict access to environment variables, and use fixed seeds for
+random number generators
+
+#### Incremental build
+
+An incremental build reuses the results of earlier builds to reduce build time
+and resource usage. Dependency checking and caching aim to produce correct
+results for this type of build. An incremental build is the opposite of a clean
+build.
+
+<!-- TODO: #### Install base -->
+
+#### Label
+
+An identifier for a [target](#target). A fully-qualified label such as
+`//path/to/package:target` consists of `//` to mark the workspace root
+directory, `path/to/package` as the directory that contains the [BUILD
+file](#build-file) declaring the target, and `:target` as the name of the target
+declared in the aforementioned BUILD file. May also be prefixed with
+`@my_repository//<..>` to indicate that the target is declared in an ]external
+repository] named `my_repository`.
+
+#### Loading phase
+
+The first phase of a build where Bazel parses `WORKSPACE`, `BUILD`, and [.bzl
+files](#bzl-file) to create [packages](#package). [Macros](#macro) and certain
+functions like `glob()` are evaluated in this phase. Interleaved with the second
+phase of the build, the [analysis phase](#analysis-phase), to build up a [target
+graph](#target-graph).
+
+#### Macro
+
+A mechanism to compose multiple [rule](#rule) target declarations together under
+a single [Starlark](#starlark) function. Enables reusing common rule declaration
+patterns across BUILD files. Expanded to the underlying rule target declarations
+during the [loading phase](#loading-phase).
+
+#### Mnemonic
+
+A short, human-readable string selected by a rule author to quickly understand
+what an [action](#action) in the rule is doing. Mnemonics can be used as
+identifiers for *spawn strategy* selections. Some examples of action mnemonics
+are `Javac` from Java rules, `CppCompile` from C++ rules, and
+`AndroidManifestMerger` from Android rules.
+
+#### Native rules
+
+[Rules](#rule) that are built into Bazel and implemented in Java. Such rules
+appear in [`.bzl` files](#bzl-file) as functions in the native module (for
+example, `native.cc_library` or `native.java_library`). User-defined rules
+(non-native) are created using [Starlark](#starlark).
+
+#### Output base
+
+A [workspace](#workspace)-specific directory to store Bazel output files. Used
+to separate outputs from the *workspace*'s source tree. Located in the [output
+user root](#output-user-root).
+
+#### Output groups
+
+A group of files that is expected to be built when Bazel finishes building a
+target. [Rules](#rule) put their usual outputs in the "default output group"
+(e.g the `.jar` file of a `java_library`, `.a` and `.so` for `cc_library`
+targets). The default output group is the output group whose
+[artifacts](#artifact) are built when a target is requested on the command line.
+Rules can define more named output groups that can be explicitly specified in
+[BUILD files](#build-file) (`filegroup` rule) or the command line
+(`--output_groups` flag).
+
+#### Output user root
+
+A user-specific directory to store Bazel's outputs. The directory name is
+derived from the user's system username. Prevents output file collisions if
+multiple users are building the same project on the system at the same time.
+Contains subdirectories corresponding to build outputs of individual workspaces,
+also known as [output bases](#output-base).
+
+#### Package
+
+The set of [targets](#target) defined by a [BUILD file](#build-file). A
+package's name is the BUILD file's path relative to the workspace root. A
+package can contain subpackages, or subdirectories containing BUILD files, thus
+forming a package hierarchy.
+
+#### Package group
+
+A [target](#target) representing a set of packages. Often used in visibility
+attribute values.
+
+#### Platform
+
+A "machine type" involved in a build. This includes the machine Bazel runs on
+(the "host" platform), the machines build tools execute on ("exec" platforms),
+and the machines targets are built for ("target platforms").
+
+#### Provider
+
+A set of information passed from a rule [target](#target) to other rule targets.
+Usually contains information like: compiler options, transitive source files,
+transitive output files, and build metadata. Frequently used in conjunction with
+[depsets](#depset).
+
+#### Query (concept)
+
+The process of analyzing a [build graph](#build-graph) to understand
+[target](#target) properties and dependency structures. Bazel supports three
+query variants: [query](#query-command), [cquery](#configured-query-cquery), and
+[aquery](#action-graph-query-aquery).
+
+#### query (command)
+
+A [query](#query-concept) tool that operates over the build's post-[loading
+phase](#loading-phase) [target graph](#target-graph). This is relatively fast,
+but can't analyze the effects of `select()`, [build flags](#command-flags),
+[artifacts](#artifact), or build [actions](#action).
+
+#### Repository cache
+
+A shared content-addressable cache of files downloaded by Bazel for builds,
+shareable across [workspaces](#workspace). Enables offline builds after the
+initial download. Commonly used to cache files downloaded through repository
+rules like `http_archive` and repository rule APIs like
+`repository_ctx.download`. Files are cached only if their SHA-256 checksums are
+specified for the download.
+
+<!-- TODO: #### Repository rule -->
+
+#### Reproducibility
+
+The property of a build or test that a set of inputs to the build or test will
+always produce the same set of outputs every time, regardless of time, method,
+or environment. Note that this does not necessarily imply that the outputs are
+[correct](#correctness) or the desired outputs.
+
+#### Rule
+
+A function implementation that registers a series of [actions](#action) to be
+performed on input [artifacts](#artifact) to produce a set of output artifacts.
+Rules can read values from *attributes* as inputs (e.g. deps, testonly, name).
+Rule targets also produce and pass along information that may be useful to other
+rule targets in the form of [providers](#provider) (e.g. `DefaultInfo`
+provider).
+
+#### Runfiles
+
+The runtime dependencies of an executable [target](#target). Most commonly, the
+executable is the executable output of a test rule, and the runfiles are runtime
+data dependencies of the test. Before the invocation of the executable (during
+bazel test), Bazel prepares the tree of runfiles alongside the test executable
+according to their source directory structure.
+
+#### Sandboxing
+
+A technique to isolate a running [action](#action) inside a restricted and
+temporary [execution root](#execution-root), helping to ensure that it doesn’t
+read undeclared inputs or write undeclared outputs. Sandboxing greatly improves
+[hermeticity](#hermeticity), but usually has a performance cost, and requires
+support from the operating system. The performance cost depends on the platform.
+On Linux, it's not significant, but on macOS it can make sandboxing unusable.
+
+#### Skyframe
+
+The core parallel, functional, and incremental evaluation framework of Bazel.
+[https://bazel.build/designs/skyframe.html](https://bazel.build/designs/skyframe.html)
+
+<!-- TODO: #### Spawn strategy -->
+
+#### Stamping
+
+A feature to embed additional information into Bazel-built
+[artifacts](#artifact). For example, this can be used for source control, build
+time and other workspace or environment-related information for release builds.
+Enable through the `--workspace_status_command` flag and [rules](rules) that
+support the stamp attribute.
+
+#### Starlark
+
+The extension language for writing [rules](rules) and [macros](#macro). A
+restricted subset of Python (syntactically and grammatically) aimed for the
+purpose of configuration, and for better performance. Uses the [`.bzl`
+file](#bzl-file) extension. [BUILD files](#build-file) use an even more
+restricted version of Starlark (e.g. no `def` function definitions). Formerly
+known as Skylark.
+
+<!-- TODO: #### Starlark rules -->
+
+<!-- TODO: #### Starlark rule sandwich -->
+
+#### Startup flags
+
+The set of flags specified between `bazel` and the [command](#query-command),
+for example, bazel `--host_jvm_debug` build. These flags modify the
+[configuration](#configuration) of the Bazel server, so any modification to
+startup flags causes a server restart. Startup flags are not specific to any
+command.
+
+#### Target
+
+A buildable unit. Can be a [rule](#rule) target, file target, or a [package
+group](#package-group). Rule targets are instantiated from rule declarations in
+[BUILD files](#build-file). Depending on the rule implementation, rule targets
+can also be testable or runnable. Every file used in BUILD files is a file
+target. Targets can depend on other targets via attributes (most commonly but
+not necessarily `deps`). A [configured target](#configured-target) is a pair of
+target and [build configuration](#configuration).
+
+#### Target graph
+
+An in-memory graph of [targets](#target) and their dependencies. Produced during
+the [loading phase](#loading-phase) and used as an input to the [analysis
+phase](#analysis-phase).
+
+#### Target pattern
+
+A way to specify a group of [targets](#target) on the command line. Commonly
+used patterns are `:all` (all rule targets), `:*` (all rule + file targets),
+`...` (current [package](#package) and all subpackages recursively). Can be used
+in combination, for example, `//...:*` means all rule and file targets in all
+packages recursively from the root of the [workspace](#workspace).
+
+#### Tests
+
+Rule [targets](#target) instantiated from test rules, and therefore contains a
+test executable. A return code of zero from the completion of the executable
+indicates test success. The exact contract between Bazel and tests (e.g. test
+environment variables, test result collection methods) is specified in the [Test
+Encyclopedia](test-encyclopedia.html).
+
+#### Toolchain
+
+A set of tools to build outputs for a language. Typically, a toolchain includes
+compilers, linkers, interpreters or/and linters. A toolchain can also vary by
+platform, that is, a Unix compiler toolchain's components may differ for the
+Windows variant, even though the toolchain is for the same language. Selecting
+the right toolchain for the platform is known as toolchain resolution.
+
+#### Top-level target
+
+A build [target](#target) is top-level if it’s requested on the Bazel command
+line. For example, if `//:foo` depends on `//:bar`, and `bazel build //:foo` is
+called, then for this build, `//:foo` is top-level, and `//:bar` isn’t
+top-level, although both targets will need to be built. An important difference
+between top-level and non-top-level targets is that [command
+flags](#command-flags) set on the Bazel command line (or via
+[.bazelrc](#bazelrc)) will set the [configuration](#configuration) for top-level
+targets, but might be modified by a [transition](#transition) for non-top-level
+targets.
+
+#### Transition
+
+A mapping of [configuration](#configuration) state from one value to another.
+Enables [targets](#target) in the [build graph](#build-graph) to have different
+configurations, even if they were instantiated from the same [rule](#rule). A
+common usage of transitions is with *split* transitions, where certain parts of
+the [target graph](#target-graph) is forked with distinct configurations for
+each fork. For example, one can build an Android APK with native binaries
+compiled for ARM and x86 using split transitions in a single build.
+
+#### Tree artifact
+
+See [Artifact](#artifact).
+
+#### Visibility
+
+Defines whether a [target](#target) can be depended upon by other targets. By
+default, target visibility is private. That is, the target can only be depended
+upon by other targets in the same [package](#package). Can be made visible to
+specific packages or be completely public.
+
+#### Workspace
+
+A directory containing a `WORKSPACE` file and source code for the software you
+want to build. Labels that start with `//` are relative to the workspace
+directory.
+
+#### WORKSPACE file
+
+Defines a directory to be a [workspace](#workspace). The file can be empty,
+although it usually contains external repository declarations to fetch
+additional dependencies from the network or local filesystem.
+
+## Contributing
+
+We welcome contributions to this glossary.
+
+The definitions should strive to be crisp, concise, and easy to understand.
+
+Principles:
+
+* Use the simplest words possible. Try to avoid technical jargon.
+* Use the simplest grammar possible. Try not to string too many concepts into a
+ sentence.
+* Make the last word of each sentence count.
+* Make each adjective *really* count.
+* Avoid adverbs.
+* Keep definitions as self-contained as possible.
+* Calibrate a word's value by considering what would be lost without it.
+* Hit core concepts foremost. Avoid pedantry.
+* Enlightening the reader is more important than being thorough.
+* Links can provide deeper dives, for those who want it.
| null | train | val | 2020-02-08T01:44:42 | "2020-01-08T21:00:26Z" | jin | test |
bazelbuild/bazel/10541_10824 | bazelbuild/bazel | bazelbuild/bazel/10541 | bazelbuild/bazel/10824 | [
"timestamp(timedelta=5250.0, similarity=0.8448289083933646)"
] | 0447bf95eb996cca7530259b93db4882b95bcb84 | null | [
"Super-useful! \r\n\r\nHappy to help with (at least) configuration-related terms."
] | [] | "2020-02-19T17:21:45Z" | [
"type: feature request",
"type: documentation (cleanup)",
"untriaged",
"team-OSS"
] | Documentation: create a Bazel glossary | Feature request: create a glossary for abstractions used in the Bazel build system and ecosystem.
Work in progress: https://github.com/jin/bazel-glossary | [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [
".travis.yml",
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [] | diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000000..8af1e3ba247017
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+os: linux
+arch: ppc64le
+sudo: required
+language: go
+go:
+- "1.13.x"
+
+jobs:
+ include:
+ - dist: xenial
+ env: dist_version=16.04
+ - dist: bionic
+ env: dist_version=18.04
+
+before_install:
+ - sudo apt update
+ - sudo apt install build-essential python zip unzip gcc
+ - sudo apt install default-jre default-jdk
+
+script:
+ - wget -q https://oplab9.parqtec.unicamp.br/pub/ppc64el/bazel/ubuntu_${dist_version}/bazel_bin_ppc64le_1.0.0
+ - sudo mv bazel_bin_ppc64le_1.0.0 /usr/local/bin/bazel
+ - sudo chmod +x /usr/local/bin/bazel
+ - git clone https://github.com/bazelbuild/bazel
+ - cd bazel
+ - git checkout 314cd3353b018420598188cf54c3f97358baa2e3
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null version
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null info
+ - bazel build --host_javabase=@local_jdk//:jdk -- //src:bazel //src:bazel_jdk_minimal
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BUILD b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
index 82dddf8e367b14..f3d92062d0e09e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
@@ -152,6 +152,7 @@ cc_binary(
name = "libcpu_profiler.so",
srcs = select({
"//src/conditions:darwin": ["cpu_profiler_posix.cc"],
+ "//src/conditions:linux_ppc": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_x86_64": ["cpu_profiler_posix.cc"],
"//conditions:default": ["cpu_profiler_unimpl.cc"],
}),
@@ -165,6 +166,7 @@ cc_library(
name = "jni",
hdrs = ["@bazel_tools//tools/jdk:jni_header"] + select({
"//src/conditions:linux_x86_64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
+ "//src/conditions:linux_ppc": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
"//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
"//conditions:default": [],
@@ -172,6 +174,7 @@ cc_library(
includes = ["../../../../../../../../../external/bazel_tools/tools/jdk/include"] + select({
# Remove these crazy prefixes when we move this rule.
"//src/conditions:linux_x86_64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
+ "//src/conditions:linux_ppc": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:darwin": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/darwin"],
"//src/conditions:windows": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/win32"],
"//conditions:default": [],
| null | train | val | 2020-02-19T18:11:40 | "2020-01-08T21:00:26Z" | jin | test |
bazelbuild/bazel/10574_10632 | bazelbuild/bazel | bazelbuild/bazel/10574 | bazelbuild/bazel/10632 | [
"timestamp(timedelta=163663.0, similarity=0.9634503299492746)"
] | 539e5f4778cdb3702aa68f27b73e8a3d21c4a5a4 | bc9c3eda453d206bf6c51bf14dfaa067eb85aa89 | [
"Contributions welcome. I expect this'd be easy by simply adding a new entry here:\r\n\r\nhttps://github.com/bazelbuild/bazel/blob/605eaccabe2fed0a1d188d77baa2206f6346becd/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java#L207-L209\r\n\r\ni.e. clone and modify:\r\n\r\nhttps://github.com/bazelbuild/bazel/blob/966dc2328a8565103e514f898673fd8eb037b9c0/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java\r\n",
"Hi, I would like to work on this issue, since I'm new to bazel i might need some guidance in the future. ",
"Hi Aman,\r\n\r\nHappy to hear!. Feel free to reach out to me at any point and I'll offer help as I can (here or [email protected]). ",
"I have updated 'label' to 'label_kind' in https://github.com/bazelbuild/bazel/blob/966dc2328a8565103e514f898673fd8eb037b9c0/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java,\r\n\r\nand added a new entry in https://github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
"Great! I'll respond more on https://github.com/bazelbuild/bazel/pull/10632."
] | [
"Does your PR included a file that defines this class?\r\n",
"Ok, so what I'm reading from your last error report is compilation fails because the parameters you're passing to CqueryThreadsafeCallback's constructor are different than what the constructor expects: https://github.com/bazelbuild/bazel/blob/ebca24c525ec93f34bb65053370376082765d800/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryThreadsafeCallback.java#L48-L53\r\n\r\nThe link above doesn't know what to do with an extra `ConfiguredTargetAccessor` argument.\r\n\r\nBut I just realized something that can make this all simpler! You're already accepting a `TargetAccessor<ConfiguredTarget> accessor` above, and `ConfiguredTargetAccessor` is already an instance of `TargetAccessor`!\r\n\r\nhttps://github.com/bazelbuild/bazel/blob/f2cb3c69413c74569f19232f89a5f0e86d4f15ac/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetAccessor.java#L56\r\n\r\nSo you don't have to pass the new `ConfiguredTargetAccessor configuredTargetAccessor` parameter at all (my bad). Instead, simply call `accessor.getTargetKind()` in `processOutput` below. And there's no need to change anything here in the constructor.\r\n\r\n",
"Following my longer comment: you don't need `configuredTargetAccessor` here or in the above line.",
"Following my longer comment: just change this to `accessor.getTargetKind(configuredTarget)` and I think it'll just work.",
"I don't think you need `showKind` on this line: since it's private to `LabelAndConfigurationOutputFormatterCallback`, `CqueryThreadsafeCallback` doesn't know (or need to know) it exists.\r\n\r\nBut you do want to set the private final field again, i.e. `this.showKind = showKind`.",
"Since most of the lines here and in the other branch are repeated, what if `if (showKind)` just sets some string `result` (or some similar name)? Then you only have to write:\r\n\r\n ...\r\n append(result)\r\n\r\nand all those other lines once.",
"99% of the way there. But this and the line below are going to fail because it's not actually outputting `//$pkg:maple` now, which is what the `label_kind` option does, right?\r\n\r\nFrom the red test results attached to this PR:\r\n\r\nhttps://storage.googleapis.com/bazel-untrusted-buildkite-artifacts/270d91f7-5738-4269-a656-c3c98f7c3550/src/test/shell/integration/configured_query_test/attempt_1.log\r\n\r\nYou can see the actual output looks like:\r\n\r\n sh_library rule \r\n platform rule\r\n constraint_value rule\r\n ...",
"Yea the task what we wanted is being achieved before only. We dont require these two lines, right?"
] | "2020-01-22T11:19:55Z" | [
"P3",
"good first issue",
"team-Configurability"
] | add `label_kind` to `--output` for cquery | `bazel cquery` with `--output label_kind` gives
ERROR: Invalid output format 'label_kind'. Valid values are: label, transitions, proto, textproto, build | [
"src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java"
] | [
"src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java",
"src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java"
] | [
"src/test/shell/integration/configured_query_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
index 61ce4d8e8e9f09..ae05a7050eb013 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java
@@ -219,7 +219,9 @@ private static ImmutableMap<String, BuildConfiguration> getTransitiveConfigurati
cqueryOptions.aspectDeps.createResolver(packageManager, eventHandler);
return ImmutableList.of(
new LabelAndConfigurationOutputFormatterCallback(
- eventHandler, cqueryOptions, out, skyframeExecutor, accessor),
+ eventHandler, cqueryOptions, out, skyframeExecutor, accessor, true),
+ new LabelAndConfigurationOutputFormatterCallback(
+ eventHandler, cqueryOptions, out, skyframeExecutor, accessor, false),
new TransitionsOutputFormatterCallback(
eventHandler,
cqueryOptions,
@@ -486,4 +488,3 @@ public ThreadSafeMutableSet<ConfiguredTarget> createThreadSafeMutableSet() {
SkyQueryEnvironment.DEFAULT_THREAD_COUNT);
}
}
-
diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
index 2de9e3ab8ab48e..14aea6cb2d2b01 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryOptions.java
@@ -45,7 +45,7 @@ public enum Transitions {
effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
help =
"The format in which the cquery results should be printed. Allowed values for cquery "
- + "are: label, textproto, transitions, proto, jsonproto. If you select "
+ + "are: label, label_kind, textproto, transitions, proto, jsonproto. If you select "
+ "'transitions', you also have to specify the --transitions=(lite|full) option.")
public String outputFormat;
diff --git a/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java b/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java
index 0f6bc91bcd11a0..d0279f1ab78bc5 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/cquery/LabelAndConfigurationOutputFormatterCallback.java
@@ -18,25 +18,30 @@
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.analysis.config.CoreOptions.IncludeConfigFragmentsEnum;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
+import com.google.devtools.build.lib.packages.Target;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.TargetAccessor;
import com.google.devtools.build.lib.skyframe.SkyframeExecutor;
import java.io.OutputStream;
/** Default Output callback for cquery. Prints a label and configuration pair per result. */
public class LabelAndConfigurationOutputFormatterCallback extends CqueryThreadsafeCallback {
-
+ private final boolean showKind;
public LabelAndConfigurationOutputFormatterCallback(
ExtendedEventHandler eventHandler,
CqueryOptions options,
OutputStream out,
SkyframeExecutor skyframeExecutor,
- TargetAccessor<ConfiguredTarget> accessor) {
+ TargetAccessor<ConfiguredTarget> accessor,
+ boolean showKind
+ ) {
super(eventHandler, options, out, skyframeExecutor, accessor);
+ this.showKind = showKind;
}
+
@Override
public String getName() {
- return "label";
+ return this.showKind ? "label_kind" : "label";
}
@Override
@@ -44,10 +49,19 @@ public void processOutput(Iterable<ConfiguredTarget> partialResult) {
for (ConfiguredTarget configuredTarget : partialResult) {
BuildConfiguration config =
skyframeExecutor.getConfiguration(eventHandler, configuredTarget.getConfigurationKey());
-
- StringBuilder output =
- new StringBuilder()
- .append(configuredTarget.getLabel())
+ StringBuilder output = new StringBuilder();
+ if(showKind){
+ Target actualTarget = accessor.getTargetFromConfiguredTarget(configuredTarget);
+ output =
+ output
+ .append(actualTarget.getTargetKind());
+ }
+ else if(!showKind){
+ output =
+ output
+ .append(configuredTarget.getLabel());
+ }
+ output = output
.append(" (")
.append(config != null && config.isHostConfiguration() ? "HOST" : config)
.append(")");
@@ -66,4 +80,4 @@ public void processOutput(Iterable<ConfiguredTarget> partialResult) {
addResult(output.toString());
}
}
-}
\ No newline at end of file
+}
| diff --git a/src/test/shell/integration/configured_query_test.sh b/src/test/shell/integration/configured_query_test.sh
index e3019fdc333358..6f73a165636bc5 100755
--- a/src/test/shell/integration/configured_query_test.sh
+++ b/src/test/shell/integration/configured_query_test.sh
@@ -90,6 +90,17 @@ EOF
assert_contains "name: \"//$pkg:japanese\"" output
}
+function test_basic_query_output_labelkind() {
+ local -r pkg=$FUNCNAME
+ mkdir -p $pkg
+ cat > $pkg/BUILD <<EOF
+sh_library(name='maple', deps=[':japanese'])
+sh_library(name='japanese')
+EOF
+
+ bazel cquery --output=label_kind "deps(//$pkg:maple)" > output 2>"$TEST_log" || fail "Expected success"
+}
+
function test_respects_selects() {
local -r pkg=$FUNCNAME
mkdir -p $pkg
| val | val | 2020-01-22T09:11:11 | "2020-01-13T20:49:50Z" | ahumesky | test |
bazelbuild/bazel/10582_10583 | bazelbuild/bazel | bazelbuild/bazel/10582 | bazelbuild/bazel/10583 | [
"timestamp(timedelta=0.0, similarity=0.8435984294146742)"
] | 1c0a9a37623ea4253e9204f9a869a5c0a6538d0f | 0ebce746fc54c3770dd0c8846d847324e5a3e609 | [
"Setting -arch to `\"<architecture>\"` for watchos_arm64_32 certainly seems to be the wrong thing to do. Thank you for the PR, I'll ping some potential reviewers."
] | [] | "2020-01-14T14:05:19Z" | [
"type: bug",
"P2",
"z-team-Apple"
] | Building for arm64_32 fails | ### Description of the problem / feature request:
Building a watch application for arm64_32 results in clang failing with
`clang: error: invalid arch name '-arch <architecture>'`
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build any `watchos_application` target for arm64_32
### What operating system are you running Bazel on?
Macos 10.14.6
### What's the output of `bazel info release`?
release 2.0.0
### Have you found anything relevant by searching the web?
Might be related to #7329 | [
"tools/osx/crosstool/cc_toolchain_config.bzl"
] | [
"tools/osx/crosstool/cc_toolchain_config.bzl"
] | [] | diff --git a/tools/osx/crosstool/cc_toolchain_config.bzl b/tools/osx/crosstool/cc_toolchain_config.bzl
index 12027dadf49442..495edef6d270e2 100644
--- a/tools/osx/crosstool/cc_toolchain_config.bzl
+++ b/tools/osx/crosstool/cc_toolchain_config.bzl
@@ -337,8 +337,7 @@ def _impl(ctx):
else:
cpp_header_parsing_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objc_compile_action = action_config(
action_name = ACTION_NAMES.objc_compile,
flag_sets = [
@@ -370,6 +369,38 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objc_compile_action = action_config(
+ action_name = ACTION_NAMES.objc_compile,
+ flag_sets = [
+ flag_set(
+ flag_groups = [flag_group(flags = ["-arch", "arm64_32"])],
+ ),
+ ],
+ implies = [
+ "compiler_input_flags",
+ "compiler_output_flags",
+ "objc_actions",
+ "apply_default_compiler_flags",
+ "apply_default_warnings",
+ "framework_paths",
+ "preprocessor_defines",
+ "include_system_dirs",
+ "version_min",
+ "objc_arc",
+ "no_objc_arc",
+ "apple_env",
+ "user_compile_flags",
+ "sysroot",
+ "unfiltered_compile_flags",
+ ],
+ tools = [
+ tool(
+ path = "wrapped_clang",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objc_compile_action = action_config(
@@ -603,8 +634,7 @@ def _impl(ctx):
else:
objc_compile_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objcpp_executable_action = action_config(
action_name = "objc++-executable",
flag_sets = [
@@ -666,6 +696,68 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objcpp_executable_action = action_config(
+ action_name = "objc++-executable",
+ flag_sets = [
+ flag_set(
+ flag_groups = [
+ flag_group(flags = ["-stdlib=libc++", "-std=gnu++11"]),
+ flag_group(flags = ["-arch", "arm64_32"]),
+ flag_group(
+ flags = [
+ "-Xlinker",
+ "-objc_abi_version",
+ "-Xlinker",
+ "2",
+ "-fobjc-link-runtime",
+ "-ObjC",
+ ],
+ ),
+ flag_group(
+ flags = ["-framework", "%{framework_names}"],
+ iterate_over = "framework_names",
+ ),
+ flag_group(
+ flags = ["-weak_framework", "%{weak_framework_names}"],
+ iterate_over = "weak_framework_names",
+ ),
+ flag_group(
+ flags = ["-l%{library_names}"],
+ iterate_over = "library_names",
+ ),
+ flag_group(flags = ["-filelist", "%{filelist}"]),
+ flag_group(flags = ["-o", "%{linked_binary}"]),
+ flag_group(
+ flags = ["-force_load", "%{force_load_exec_paths}"],
+ iterate_over = "force_load_exec_paths",
+ ),
+ flag_group(
+ flags = ["%{dep_linkopts}"],
+ iterate_over = "dep_linkopts",
+ ),
+ flag_group(
+ flags = ["-Wl,%{attr_linkopts}"],
+ iterate_over = "attr_linkopts",
+ ),
+ ],
+ ),
+ ],
+ implies = [
+ "include_system_dirs",
+ "framework_paths",
+ "version_min",
+ "strip_debug_symbols",
+ "apple_env",
+ "apply_implicit_frameworks",
+ ],
+ tools = [
+ tool(
+ path = "wrapped_clang_pp",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objcpp_executable_action = action_config(
@@ -1250,8 +1342,7 @@ def _impl(ctx):
else:
cpp_compile_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objcpp_compile_action = action_config(
action_name = ACTION_NAMES.objcpp_compile,
flag_sets = [
@@ -1291,6 +1382,46 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objcpp_compile_action = action_config(
+ action_name = ACTION_NAMES.objcpp_compile,
+ flag_sets = [
+ flag_set(
+ flag_groups = [
+ flag_group(
+ flags = [
+ "-arch",
+ "arm64_32",
+ "-stdlib=libc++",
+ "-std=gnu++11",
+ ],
+ ),
+ ],
+ ),
+ ],
+ implies = [
+ "compiler_input_flags",
+ "compiler_output_flags",
+ "apply_default_compiler_flags",
+ "apply_default_warnings",
+ "framework_paths",
+ "preprocessor_defines",
+ "include_system_dirs",
+ "version_min",
+ "objc_arc",
+ "no_objc_arc",
+ "apple_env",
+ "user_compile_flags",
+ "sysroot",
+ "unfiltered_compile_flags",
+ ],
+ tools = [
+ tool(
+ path = "wrapped_clang",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objcpp_compile_action = action_config(
@@ -1663,8 +1794,7 @@ def _impl(ctx):
else:
preprocess_assemble_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
@@ -1695,6 +1825,37 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objc_archive_action = action_config(
+ action_name = "objc-archive",
+ flag_sets = [
+ flag_set(
+ flag_groups = [
+ flag_group(
+ flags = [
+ "-no_warning_for_no_symbols",
+ "-static",
+ "-filelist",
+ "%{obj_list_path}",
+ "-arch_only",
+ "arm64_32",
+ "-syslibroot",
+ "%{sdk_dir}",
+ "-o",
+ "%{archive_path}",
+ ],
+ ),
+ ],
+ ),
+ ],
+ implies = ["apple_env"],
+ tools = [
+ tool(
+ path = "libtool",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objc_archive_action = action_config(
@@ -1889,8 +2050,7 @@ def _impl(ctx):
else:
objc_archive_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objc_executable_action = action_config(
action_name = "objc-executable",
flag_sets = [
@@ -1956,6 +2116,72 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objc_executable_action = action_config(
+ action_name = "objc-executable",
+ flag_sets = [
+ flag_set(
+ flag_groups = [
+ flag_group(
+ flags = [
+ "-Xlinker",
+ "-objc_abi_version",
+ "-Xlinker",
+ "2",
+ "-fobjc-link-runtime",
+ "-ObjC",
+ ],
+ ),
+ ],
+ with_features = [with_feature_set(not_features = ["kernel_extension"])],
+ ),
+ flag_set(
+ flag_groups = [
+ flag_group(flags = ["-arch", "arm64_32"]),
+ flag_group(
+ flags = ["-framework", "%{framework_names}"],
+ iterate_over = "framework_names",
+ ),
+ flag_group(
+ flags = ["-weak_framework", "%{weak_framework_names}"],
+ iterate_over = "weak_framework_names",
+ ),
+ flag_group(
+ flags = ["-l%{library_names}"],
+ iterate_over = "library_names",
+ ),
+ flag_group(flags = ["-filelist", "%{filelist}"]),
+ flag_group(flags = ["-o", "%{linked_binary}"]),
+ flag_group(
+ flags = ["-force_load", "%{force_load_exec_paths}"],
+ iterate_over = "force_load_exec_paths",
+ ),
+ flag_group(
+ flags = ["%{dep_linkopts}"],
+ iterate_over = "dep_linkopts",
+ ),
+ flag_group(
+ flags = ["-Wl,%{attr_linkopts}"],
+ iterate_over = "attr_linkopts",
+ ),
+ ],
+ ),
+ ],
+ implies = [
+ "include_system_dirs",
+ "framework_paths",
+ "version_min",
+ "strip_debug_symbols",
+ "apple_env",
+ "apply_implicit_frameworks",
+ ],
+ tools = [
+ tool(
+ path = "wrapped_clang",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objc_executable_action = action_config(
@@ -2572,8 +2798,7 @@ def _impl(ctx):
else:
cpp_link_nodeps_dynamic_library_action = None
- if (ctx.attr.cpu == "armeabi-v7a" or
- ctx.attr.cpu == "watchos_arm64_32"):
+ if (ctx.attr.cpu == "armeabi-v7a"):
objc_fully_link_action = action_config(
action_name = "objc-fully-link",
flag_sets = [
@@ -2614,6 +2839,47 @@ def _impl(ctx):
),
],
)
+ elif (ctx.attr.cpu == "watchos_arm64_32"):
+ objc_fully_link_action = action_config(
+ action_name = "objc-fully-link",
+ flag_sets = [
+ flag_set(
+ flag_groups = [
+ flag_group(
+ flags = [
+ "-no_warning_for_no_symbols",
+ "-static",
+ "-arch_only",
+ "arm64_32",
+ "-syslibroot",
+ "%{sdk_dir}",
+ "-o",
+ "%{fully_linked_archive_path}",
+ ],
+ ),
+ flag_group(
+ flags = ["%{objc_library_exec_paths}"],
+ iterate_over = "objc_library_exec_paths",
+ ),
+ flag_group(
+ flags = ["%{cc_library_exec_paths}"],
+ iterate_over = "cc_library_exec_paths",
+ ),
+ flag_group(
+ flags = ["%{imported_library_exec_paths}"],
+ iterate_over = "imported_library_exec_paths",
+ ),
+ ],
+ ),
+ ],
+ implies = ["apple_env"],
+ tools = [
+ tool(
+ path = "libtool",
+ execution_requirements = ["requires-darwin"],
+ ),
+ ],
+ )
elif (ctx.attr.cpu == "ios_arm64" or
ctx.attr.cpu == "tvos_arm64"):
objc_fully_link_action = action_config(
| null | val | val | 2020-01-14T14:51:02 | "2020-01-14T13:31:10Z" | AlessandroPatti | test |
bazelbuild/bazel/10621_10646 | bazelbuild/bazel | bazelbuild/bazel/10621 | bazelbuild/bazel/10646 | [
"timestamp(timedelta=1.0, similarity=0.876917838799279)"
] | 5b956632c436492545a5be5b13765700b8a01b5f | cac23920a6be380d4a408d1f2c36fdf4ad330b34 | [
"Thanks for the report.\r\nI can repro locally, with a trivial cc_test.\r\n\r\nfoo/BUILD:\r\n```\r\ncc_test(name = \"x\", srcs = [\"x.cc\"])\r\n```\r\n\r\nfoo/x.cc:\r\n```\r\nint main() { return 0; }\r\n```\r\n\r\n```\r\nbazel run //foo:x\r\n(...)\r\nExecuting tests from //foo:x\r\n-----------------------------------------------------------------------------\r\nERROR(tools/test/windows/tw.cc:462) value: 2 (0x00000002), arg: c:\\_bazel\\ansasmbz\\execroot\\__main__\\bazel-out\\x64_windows-fastbuild\\bin\\foo\\x.exe.runfiles\\__main__: Could not chdir\r\n```\r\n\r\nYour root cause analysis seems correct.",
"I have a fix for this.\r\n\r\nThe bug affects Linux too when using `--enable_runfiles=no`.",
"Thanks for the quick fix @laszlocsomor !",
"You're welcome! ETA for the fix is Bazel 2.1.0.",
"@laszlocsomor Just curious, did #10646 make it to Bazel 2.1.0? I was having this problem today on 2.1.0 and was wondering if it is a new issue or simply need to wait until 2.2.0 or something.\r\n",
"@coryan : It didn't; the baseline for 2.1.0 was 41ec5a28fb30a8d6c5c60194c4bb29528352cf78 from Jan 8 while #10646 was merged as 02ce5bd3d987b0a3474c1aa9e2450c70e71ab5d6 on Jan 28.\r\n\r\nIt will be in 2.2.0, whose baseline is 78055efad0917b848078bf8d97b3adfddf91128d from Feb 13."
] | [] | "2020-01-24T11:33:06Z" | [
"type: bug",
"P2",
"area-Windows",
"team-OSS"
] | `bazel run` before `bazel test` fails with `Could not chdir` on Windows | ### Description of the problem / feature request:
On Windows, if you run a test target with `bazel run` before you run that same test with `bazel test` (after a clean) then the test will fail with `Could not chdir` on Windows.
This was originally reported in #7387 and marked as resolved so it may have regressed as I'm seeing this in Bazel 2.0.0.
The culprit is that under Windows with runfiles not enabled by default, `bazel run` does not create the root workspace directory in the runfiles directory (`/path/to/test.runfiles/my_workspace_name`) while `bazel test` does. If you run `bazel test` first then `bazel run` will succeed for that test from then on as that directory is present under the test runfiles.
The error happens with both the default `--incompatible_windows_native_test_wrapper` and `--noincompatible_windows_native_test_wrapper` (although the error output is slightly different):
```
-----------------------------------------------------------------------------
ERROR(tools/test/windows/tw.cc:462) value: 2 (0x00000002), arg: c:\users\gmago\_bazel~1\wpufrwit\execroot\build_~1\bazel-out\x64_windows-fastbuild\bin\internal\linker\test\unit_tests.bat.runfiles\build_bazel_rules_nodejs: Could not chdir
```
in the first case, and
```
external/bazel_tools/tools/test/test-setup.sh: line 147: cd: /c/users/gmago/_bazel~1/wpufrwit/execroot/build_~1/bazel-out/x64_windows-fastbuild/bin/internal/linker/test/unit_tests.bat.runfiles/build_bazel_rules_nodejs: No such file or directory
Could not chdir /c/users/gmago/_bazel~1/wpufrwit/execroot/build_~1/bazel-out/x64_windows-fastbuild/bin/internal/linker/test/unit_tests.bat.runfiles/build_bazel_rules_nodejs
```
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
On Windows with Bazel 2.0.0, run any test target with `bazel run` on a clean clone or after a bazel clean before running that test target with `bazel test`.
### What operating system are you running Bazel on?
Windows 10 Pro
### What's the output of `bazel info release`?
```
C:\Users\gmago\google\rules_nodejs>bazel info release
INFO: Invocation ID: 1ecaee15-b295-461c-9656-0c5fe8418002
release 2.0.0
```
### Any other information, logs, or outputs that you want to share?
The work-around is simply to run `bazel test` first but it would be convenient if the root workspace directory was created in the runfiles folder under `bazel run` as well.
//cc @devversion | [
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java"
] | [
"src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java"
] | [
"src/test/shell/bazel/BUILD",
"src/test/shell/bazel/run_test.sh",
"src/test/shell/integration/run_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
index 3fa05a91f638bd..6be15b3c5b205a 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
@@ -567,11 +567,23 @@ private static Path ensureRunfilesBuilt(
workingDir = workingDir.getRelative(runfilesSupport.getRunfiles().getSuffix());
}
+ // Always create runfiles directory and the workspace-named directory underneath, even if we
+ // run with --enable_runfiles=no (which is the default on Windows as of 2020-01-24).
+ // If the binary we run is in fact a test, it will expect to be able to chdir into the runfiles
+ // directory. See https://github.com/bazelbuild/bazel/issues/10621
+ try {
+ runfilesSupport
+ .getRunfilesDirectory()
+ .getRelative(runfilesSupport.getWorkspaceName())
+ .createDirectoryAndParents();
+ } catch (IOException e) {
+ throw new EnvironmentalExecException(e);
+ }
+
// When runfiles are not generated, getManifest() returns the
// .runfiles_manifest file, otherwise it returns the MANIFEST file. This is
// a handy way to check whether runfiles were built or not.
if (!RUNFILES_MANIFEST.matches(manifest.getFilename())) {
- // Runfiles already built, nothing to do.
return workingDir;
}
| diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 1a2efa50a50123..98dccd0264d092 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -1230,3 +1230,10 @@ sh_test(
data = [":test-deps"],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
+
+sh_test(
+ name = "run_test",
+ srcs = ["run_test.sh"],
+ data = [":test-deps"],
+ deps = ["@bazel_tools//tools/bash/runfiles"],
+)
diff --git a/src/test/shell/bazel/run_test.sh b/src/test/shell/bazel/run_test.sh
new file mode 100755
index 00000000000000..c43135411bceec
--- /dev/null
+++ b/src/test/shell/bazel/run_test.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# Copyright 2020 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# --- begin runfiles.bash initialization ---
+# Copy-pasted from Bazel's Bash runfiles library (tools/bash/runfiles/runfiles.bash).
+set -euo pipefail
+if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
+ if [[ -f "$0.runfiles_manifest" ]]; then
+ export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest"
+ elif [[ -f "$0.runfiles/MANIFEST" ]]; then
+ export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST"
+ elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
+ export RUNFILES_DIR="$0.runfiles"
+ fi
+fi
+if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
+ source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
+elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
+ source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
+ "$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
+else
+ echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
+ exit 1
+fi
+# --- end runfiles.bash initialization ---
+
+source "$(rlocation "io_bazel/src/test/shell/integration_test_setup.sh")" \
+ || { echo "integration_test_setup.sh not found!" >&2; exit 1; }
+
+case "$(uname -s | tr [:upper:] [:lower:])" in
+msys*)
+ declare -r is_windows=true
+ ;;
+*)
+ declare -r is_windows=false
+ ;;
+esac
+
+if "$is_windows"; then
+ export MSYS_NO_PATHCONV=1
+ export MSYS2_ARG_CONV_EXCL="*"
+fi
+
+# ------------------------------------------------------------------------------
+# TESTS
+# ------------------------------------------------------------------------------
+
+# Regression test for https://github.com/bazelbuild/bazel/issues/10621
+function test_running_test_target_with_runfiles_disabled() {
+ local -r pkg="pkg${LINENO}"
+ mkdir $pkg
+ cat >$pkg/BUILD <<eof
+load(":my_test.bzl", "my_test")
+my_test(name = "x")
+eof
+ if "$is_windows"; then
+ local -r IsWindows=True
+ else
+ local -r IsWindows=False
+ fi
+ cat >$pkg/my_test.bzl <<eof
+def _impl(ctx):
+ # Extension needs to be ".bat" on Windows, so that Bazel can run the test's
+ # binary (the script) as a direct child process.
+ # Extension doesn't matter on other platforms.
+ out = ctx.actions.declare_file("%s.bat" % ctx.label.name)
+ ctx.actions.write(
+ output = out,
+ content = "@echo my_test" if $IsWindows else "#!/bin/bash\necho my_test\n",
+ is_executable = True,
+ )
+ return [DefaultInfo(executable = out,
+ files = depset([out]),
+ default_runfiles = ctx.runfiles([out]))]
+
+my_test = rule(
+ implementation = _impl,
+ test = True,
+)
+eof
+ bazel run --enable_runfiles=no $pkg:x >&$TEST_log || fail "expected success"
+ bazel run --enable_runfiles=yes $pkg:x >&$TEST_log || fail "expected success"
+}
diff --git a/src/test/shell/integration/run_test.sh b/src/test/shell/integration/run_test.sh
index db64d7881e3992..cfe0e5b38340b9 100755
--- a/src/test/shell/integration/run_test.sh
+++ b/src/test/shell/integration/run_test.sh
@@ -115,10 +115,6 @@ function test_run_py_binary() {
}
function test_run_py_test() {
- if "$is_windows"; then
- # TODO(laszlocsomor): fix this test on Windows, and enable it.
- return
- fi
write_py_files
bazel run //py:test >& $TEST_log || fail "Expected success"
expect_log_once 'Hello, Python World'
| test | val | 2020-01-24T12:01:13 | "2020-01-21T00:50:27Z" | gregmagolan | test |
bazelbuild/bazel/10735_11030 | bazelbuild/bazel | bazelbuild/bazel/10735 | bazelbuild/bazel/11030 | [
"timestamp(timedelta=0.0, similarity=0.8570088458054608)"
] | 7c4d35d7dd71717a0ee59d7e614326818e49c371 | 6d0ab951fe6a8cc9c8db5136760b890cdff07c85 | [
"I'm interested in seeing this happen. Bazel remote execution currently doesn't support a lot of authentication options out of the box, and I can think of use cases where this is more appropriate than Google access tokens."
] | [] | "2020-03-26T20:56:39Z" | [
"untriaged",
"team-Remote-Exec"
] | FR: mutual tls auth for remote cache/executor | ### Description of the problem / feature request:
I was under impression that [--tls_certificate](https://docs.bazel.build/versions/2.0.0/command-line-reference.html#flag--tls_certificate) can be used for mutual tls, but in code I see that it only configures trusted CA certs: [GoogleAuthUtils.java#L117](https://github.com/bazelbuild/bazel/blob/2.1.0/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java#L117)
In code it only uses `trustManager`, while mutual tls requires `keyManager` to set up client cert and private key. Example https://github.com/grpc/grpc-java/issues/4004#issuecomment-360576997
### Feature requests: what underlying problem are you trying to solve with this feature?
I need to use remote cache grpcs with mutual tls auth
### What operating system are you running Bazel on?
Debian 10
### What's the output of `bazel info release`?
release 2.1.0
| [
"src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java",
"src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java",
"src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java",
"src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java"
] | [
"src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java",
"src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java",
"src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java",
"src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java"
] | [
"src/test/shell/bazel/remote/BUILD",
"src/test/shell/bazel/remote/remote_execution_tls_test.sh",
"src/test/testdata/test_tls_certificate/ca.crt",
"src/test/testdata/test_tls_certificate/client.crt",
"src/test/testdata/test_tls_certificate/client.pem",
"src/test/testdata/test_tls_certificate/server.crt",
"src/test/testdata/test_tls_certificate/server.pem"
] | diff --git a/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java b/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
index c5ab8a2d19b6da..cd0d8ff4701a60 100644
--- a/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/authandtls/AuthAndTLSOptions.java
@@ -90,10 +90,30 @@ public class AuthAndTLSOptions extends OptionsBase {
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
- help = "Specify the TLS client certificate to use."
+ help = "Specify a path to a TLS certificate that is trusted to sign server certificates."
)
public String tlsCertificate;
+ @Option(
+ name = "tls_client_certificate",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Specify the TLS client certificate to use; you also need to provide a client key to "
+ + "enable client authentication."
+ )
+ public String tlsClientCertificate;
+
+ @Option(
+ name = "tls_client_key",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Specify the TLS client key to use; you also need to provide a client certificate to "
+ + "enable client authentication."
+ )
+ public String tlsClientKey;
+
@Option(
name = "tls_authority_override",
defaultValue = "null",
diff --git a/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
index 52c81cd5683ca0..db3cec448bbca6 100644
--- a/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java
@@ -33,7 +33,10 @@
import io.netty.channel.kqueue.KQueueDomainSocketChannel;
import io.netty.channel.kqueue.KQueueEventLoopGroup;
import io.netty.channel.unix.DomainSocketAddress;
+import io.netty.handler.ssl.ClientAuth;
import io.netty.handler.ssl.SslContext;
+import io.netty.handler.ssl.SslContextBuilder;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -59,11 +62,12 @@ public static ManagedChannel newChannel(
Preconditions.checkNotNull(target);
Preconditions.checkNotNull(options);
- final SslContext sslContext =
- isTlsEnabled(target) ? createSSlContext(options.tlsCertificate) : null;
+ SslContext sslContext = isTlsEnabled(target)
+ ? createSSlContext(
+ options.tlsCertificate, options.tlsClientCertificate, options.tlsClientKey)
+ : null;
String targetUrl = convertTargetScheme(target);
-
try {
NettyChannelBuilder builder =
newNettyChannelBuilder(targetUrl, proxy)
@@ -104,23 +108,41 @@ private static boolean isTlsEnabled(String target) {
return !target.startsWith("grpc://");
}
- private static SslContext createSSlContext(@Nullable String rootCert) throws IOException {
- if (rootCert == null) {
+ private static SslContext createSSlContext(
+ @Nullable String rootCert,
+ @Nullable String clientCert,
+ @Nullable String clientKey) throws IOException {
+ SslContextBuilder sslContextBuilder;
+ try {
+ sslContextBuilder = GrpcSslContexts.forClient();
+ } catch (Exception e) {
+ String message = "Failed to init TLS infrastructure: " + e.getMessage();
+ throw new IOException(message, e);
+ }
+ if (rootCert != null) {
try {
- return GrpcSslContexts.forClient().build();
+ sslContextBuilder.trustManager(new File(rootCert));
} catch (Exception e) {
- String message = "Failed to init TLS infrastructure: " + e.getMessage();
+ String message = "Failed to init TLS infrastructure using '%s' as root certificate: %s";
+ message = String.format(message, rootCert, e.getMessage());
throw new IOException(message, e);
}
- } else {
+ }
+ if (clientCert != null && clientKey != null) {
try {
- return GrpcSslContexts.forClient().trustManager(new File(rootCert)).build();
+ sslContextBuilder.keyManager(new File(clientCert), new File(clientKey));
} catch (Exception e) {
- String message = "Failed to init TLS infrastructure using '%s' as root certificate: %s";
- message = String.format(message, rootCert, e.getMessage());
+ String message = "Failed to init TLS infrastructure using '%s' as client certificate: %s";
+ message = String.format(message, clientCert, e.getMessage());
throw new IOException(message, e);
}
}
+ try {
+ return sslContextBuilder.build();
+ } catch (Exception e) {
+ String message = "Failed to init TLS infrastructure: " + e.getMessage();
+ throw new IOException(message, e);
+ }
}
private static NettyChannelBuilder newNettyChannelBuilder(String targetUrl, String proxy)
diff --git a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java
index e4bd8de2745acb..0bd37913aa0d9f 100644
--- a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java
+++ b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java
@@ -63,6 +63,7 @@
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
+import io.netty.handler.ssl.ClientAuth;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.SslProvider;
import java.io.File;
@@ -176,10 +177,14 @@ public Server startServer() throws IOException {
}
private SslContextBuilder getSslContextBuilder(RemoteWorkerOptions workerOptions) {
- SslContextBuilder sslClientContextBuilder =
+ SslContextBuilder sslContextBuilder =
SslContextBuilder.forServer(
new File(workerOptions.tlsCertificate), new File(workerOptions.tlsPrivateKey));
- return GrpcSslContexts.configure(sslClientContextBuilder, SslProvider.OPENSSL);
+ if (workerOptions.tlsCaCertificate != null) {
+ sslContextBuilder.clientAuth(ClientAuth.REQUIRE);
+ sslContextBuilder.trustManager(new File(workerOptions.tlsCaCertificate));
+ }
+ return GrpcSslContexts.configure(sslContextBuilder, SslProvider.OPENSSL);
}
private void createPidFile() throws IOException {
diff --git a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
index 78141a1493716c..c7ed60d85b9125 100644
--- a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
+++ b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
@@ -168,6 +168,16 @@ public class RemoteWorkerOptions extends OptionsBase {
help = "Specify the TLS private key to be used.")
public String tlsPrivateKey;
+ @Option(
+ name = "tls_ca_certificate",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Specify a CA certificate to use for authenticating clients; setting this implicitly "
+ + "requires client authentication (aka mTLS).")
+ public String tlsCaCertificate;
+
private static final int MAX_JOBS = 16384;
/**
| diff --git a/src/test/shell/bazel/remote/BUILD b/src/test/shell/bazel/remote/BUILD
index d3848dd90c28d1..0aa83be1c615dd 100644
--- a/src/test/shell/bazel/remote/BUILD
+++ b/src/test/shell/bazel/remote/BUILD
@@ -47,6 +47,20 @@ sh_test(
size = "large",
timeout = "eternal",
srcs = ["remote_execution_tls_test.sh"],
+ args = ["--tls"],
+ data = [
+ "//src/test/shell/bazel:test-deps",
+ "//src/test/testdata/test_tls_certificate",
+ "//src/tools/remote:worker",
+ ],
+)
+
+sh_test(
+ name = "remote_execution_mtls_test",
+ size = "large",
+ timeout = "eternal",
+ srcs = ["remote_execution_tls_test.sh"],
+ args = ["--mtls"],
data = [
"//src/test/shell/bazel:test-deps",
"//src/test/testdata/test_tls_certificate",
diff --git a/src/test/shell/bazel/remote/remote_execution_tls_test.sh b/src/test/shell/bazel/remote/remote_execution_tls_test.sh
index c9205b93caeeee..2436acbc4c2fa9 100755
--- a/src/test/shell/bazel/remote/remote_execution_tls_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_tls_test.sh
@@ -23,12 +23,22 @@ source "${CURRENT_DIR}/../../integration_test_setup.sh" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }
cert_path="${BAZEL_RUNFILES}/src/test/testdata/test_tls_certificate"
+client_mtls_flags=
+enable_mtls=0
+if [[ $1 == "--mtls" ]]; then
+ enable_mtls=1
+ client_mtls_flags="--tls_client_certificate=${cert_path}/client.crt --tls_client_key=${cert_path}/client.pem"
+fi
function set_up() {
work_path=$(mktemp -d "${TEST_TMPDIR}/remote.XXXXXXXX")
cas_path=$(mktemp -d "${TEST_TMPDIR}/remote.XXXXXXXX")
pid_file=$(mktemp -u "${TEST_TMPDIR}/remote.XXXXXXXX")
attempts=1
+ mtls_flag=
+ if [[ $enable_mtls == 1 ]]; then
+ mtls_flag=--tls_ca_certificate="${cert_path}/ca.crt"
+ fi
while [ $attempts -le 3 ]; do
(( attempts++ ))
worker_port=$(pick_random_unused_tcp_port) || fail "no port found"
@@ -38,6 +48,7 @@ function set_up() {
--cas_path=${cas_path} \
--tls_certificate="${cert_path}/server.crt" \
--tls_private_key="${cert_path}/server.pem" \
+ $mtls_flag \
--pid_file="${pid_file}" >& $TEST_log &
local wait_seconds=0
until [ -s "${pid_file}" ] || [ "$wait_seconds" -eq 15 ]; do
@@ -82,10 +93,25 @@ function test_remote_grpcs_cache() {
bazel build \
--remote_cache=grpcs://localhost:${worker_port} \
--tls_certificate="${cert_path}/ca.crt" \
+ ${client_mtls_flags} \
//a:foo \
|| fail "Failed to build //a:foo with grpcs remote cache"
}
+# Tests that bazel fails if no client cert is provided but the server requires one.
+function test_mtls_fails_if_client_has_no_cert() {
+ # This test only makes sense when we test mtls.
+ [[ $enable_mtls == 1 ]] || return 0
+ _prepareBasicRule
+
+ bazel build \
+ --remote_cache=grpcs://localhost:${worker_port} \
+ --tls_certificate="${cert_path}/ca.crt" \
+ //a:foo 2> $TEST_log \
+ && fail "Expected bazel to fail without a client cert" || true
+ expect_log "ALERT_HANDSHAKE_FAILURE"
+}
+
function test_remote_grpc_cache() {
# Test that if default scheme for --remote_cache flag, remote cache works.
_prepareBasicRule
@@ -93,6 +119,7 @@ function test_remote_grpc_cache() {
bazel build \
--remote_cache=localhost:${worker_port} \
--tls_certificate="${cert_path}/ca.crt" \
+ ${client_mtls_flags} \
//a:foo \
|| fail "Failed to build //a:foo with grpc remote cache"
}
@@ -104,6 +131,7 @@ function test_remote_https_cache() {
bazel build \
--remote_cache=https://localhost:${worker_port} \
--tls_certificate="${cert_path}/ca.crt" \
+ ${client_mtls_flags} \
//a:foo \
|| fail "Failed to build //a:foo with https remote cache"
}
@@ -115,6 +143,7 @@ function test_remote_cache_with_incompatible_tls_enabled_removed_grpc_scheme() {
bazel build \
--remote_cache=grpc://localhost:${worker_port} \
--tls_certificate="${cert_path}/ca.crt" \
+ ${client_mtls_flags} \
//a:foo \
&& fail "Expected test failure" || true
}
diff --git a/src/test/testdata/test_tls_certificate/ca.crt b/src/test/testdata/test_tls_certificate/ca.crt
index 0fd16e726bc1be..73d3ae5e7dce91 100644
--- a/src/test/testdata/test_tls_certificate/ca.crt
+++ b/src/test/testdata/test_tls_certificate/ca.crt
@@ -1,27 +1,29 @@
-----BEGIN CERTIFICATE-----
-MIIEpjCCAo4CCQC/fnOdyO3rEzANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls
-b2NhbGhvc3QwIBcNMTkwNDI1MDY1NjE0WhgPMjk5OTA2MjYwNjU2MTRaMBQxEjAQ
-BgNVBAMMCWxvY2FsaG9zdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
-AMe3Q+mfCbfu85lmuUBUd7aQA+kRDtR5K3Rup3cQy6E+k/6eE5D76aTVxVr1HtkY
-1SBs7k2HzbmbNlB5Kfk1IkugIR1F6WAXUpjv6YaWm1TRkSKVFc/pX4pSiNEw6ERu
-Qer4ncakIqBUOG31XGX18n1pFcvwaBT0F8YJe3T8X0/JXDdPEJi6NqOyiok9K/dl
-uTQCeM6Qoh7FC3HXYOnniiE3FnnNT2yciS3JVsFkDdbzh7NUhqLLqXVOf9T0lOVV
-JPfmhQ8EQhJ+PjSPjlwdHMRBHZRyMd6ussie3wXSMAkIcQnV2sC/5D6GEmpwxx7y
-RPFewBbzzFDm+U5x0irqgpLN9i8wRMtQGrKMNZUYB0kItqhTvFEvXn/ls4LjEVjk
-veBL4FTD1R3igzlapZEXVcI4GCghWrxuVMZ6CJFe4VXdFVaHOhra9QDVnJNuyp/q
-a14qBThQjtZMoCxbaM7WAS/Lmr6v6djE72ouA3MZeNc1d4SbigBZUtBuD1Ag4PV3
-aGLlC8pqCWVTOTOPwGdlp9saiXUQQmZ5RTZYdQGBER/fr7CDZ1swSUq1Mr/ZkUi0
-NP2npbh8aHzI8jcCPpC3oD/V89fCDvSbus3NYDvAA2NWTkDs1f8tCDwtsxroPAin
-Tr8Hn9DsTbleGOw3V3NX/1MPHWbasW5gIbtNQ1ydEaePAgMBAAEwDQYJKoZIhvcN
-AQELBQADggIBAIHBTWA3pPyUUVBUcMkojsdGmLAXuOHBOkui9hPNF/7GRkgQY6Ut
-JwqE9ihfZKoCGRyyM45OYGMik6AhscaQvkSy+80UScqasnJwPw7Y2vKwoieo7qw9
-Vp4DAZx1wQND+2M/MlfwROIsZH/usxs1NxIEXCPVzDFbymZSTnGliNraU8yXptxi
-XfOrcAQyjHisI3LVAuinCgsZDSqShPe+ReuWtTv5xP/Pbe8Fkyt3UF4EU8f4dCEh
-9Fpc2YjeZ+5ONx8HqFlo43GAGgoBUGQnVcIC7FVuxF/QaW/So6Tocjo7HyWMV6SK
-FQBL5xpz1AzCLlao2cwYGlIDwsGPLu0/r2WW9lgr0CkL5fnwR3cVb3z6BoezrM1P
-Qc/HMkfbyrvznf9SOarZorQbB9ZNE3WvOK7y9Zx9C5gldzdrdPDkBEWpyYwYzVU2
-XyyRwjjqA0mGCaQoZr1opXNjg/HDt1e3b4p0Od6GRE9mVOTJE5gSh2h5E+VESMtw
-7zuVX6yETnPXJOqeuxZPo5mF98wGXcqAf7/BVuA4kedXEeLRiTH8gC61tckg/O5E
-tLwnxoiNedQVEz0jZT1j3Rh1RkCeMlOYms6giXdOGSci2xmvp9nvqLS0jXURXVQI
-+OlnwnFkeN69ZUOngnnmR3ryTo9kZ6g9ZDxlaq/pp+tKzsvBXRaQOeD1
+MIIFCzCCAvOgAwIBAgIUAvwhUW/jI758b48+1cbMdr62VTIwDQYJKoZIhvcNAQEL
+BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTIwMDMyNjIwMTgxMloYDzMwMDAw
+NTI4MjAxODEyWjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDpcPmUZnp6NAqidLwU/ygtPjbTNU95Lfv7NX1hc2ef
+iXmmj1aIZYAT99LWVZ6h/RdraJrZjrGQr7D+vcDGuZfDMJwE6Vycz9OmDJFlzK94
+r7YzgQpb6DwyjRFOnpTiT9bb7CD6L4aNkxE+EhTDPb2h2VQuIKtxqGBELHE4TaP5
+brWGY1BdISSCin+cTTtEw5Jf2BK0giQddDua4vS5lLbbc3j2KhzHI283tuYWFm1O
+ZoZV7tiR+H7cMaywgVMAeWA7P9kjNtGZlQc4vLuMQSZ11iuuhc2smyIhR1ttjLG0
+2qi3KBaKZA68Q+ALQDScJ/t6lRwv0LghuB1eAH45Hg9VonKL5I1RfN7ZeYle/8Kp
+Y0L66J7U5P+uzHPczIKFG10ncy3UDwDYZA9bIlGD3K7Wn11JzrMtcMmPDJClKkur
++YZ4uhCSZ9txbOJBlNZWVUfWVOB3I6dUnCXp3WEfCU1250hK2vW8FaiSx4o7eSXz
+gHxXjNajcVNTDvyzZ2NGzL8ZW0DRh1naJBTkvfr+5+Qs+r63E51AhfvbHxxZuq+i
+i8eLifqO+//1Bgg7pyazxLObTAsxzH1KKFJuhox0VFABByb4rNMm9fIEM59X62iz
+UbYHibPECdoNMZ4AyFZOmtw14jX4u9EuRqQeI5sP033EdWuzJ/ZISuGnIRcdODSQ
+MQIDAQABo1MwUTAdBgNVHQ4EFgQUwEneLh3hfnfz+VYwLgNfH7Fq4b8wHwYDVR0j
+BBgwFoAUwEneLh3hfnfz+VYwLgNfH7Fq4b8wDwYDVR0TAQH/BAUwAwEB/zANBgkq
+hkiG9w0BAQsFAAOCAgEAC/3Z422v2HGT23dic7Hjx5SZFvqwBv2Se2YGQrd1CfHz
+aY2JdQ6zyeO9v/PBqXndSH2+f5+rnRrx/WenEiLWeGLlNTcEpYUljKsomiHj9QdS
+tk9Heuoq6iR/soRNBnym42SP2ZggxoKK7+yhjTj6e3jR0PwK0crHljqgHEQ0SA0O
+XhsaoiMvhczseAX6QRNrwysCDcX3qC9YQ/S1Ycx2NaBLBs+SKh8k59v/E6xPylZh
+rFciMUhGqYvLZoZ5ma0LdeKvSbG/OLU5ly+25gxD3OUY0rnZl6J/s/QlQsS/YhKe
+oNI5ftyhltrzpOgwQdFxHRSDVqw1c5fe8faJWzbEQo75PytsXLU6/v9xGSvkQi0p
+fnLPEilmhUFunO7V8ouRfGKJ17iPpdQzYokvjQSf8qLPB+Ig8GYdptAUeB31Yt+3
+3uP1SXGBsxTjGvjPUAvK55DINl4PCqnzKWyGpVZaJA40idxLynJQpZTO1MGIuAtY
+Jb1VsLPLNxCkSyzpdEaCIxpbKFpVantzBDtrqA44bW3/57oEclcSMHR0phvQOj0z
+nDHYTqOqdmGNOrcgRhLsNKGjZzCkfSowxuoliAdeRsR0WiAXwEz2JApfTUhDBrG7
+ZR/U/V6PNTWsGsXg4sC9PN+b6TkMlysFHBAzAbHV+lEywRY3t6ssTPRuptiNVKU=
-----END CERTIFICATE-----
diff --git a/src/test/testdata/test_tls_certificate/client.crt b/src/test/testdata/test_tls_certificate/client.crt
new file mode 100644
index 00000000000000..4a51444a800924
--- /dev/null
+++ b/src/test/testdata/test_tls_certificate/client.crt
@@ -0,0 +1,27 @@
+-----BEGIN CERTIFICATE-----
+MIIEnjCCAoYCAQEwDQYJKoZIhvcNAQELBQAwFDESMBAGA1UEAwwJbG9jYWxob3N0
+MCAXDTIwMDMyNjIwMTgxNFoYDzMwMDAwNTI4MjAxODE0WjAUMRIwEAYDVQQDDAls
+b2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDF54vGUHKl
+cxyM6S1FHpReStov6FWvhw1FMi54nkU81aqIOu53shmYM0bbqU2jLKO2wDKG+0Yn
+yAMJ/mYeoW3hTSyN6E+Ppa7hzO5pUEE8Bl33c3sECF85YcvHfVdPZjkd6T4bK09h
+c/VJGKUTgR0f79SrFxYx9OuMa2Z0R9/0+P99tbECN18rD9nJGBFEcXPr1BNJvED7
+U6d8TujcRS5crsdEsUH31O7y1X5lhpul3wtoGPjj9voue8QtfhDjji3f7tdIGRgu
+46qc+THxemFKLrXNwJHP82t0sL6ySZ6e/ZodEN2TXdBB2xtEQppAwmLLRx7sCpqf
+FdQ3ZIanlJXjr9JOMhOioxCtq0F6ZYyDnpXJ6qzBZYOjDdy27MEMo7r0SlOTycnh
+GfML6GMH4ojgVicOZsIQgQ/8/tHkQKGD5+I9FuhHTKccIRlHqRGW3EvgFWigxY4/
+nO3/henKlIjn2OywYWR4ROHDkRBN9xwDWGWGMy2ljVqdyTmzGYldNopvJUY2Ux6G
+FZyeoy3NWjIcKVHzNj+UN9kWSpycB37SbWhTm5V1FXoiH5p6eJAcWr2zLlTRlq6e
+5v2Vt47e8DQz9h6d0rniEPQp72RTkyGc5nAgqambGx3MjfCbOUyJZxRlRd+sylPM
+qugkM/Vhg1wq52VsRBr6nbGG2b4urM9jYwIDAQABMA0GCSqGSIb3DQEBCwUAA4IC
+AQAk0TEreEfh0QeZeXHtY1c3w9A5TPbyThTheUVWDLYNXhv9usKACQ4/jlG3Ybat
+2Pxo4xedTQ89xF19CCmB4lthAF2onwYavY+hZOC7IVEfCoA6jZgGpwaw3I0ptug0
+BrQqnBEZFmC8aHqDEgJLgP2tASMQUTl0deNX1rtjvIodaUjPEdyO3QlvPpfq13BM
+y544gYy6ppewjDPnObpDz+FrLoNcA5VPIaimgIF8sBcnd/KDC+WJiE5aEHUFKvD2
+aAt23bTRyrwFtyDmEwvZTh44Kyy+FpeJb8Mud+lEcAeb7FpCQkq/Z4JKf5Lq9SZ9
+of/uKThVW5152l+c8t9E6WveDM30lzu3jqUz8RX3li6yb97xPhrKpMxHzh2iJ9AB
+MD8u7S7HLllPkXuyEOpLg03XlLS/XzRg+FWm7NcpKhe4v17j0/KgoAaKhdkbLJLZ
+vRojvfk+3sQG/R/i92YuqHJ+FzNwqVKJuE1/g737ecuiu8sPSF/ow7w5YaAw3ffo
+FYGHUyZTDKYDj7jcbMAxh9VeKhpvIfIdtNP6mbG1IQ4H18G1q+z7TL8HP5ngwPWP
+HtO4Z4I4X9vRZ+R1466gbHd1zyZBdu3/SIgGPD567fOebv9n1rqcC6w6Ltc60hto
+GVMsFbzqGVU/rGXtHcbE0BII1WLRg0+zgPqw6lVahwoJag==
+-----END CERTIFICATE-----
diff --git a/src/test/testdata/test_tls_certificate/client.pem b/src/test/testdata/test_tls_certificate/client.pem
new file mode 100644
index 00000000000000..f48d9348be7aa0
--- /dev/null
+++ b/src/test/testdata/test_tls_certificate/client.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDF54vGUHKlcxyM
+6S1FHpReStov6FWvhw1FMi54nkU81aqIOu53shmYM0bbqU2jLKO2wDKG+0YnyAMJ
+/mYeoW3hTSyN6E+Ppa7hzO5pUEE8Bl33c3sECF85YcvHfVdPZjkd6T4bK09hc/VJ
+GKUTgR0f79SrFxYx9OuMa2Z0R9/0+P99tbECN18rD9nJGBFEcXPr1BNJvED7U6d8
+TujcRS5crsdEsUH31O7y1X5lhpul3wtoGPjj9voue8QtfhDjji3f7tdIGRgu46qc
++THxemFKLrXNwJHP82t0sL6ySZ6e/ZodEN2TXdBB2xtEQppAwmLLRx7sCpqfFdQ3
+ZIanlJXjr9JOMhOioxCtq0F6ZYyDnpXJ6qzBZYOjDdy27MEMo7r0SlOTycnhGfML
+6GMH4ojgVicOZsIQgQ/8/tHkQKGD5+I9FuhHTKccIRlHqRGW3EvgFWigxY4/nO3/
+henKlIjn2OywYWR4ROHDkRBN9xwDWGWGMy2ljVqdyTmzGYldNopvJUY2Ux6GFZye
+oy3NWjIcKVHzNj+UN9kWSpycB37SbWhTm5V1FXoiH5p6eJAcWr2zLlTRlq6e5v2V
+t47e8DQz9h6d0rniEPQp72RTkyGc5nAgqambGx3MjfCbOUyJZxRlRd+sylPMqugk
+M/Vhg1wq52VsRBr6nbGG2b4urM9jYwIDAQABAoICABIIq4ACzK+u8acViH6H7tU4
+1PEQpt473EW18O4k3gJRJh0L4bcej56C7a4Om3iHFNQOZ4xNUXNGkqBSglPAOhcR
+xUGZLcbVPj5tQjxuh8NEgUOPTmJrsOG1u7AOB+rAUewb2QD4zV8ABhYHHOPOHC1Q
+2XxNukQLIXvGPavS8OGN3xpBeEPPb+iopRviCZDHFd0jki5h7Tn5wYVeW3HXDAZ+
+FsJ3tJ801CFkuwPdZEmVLaDqxaNgWiPqO1I57qgNyLhjN1LmloGPVXjAbICoujzc
+TMzXA3KDqAMWKApvEvlB+s0zQD2xisy1fqKVvyCvlfkYHgU8YiKlBpWVn3+d1pqj
+oDYVHFz+ldPm7xVmJy7QFyjUwVpeolJkn15Tgnwt+9YTH/DaTgCRCH7PcTxAyCBx
+NUI0HrdJewE8O+YXnAQD7qblzyyDg+gCEZDJkWXVYpz4HabbdX7eF4P46aLb9E8o
+ryBZHNW0MGghVFCh379d3vt1If8ncUo+oZ+I4jtEevrLiCxNNM9sebhb8MHuth8x
+/AQzvShaAVL82x4RhNn7aG1/0LnkGlAEJeuP9fonUCls+o/eCb1bBj0yKN3CppGV
+ODvwck3eqqpUiC+fAU9fEDtTNseA18uUT5515DT0oekWZpuuqlGkxn4fkw1Qcukq
+ispRRyj9ELRhBlHcZywBAoIBAQD7lCnDCETKs1dERs9w5uZ5VVyUOvFkRgTeR2qL
+LBQhbJve62KAud+F4SAhPk8mXlRY2CooLgh7Jdo/7k6bG40BggRcEw9krOIsVZsx
+jBSh6WlWpckOyfDuWvx/XACRulrb/dSwoOaypY+IZzjVaIwmHYImLBNCmEFpXGE1
+DlDs7s0fKDElA+Xqf3DvgpQDD6s7RvXj6NLE3sWeeDbzIxrGaT5fpHIbwNxrYwDa
+8/X329Evq9n9cot4uHG3lQo4dUg1ljaOFrDoKaOqoyDx2BY2BWTv4yGeQdMVMbnZ
+bzDiA5BJy9igvtZ0UaSxk7Fj/qx+U9fBsGRxvP7tRPIvWeeBAoIBAQDJYefZa6QF
+Kv24pBARbayb0noziw4/dBmv77TaQoItQf9NJHbN/5f/BRFU8c8cV8L5HrwP5lxg
+WdDRL/WEguTl6yjvYmhQ5au5tlkrz5uoRpXVy/lx/lW60VZXEwdT8kD8Uhfdd1EO
+SWR8CeCRpxEasI271wkOjimfp+aeRma0rasBBHqTZKwdsMaUPhc9wU8ldeQgYj10
+nuF37Q6iCUNi/gPn08oDUS/Se7s08v41LESKECdpf30FhW5mQNJWgo34ApwM/G1N
+dkqh7L5pAZRj9bDGi4uCCImrtKUf9vGajDbg/62HHfNWTawAh+MRz0dOqiYU9Qjf
+lHKWc/f1RRzjAoIBABoTlHSTwdWk2zHHiS7xsAf5khwHNAgpvc1wZ5m/WuLQCCQG
+D/K50XJmEFeBxuB6PJHs7gm2I8jn9oRT5i/rniT+3gbRLvJHfTYNNYXgOC9EK1gA
+3SM8SU3bfnqRBboVL9/HoqkgNGlmAceos1pjeMtmmZvtS53GfFk4axb9weOdKQPG
+vblRex5gUUtyJHdgw2XkiA40jsw7Lw6q9T8kb10LgZyWRgGcbvxuiaMoUGF9lmQz
+kufTXKOJsrfNqf6KIY70X/lAXtvhnQZN3FdVB5BX5Mt8pnpp5kA3JEVmYhG7PtR3
+XZ/jyATMhZ6maWes+SIq/J0l9HNZnK7pS5Ue44ECggEBAIABxdhEPbwzOZf2YWhS
+qJdb0OWWjHX1HKbi3bim8gxGmTu14/bJcxpdZEj0c8v2VS75RF1u9mUgckWmEJAs
+i8dCFYEksl5Jv0CLEl9w1ea/B1shDuxQ2LmpexJaPBw2Luy0WgsiXtmP+VmHBcJP
+yeWHOHCgHVetMfQUS9lrsrlCcyJwcGHkaittRKzSUv+kMuUC7QFQsPPCUltiyhxh
+ev4frOfdjdlR7+4BTFw54TB3dRG1dvfuW8/4otZIeesXjZqKPhtbETdd687Fp7sj
+j+mCMN3jscf0GV6VsyiAVc8BNZkLrIfol9bSBHVJ6yJU+WSdbxt/LibAO547FPBJ
+ADUCggEADLlsa1ExGF02R7YywQPS5ksLo1+M+xr2EkqwvPq4O6YP3UAV8N8afMf3
+BIH9f9i3u+a9gAlcHrcy1LY4bjcqWkaA928SkJwCK11kCI2NhmUv9QdxakBKDwqk
+BYdDje5BxQ1x43MUCKcM9x+jCAVlVGFhSr5ytlkBvIvuC1g722GHnS/LFES84vmp
+s1rE2HJGpjb2Ggt881k+Y08KyqBAuuyjwyIWnuMazuZdVRe5tK1d+/nq+MgWXmkY
+bK0OVpWiMJw1Def0aVRZKhxCPeUF2aRthjI4rf0pr8KUC+uvjLNskMULnfN14eEl
+onTQcM9+JyAP+7leDL3gbkWSLPxFJg==
+-----END PRIVATE KEY-----
diff --git a/src/test/testdata/test_tls_certificate/server.crt b/src/test/testdata/test_tls_certificate/server.crt
index 3cfae908acf42d..25a9e8a81ac227 100644
--- a/src/test/testdata/test_tls_certificate/server.crt
+++ b/src/test/testdata/test_tls_certificate/server.crt
@@ -1,27 +1,27 @@
-----BEGIN CERTIFICATE-----
-MIIEnjCCAoYCAQEwDQYJKoZIhvcNAQEFBQAwFDESMBAGA1UEAwwJbG9jYWxob3N0
-MCAXDTE5MDQyNTA2NTcxN1oYDzI5OTkwNjI2MDY1NzE3WjAUMRIwEAYDVQQDDAls
-b2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDQJwu4CLzB
-XHkWUaiW7CpHvUyq8SP3tV3l+havZA+tkdhS+U6mo0xQOIZPSzxmj6xBk7elC42N
-0mKKFZQ9ZkErHjmBT0dy/Djlm2dEN8sCN00n74UMWR/QoBygV2hBGgHLGwQ8/9tY
-eVxXh84xikIPnCvlAzbWHd+2gN1RI6n7fz1Z0nO6mk6Q7hi5x6XtBnz2908o0VEb
-JQYSu0LRL2vu7QYmnJ/1bqM0peq5n+ellCt8qiEmcTcw23jHGqlsyTy9vrJCO0Up
-LKZ2SR9wewbAnImZAPDWytQEVpCP6eEiIdNyDvYsTeoUPECklNUi9Iy25gZPeptC
-x8YWeZGZXen/Nct416bH8VrYqmjhArXfimUiw/TdREOlvVFmcBpuvTKXKVpvuyIf
-XK9mQVg7ITRnXIvJBoapcV0EaaFykCvRMDvGqwiR05da+ZlH6TykJ74BV0y1NFY0
-XJrzhYvGPYF3nP3wDqHd4BJBNecT+26GN5Y3Z0fyBCf52nyhWKU+Cj1bXILNs9wt
-A08HL1B09vFpm8TIBYnUDbQQpYumwiN0qzlRuXOR5AfmvFJoVSFvD0BW4itX0nY+
-3ep5Zia4TRbhYOSHPPaln4RfxEWh8ERh9EU3TAPbqv/Rl0HUL4e3kN32pamRH9+8
-7j2bet8BoDngwgyHFYAtD9j/LtmEhRKSzQIDAQABMA0GCSqGSIb3DQEBBQUAA4IC
-AQBogMIcx+S+X/hZFCLcZIfGCqDjkscnrEM0pMd3xZJq34ETlwB0gnNC6jVjFgmI
-IDcY3ShezLNeMB61p3DPtDm7ILJZgtmtXFzasxuTcvvPg6YPKoz4h1hAmt7BIDDW
-nAxUVdm8mYaU1GVzxgqeWsn38tZtr02IwZxpNn4J/tirs/lCB++NnyaIY0HZUVp9
-3XVa1hPv2R4E4lr1hyqHECU5rllM/qMV8sWdg5TVw/TJa3RFmNL7wXUEGxtrlwb1
-kSVjzq+CvUSIzj6MG9EbPhghEQ/GdbmRileUBA4/LXb48eyP8KMgYhxMEX4HQGoX
-eIMaqzL2T9uod5x+IOJpc8zGFtzxinoqzr3gXXik4PkvW1UXw6GFRt0BWMxtBfyl
-nw6i6qE9D2PnrTKCVw3q/+VruasEAXTSJI9KVlx5N8FjK0tIGN80efASZZZZqRu/
-tpzb5Itt1PXzF6Vu2eKD0WwNgPKex4vkM1DaC2qjUOyDxDpW90Cca7ME20NzcZtH
-Tqh6fNqZGGJ1lqs68ktUk7TpeqWq2Na3wvxX9Vo8OOcg9PNCmtCqz4bwsrvRggZ9
-CHZCKkYKGm39+8+7Kw2lGPjI0OGnjI+H8o4UufnKQO3E7iRbNf4XqSVqdHUd5wq7
-NIcCib5W2vgxYoZ+40NXiJy+ze4zEl4Xureqp1tXjlcjMA==
+MIIEnjCCAoYCAQEwDQYJKoZIhvcNAQELBQAwFDESMBAGA1UEAwwJbG9jYWxob3N0
+MCAXDTIwMDMyNjIwMTgxNFoYDzMwMDAwNTI4MjAxODE0WjAUMRIwEAYDVQQDDAls
+b2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDEtHPdOrBR
+ZLtfRCSeYdgydj/DBZRfCoHm2uZuBblo31pP17sGoo57d/yZNw+naEZIfGVNZDWE
+teBXQyR/zi+8cHelDiV+wLxprc9sCFYgssK/XPY2+iZBx1c00Vz7isK7dGcp/VRn
+ZrypYhCnSoOmg5UmxGCHOdp5xHZdGXJznDLd5pL/PRKlszX8nLa4kKGbbMwYH/bF
+2jHoMGN9ViS+C/cAuRaF5Cj2p9OvywC/9cy1GiincYRE7auMCbBZgF0JueCCCJ7E
+By2coNVXT/Sx2X+pRwM13kV1kcrcIyt8Kt3qk/kfF0wkLkPoHmbkhDb5b4jFiSqf
+BHjzuZfqsFSQ0QLYp0tTMDPe6Jm8PbJXVxEseGfkX5MK73Pxe5pid38xWHA907K/
+K9yCPQGbnUNMNaYlAPb2aMgS0N86Pr9RJUhxX5RaksCpHiod5YA1JQQtsUf36zkq
+USWF4eApCuu2myK8zm+xtWBuI3Njllmcd91ZeMWkVb46alQfbI+n8wy6WcV/NC+E
+on9DUtUfwaetBQ2nWp7MmN1hpA2oypYa8TYDx6ZlbL8vpkW4KpBvlZdYxeE34ltF
+BwsroHL58mLBA712xZMa54GYNe3rKd4waQFhD41RAe1H9Y5PhDJpjEmAXEyTX9FL
+RcHRpAkTdcBDQLy4bLAGXmyK6/L1Bw3kWQIDAQABMA0GCSqGSIb3DQEBCwUAA4IC
+AQCzNiFaGDwv7IT+UHeY3VRuK2xyfIsIx/6lcWXIxonFfemxrWoVQs376aZnuvWO
+NKfowUWkn/OSA3y5lmU6eUOQxMUTBPpYhU5BtiIagqHOl612wBbicmN3j9gOm8tJ
+WxWVq8CV1yg7vOJwnEdkTwEDUhn3jRIDlwr0+pDVoGuB/IplsFq34GCAVjJan9DH
+c+YiJpdB16jkUAM+8N7NM4GCQm6TBfQmK7piMIxVQLAEUmp6jS/1jgYjKHo+hkkb
+qn8K7wePGCJJlRVF6kGSsCKUa12Q7gQKeLGulSA2pDaYnAZmWVKVfGIcKAs0WHr2
+9Spoku2iPSYgd6pWUmIb9rFrF+okiWTwS/xkSu30YkzERZXUp7zSyhiByfc4Z/+r
+UxZW5dbCKJiUtIkNaPmCNTEMgrMBMn4Ikl4otuN1o4BDPVbt7ww2eMz4V2t+cXuE
+FZhh0h8qegA9BX7xqwRg87fZ4pzqUkV8M2QDELCeQUHqTGtYyQJb6iAbPEhT9RUv
+81oT4lZQACVzOezEFUtvihxSg4r5HmXB+XqmWRPV9vvzSPHDQmOXAxqVy6oxAzmE
++YapQymDX7QhFHLkck6KwdGYIHftdrzyN6h9HZUEcErFfPvL/OtP8WYzgVI3a1Pg
+4UStoJkuEH+bbJyEH4c4pMZ9RkU91PN6bvs4lFK4DSQ8Qw==
-----END CERTIFICATE-----
diff --git a/src/test/testdata/test_tls_certificate/server.pem b/src/test/testdata/test_tls_certificate/server.pem
index 8c5606a41445d3..0dec6ed7541f83 100644
--- a/src/test/testdata/test_tls_certificate/server.pem
+++ b/src/test/testdata/test_tls_certificate/server.pem
@@ -1,52 +1,52 @@
-----BEGIN PRIVATE KEY-----
-MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDQJwu4CLzBXHkW
-UaiW7CpHvUyq8SP3tV3l+havZA+tkdhS+U6mo0xQOIZPSzxmj6xBk7elC42N0mKK
-FZQ9ZkErHjmBT0dy/Djlm2dEN8sCN00n74UMWR/QoBygV2hBGgHLGwQ8/9tYeVxX
-h84xikIPnCvlAzbWHd+2gN1RI6n7fz1Z0nO6mk6Q7hi5x6XtBnz2908o0VEbJQYS
-u0LRL2vu7QYmnJ/1bqM0peq5n+ellCt8qiEmcTcw23jHGqlsyTy9vrJCO0UpLKZ2
-SR9wewbAnImZAPDWytQEVpCP6eEiIdNyDvYsTeoUPECklNUi9Iy25gZPeptCx8YW
-eZGZXen/Nct416bH8VrYqmjhArXfimUiw/TdREOlvVFmcBpuvTKXKVpvuyIfXK9m
-QVg7ITRnXIvJBoapcV0EaaFykCvRMDvGqwiR05da+ZlH6TykJ74BV0y1NFY0XJrz
-hYvGPYF3nP3wDqHd4BJBNecT+26GN5Y3Z0fyBCf52nyhWKU+Cj1bXILNs9wtA08H
-L1B09vFpm8TIBYnUDbQQpYumwiN0qzlRuXOR5AfmvFJoVSFvD0BW4itX0nY+3ep5
-Zia4TRbhYOSHPPaln4RfxEWh8ERh9EU3TAPbqv/Rl0HUL4e3kN32pamRH9+87j2b
-et8BoDngwgyHFYAtD9j/LtmEhRKSzQIDAQABAoICAFKCR7jpbbjP6QeZ0tQQRSou
-tUdFUtaLw+63VWqspTJOD4vEWxLexA9AeKzRy91zsfpEjZUUoUXIUVse9qXn9Ikc
-7/p77Hx90ifhk+uMmiIEvcbIwNqGMYBHF1HPk/nKT0+tI97yJIZLhPkFUgx9G3aI
-lzWuMnxpVxZGunPBSU3xv+Xs8AbVx7LXTmHF69WqrrpOichKQHYcFO4z4GZ+/6+z
-sK55g0aMVpE1+3cdFXui4iIGZiGQ2ym4tYVm4iXHFxa3kn2CdQW/NzTIA3hYq/KJ
-mllV8CGUQLp/fcouERmwgtpBZ/9j2xeuUolqnZm/ik+tmm7C0OyFt9WM1tQOUAQs
-0GNJTq/bpnx3igK5qCDrI9nRdVzGHsdZnefKc1QIr/MCEo1kHtFJeHPHGNDIWENW
-UpWfI63dA2yKSBAYSz5ictuELF9Xa2uCX9J/D4nZl/J0SoqvFZ2GxADmGajVugBF
-RlNbgqSjTSFG+5//GvwBESchaAarwtPaLAkK3M/s8z0BO2vOz7RmyicaarwgbBvn
-OBhSOuaIUXAq1qNd3zqpirt+pP6+xo2A+erTqgJ0dGiFDyzhT7anzNA5SVvlBYcg
-89aWHdgwcwXCM3ILzmdq8bPIUAp9wi041Bp15rhnKR7m5ZCg69I1p1PLjp87lM71
-omtJ0lWcy+uAU15akdMZAoIBAQDpUhgkk/v7otTAiY0+G8IKVtudOf0xo8Hz/WWs
-7EpZIxBgv3x15fsHsg09ORbImd8Q4kvgodvcTzOc5pB7Mr2GXty8i0YfEOl6XzKB
-YCAyoI57iNycFu/hfiOuo6pHIe8j2kA3ik5DOxLk3DMyQgCUwpmKZmQT0c62NUMZ
-HTvAwfdYqwNmBRLdlVDGEg9atOa6grqC2HjPUmL+hMKlpx+Fx6sb6oWYZDu+4Efg
-cdzfyhxYIXFydJ+JttWd8bS/A3C01Y13WWJ5Zwe9awh2YrDYX1uT6IB/stwAnpN/
-W/JB0TCkZlkfsRp7nvSLYu3sOjs+8KCcOPu8Ylof5CXrDgJ3AoIBAQDkYqwHvlUN
-Xb86Pavo6tFfIloZMq8U0RGlNXrG+Rm6Z+eTAEyVvnu4ApkD/19N0AGKGdSjkKzb
-xt4gOyU/IxHplu1zCJButVx9PiysXpX12KTlsEP0B2f+JHtirWMPCmPrkFsh8l5h
-Uls7c8eDABE7+UdQrf63OZMYxRRt3liiasvRTg256M79/JYQJBmKu4NC0UhRpRH5
-LwByeY5QIxXGN1JdmDXTFh2A/UEjLlF+9ZklyDXgU2Aljkf6BAuNlsJ1rABvG3nC
-dD0cqO4xVBIacrYTKgL+PULlmTpSdnwILlthEDdxrojj7mZrVPJklzkWsiwVYIEs
-+fZ5TLF/jAHbAoIBAQCZZjAZXHI/bz8Rl14Vh4p74b9iD8435MKP9/nxRylakYMj
-GMJrgVkaJiYuKmqgWQofv6jDd6dloWz9q1kyppmUzqmyDJ99rVDT8+LwzJJettD2
-x3TD6xCr4JL1LwW03sqrd8LgwT3TVfOGJIBEesCHDaqFI+yIW1jc0wfaay3t/Zjx
-4v3JBWzx4knI7/bIXEeWOH0HqetD45bSX9bZspc3DZ+iKv7KwpvFUw/usO3W9LrN
-9q7v4V1C3cJ0pYWAUHK5ce4gmdP0nZipIMXfj+NVXtyG0kYprx6WCaxP/9O3EiI4
-9FGEVJxkyo1dVx22QlLRfsMZ8x0PLlqyvP1xHTThAoIBAQCdn1gZlAwBSJVFLfEq
-tH3CCeRjBa7+T/i8q/dLwfo2w6V4uDkjFC8w5WIT9zkgbBHT7VXreVtD57HATvG6
-7IpdTBQfU2bTcYoeyj1szW70GQxdldSgZEgqh6U8imwWolYp6xxqhmsLAhsDIjot
-OGusl7PXg+6LKEpUSxh5Z36GwexfTV5906agdqZfB3s1W4sRH32pE6Me9oh5eVl2
-B3Dst5u6CuYDBH1iW+eLz1jhpcGH6PD+HKz73oHglNAgbU9ShV5bUHwtb6oJ0LFs
-DBjedhMhkNo1+7Pi4Gj3Jt0djFj22YlahVnm7c9z/lG4iQIWnut76Xndv7qTJxJN
-9CQHAoIBAD0Lf4U/LI2BeWmGUeCZs70EWg5eKjcfDPq4yscl+ga3q1STO3A7kzJp
-rTfNL/pZyEJR0YBL+XEWnTfM9Jk28JE2wUGFLjIpSR5/lT502TPwpanO6/QAsvqz
-6Gy5ieygM6iDewVTaB6550JwGndRj1KlDRIOgq9xwCK6zMM7EpvrMRBF9mlO4kh5
-FUd+gpdseE98voURwlFC6A5/D03d3oTBt5wG8CZjplhX0Mnt9S3o77Kx9Odm/jbe
-90GuUbJnbRVb9g21bLlc+jcxNTc1VEQmMo/qdQL7HoTE5Igz4yBz3RGpNk5GLbSy
-QZdE11Pf2YMgwLAKdkZ1N6pOwQRpLFA=
+MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDEtHPdOrBRZLtf
+RCSeYdgydj/DBZRfCoHm2uZuBblo31pP17sGoo57d/yZNw+naEZIfGVNZDWEteBX
+QyR/zi+8cHelDiV+wLxprc9sCFYgssK/XPY2+iZBx1c00Vz7isK7dGcp/VRnZryp
+YhCnSoOmg5UmxGCHOdp5xHZdGXJznDLd5pL/PRKlszX8nLa4kKGbbMwYH/bF2jHo
+MGN9ViS+C/cAuRaF5Cj2p9OvywC/9cy1GiincYRE7auMCbBZgF0JueCCCJ7EBy2c
+oNVXT/Sx2X+pRwM13kV1kcrcIyt8Kt3qk/kfF0wkLkPoHmbkhDb5b4jFiSqfBHjz
+uZfqsFSQ0QLYp0tTMDPe6Jm8PbJXVxEseGfkX5MK73Pxe5pid38xWHA907K/K9yC
+PQGbnUNMNaYlAPb2aMgS0N86Pr9RJUhxX5RaksCpHiod5YA1JQQtsUf36zkqUSWF
+4eApCuu2myK8zm+xtWBuI3Njllmcd91ZeMWkVb46alQfbI+n8wy6WcV/NC+Eon9D
+UtUfwaetBQ2nWp7MmN1hpA2oypYa8TYDx6ZlbL8vpkW4KpBvlZdYxeE34ltFBwsr
+oHL58mLBA712xZMa54GYNe3rKd4waQFhD41RAe1H9Y5PhDJpjEmAXEyTX9FLRcHR
+pAkTdcBDQLy4bLAGXmyK6/L1Bw3kWQIDAQABAoICAQC9HsovL5gKCZFk3L1gUa5t
+hedz989ZOV7/uALIUVScEfJgxYeZr3zSFOCV5qx0RfsdAgzbxbb2627QN0vGXVTk
+FjXSSbGfFmuQJ34/3hwAwB4hop1O6l8R6zhbHdgKOLVVSWtOobQe3lYRfKmKTkgZ
+NnWWmkQ8f1EgtdUfWbICmXEGjANUx0FAcvc68ulytgvKxWXM5B58x3YoSS2+ea5F
+0ncfCNUw0dbYny8V21XTOd4hWQ8xPiDvrJq8vywAQTwyd7X1D5il3EjsSG4Vzlfz
+DqyA8jeR+SxLB2tFD8NlVEmcmbxxOhMIzjqX13MRzlSUqbmUQnbqAIDRw+Tdzb7e
+9UZPLhg0yLM4JY5Vd11rzed3hiajeOyxvr1jHP1JoNNvdT0ZlNIrInZLKqunZ9I8
+5ntr6o4uJyAL8DODR26+HPi3NzJJFniGDhCAyPzuKc6fRtNXgOc/6/IdCPQiwYF5
+KjIWlBWGG7zNMUE0fUJx1+okpmKZ6aqIoM/qfR1jY52HsHeOLYR30FVCy+lo+vVD
+ysNJhVA1vNNGmV2gwIJemBg7b+cjVqB+ATc8NEzfgCSiSEp3Q9+j0/wgKeD8Lq5+
+DOycXaEhJRmo7SogzTVdQN54D0ujJ4QNgo98swV3+H+14tSeFTDMPg5neZ+dCdoU
+NVKoKtV6y/SyFngana/EIQKCAQEA6p/zc1gLnLC6Ej1Ql5DWqy/M8Xa3E/IcqgpR
++8WxiPCSerf1Kirq9UgF4YQoTZzkQIcHiQahdnufLVwNKqXEp0HC8MV7G3+3LnOo
+Drbe1J7XqSyxSx0ruDuN587X+OqecGmK5X9mpFH+2McuC9CeaT/uKsxfOov7gNE0
+RvQoZTWhUeSkYrEUwtmr2BF2IsTU6tRLawRiqrnD/FMuY0C+YiJimk5q/klaGiPC
+MGuQvmkHsrhxJcSj4aCKJqsIv7sEEQkB8e9VU+jnhWlUpl5VUwCzuLorp12TveRX
+/moiWT+KzK3KwQozHj8Y7pdOADtkKacDZgk1IenoTuQ6Q8VRZQKCAQEA1qAcyga4
+hx7ekC1s6vOvacO5jaD+fkJYTj2ZP8hQLcM3j7gTzg589w5ANQL0jWxJxpeuu0zn
+rMpnXi+roeKMPdZ+yLy4DZrgzAGUMtwgkVVMtreSgI3hgrbi9Z495Sha42hAdEcT
+KjOjdVr4MLW8cuLTmIFwakP9tthxvq4DwUnTyJtL0319MDmYvg1mTk+L8LByueCP
+Av5gzJwrN9vL88AsKJA8Souf7Vfq9ef6MhUgFM5GLb4+Uq9ZYnB6GdYsZweX3R3I
+uGLl4pWL4TydInwebvvUVf1jeEy+acOmi+DfyC5gkk0bCRXdDgz6PujqLRHEq4X9
+s9R+R18ORXzx5QKCAQEAibeBar7PchW54mLjH1QA7VKNdV49cBO5B4YvQR11a+/p
+yuaXnTy71WWFLi4oigYBZG7d2Wxu8eD2OeXCRLowiAxtpG4GKMn6d+WjS5/DhAII
+jGCTYIeq1eT/EoWy94Sfo1QQF02ErgcDE7M2L/EwSo8f+Tck3nS0F5S0nsFJxL6K
+Bkuywcs3aHfkCluVgCsQ3xXlfteAIr4Pb9hTbibemTOdtP06iC/+F0HOBiXdPCbi
+QeFJaOXXW+SjsrbJ1+CqLmWfIqdc6nfXDdQZv923L5VF6LQ+U2r2AYw6qjcaGlDV
+4/ZPAKhAAQ0AUWu2eSRjUp+ZuxbEfTeTCFumZ4k2kQKCAQBtVpY0CaZ6F6zUkH+7
+VjeXzwE5eLoNwmjQOytWRgsqtRgaHHHieJkLF3R4TTAe1/rhtCZs/unLqjVs0yZB
+y3Mckah3RUUSkUNSSr+gBWqF/4mcT/rPiPhIqjkHXf00QBHFZjfnxMmrpzDvuU9V
+KVB+yrV3LQIC8O5Q9wVDWc1J6/17ZjoD3RsotT7uG09yN64YCRv5O8A/iy3vLuQJ
+iezmGZGlfI1qgKURucdWTT61wvNcBhXUeeWwI+qKbriVbvmh50ljeSfnX2KzwvHG
+5iU7CzZJ3fs3b2X8RESBBw5SllYK2i2Sert6Lmw2G0BlSiz6luG1bAZqVaebXn6b
+weJNAoIBAGN2Vmr+F/veEsrMMtdbSV/hVcdBSf8TT2RWU+tlcRy0bF87xC3jztnF
+aHVuUhvPzxVX/6/lmrjx3TYT88rZN/GITwsOjKmjhXpmupi0K0qPobyMAsm+9fHt
+vQ3pWHuxvM+IjCYlCT+nxvy0VNJ0j4b8UTG8huKf8/yj0WI+eDwX7b9+5ZDcQb2/
+BJVAnb3b8e8orENkIhwr1juSOo9pRjN+QghbP2enGEJs4BZhm/rjBiXvQ6PuvumW
+ovb2OUxUrEc3qZuj6LWgAvLuOhG5VW1onbbvN1UHzWl43Ql1k3gks12U97eruAfp
+kFXtZAPNBO0IKMh9aPrUgaiakUeV1pQ=
-----END PRIVATE KEY-----
| train | val | 2020-03-26T21:18:47 | "2020-02-08T14:15:28Z" | amkartashov | test |
bazelbuild/bazel/10746_10759 | bazelbuild/bazel | bazelbuild/bazel/10746 | bazelbuild/bazel/10759 | [
"timestamp(timedelta=1.0, similarity=0.8410750965459701)"
] | 37aad0e0a67e0c70476ad686cba74c1870cd3229 | b7d82994577918f3987307af91b8a9b8077ef2e6 | [
"@alandonovan -- i've tried to figure out how to get this to build and can't. i thought maybe it was because we build using the local jdk, but i think that's the default now. i also tried that on x86 and this works fine. so now i'm guessing there's some place i can't find with an `linux_x86_64` option and a blank `default` for this header file. Any suggestions?",
"Take a look at the BUILD.oss file in the linked commit: \r\nhttps://github.com/bazelbuild/bazel/commit/314cd3353b018420598188cf54c3f97358baa2e3#diff-96bd71d4e041b52d389d631025d2c09fR167\r\nIt clearly doesn't have a case for linux on non-x86 platforms, so this error is expected, at least for now. You could fix it by adding a case for ppc to that select, but really there needs to be a cc_library rule for the JNI package so that Java clients don't need to think about such details.\r\n",
"@alandonovan I had tried some things there, but guess I missed the obvious one of just copying the linux_x86_64 case to ppc. PR submitted. Thanks!",
"I just ran into the same problem on aarch64 (arm64).",
"I compile Bazel on aarch64 from source and have been able to successfully do so up until 2.2.0. I compiled 2.1.1 last week successfully with `env EXTRA_BAZEL_ARGS=\"--host_javabase=@local_jdk//:jdk\" bash ./compile.sh`. \r\n\r\nI tried 2.2.0 this morning and get:\r\n```\r\nERROR: /home/<username>/Library/bazel/src/main/java/com/google/devtools/build/lib/syntax/BUILD:150:1: C++ compilation of rule '//src/main/java/com/google/devtools/build/lib/syntax:libcpu_profiler.so' failed (Exit 1): clang failed: error executing command\r\n (cd /tmp/bazel_IGlvQbWR/out/execroot/io_bazel && \\\r\n exec env - \\\r\n PATH=/home/<username>/.cargo/bin:/home/<username>/.local/bin:/home/<username>/Library/go/bin:/home/<username>/Library/code/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games \\\r\n PWD=/proc/self/cwd \\\r\n /usr/local/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.d '-frandom-seed=bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.o' -fPIC -iquote . -iquote bazel-out/aarch64-opt/bin -iquote external/bazel_tools -iquote bazel-out/aarch64-opt/bin/external/bazel_tools -isystem external/bazel_tools/tools/jdk/include -isystem bazel-out/aarch64-opt/bin/external/bazel_tools/tools/jdk/include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__=\"redacted\"' '-D__TIMESTAMP__=\"redacted\"' '-D__TIME__=\"redacted\"' -c src/main/java/com/google/devtools/build/lib/syntax/cpu_profiler_unimpl.cc -o bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.o)\r\nExecution platform: //:default_host_platform\r\nIn file included from src/main/java/com/google/devtools/build/lib/syntax/cpu_profiler_unimpl.cc:17:\r\nbazel-out/aarch64-opt/bin/external/bazel_tools/tools/jdk/include/jni.h:45:10: fatal error: 'jni_md.h' file not found\r\n#include \"jni_md.h\"\r\n ^~~~~~~~~~\r\n1 error generated.\r\nTarget //src:bazel_nojdk failed to build\r\n```\r\nOn further inspection the following additions for aarch64 didn't make it into 2.2.0 - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/syntax/BUILD#L166-L176",
"Yes, you'll need to build a version of Bazel more recent than 2.2.0 (20 days old) as the fix was only added in 2402c8f (15 days ago).\r\n\r\n",
"Hi @alandonovan ,\r\n\r\nI am unable to find a more recent bazel version than 2.2.0 - can you please give me a hint where I can download specifically the dist, because I need to bootstrap it?\r\n\r\nKind regards\r\nJulian",
"We have now a release candidate for Bazel 3.0, see https://releases.bazel.build/3.0.0/rc1/index.html\r\nWe'll have a proper release in a few weeks.\r\n\r\nThe alternative is to build Bazel yourself.",
"I am using the latest release dist package (3.3.1) and I see this issue on Raspbian (Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux):\r\n\r\n```\r\nERROR: /home/pi/workspace/mediapipe/bazel/src/main/java/com/google/devtools/build/lib/syntax/BUILD:139:10: C++ compilation of rule '//src/main/java/com/google/devtools/build/lib/syntax:libcpu_profiler.so' failed (Exit 1): gcc failed: error executing command \r\n (cd /tmp/bazel_jLqe6uBU/out/execroot/io_bazel && \\\r\n exec env - \\\r\n PATH=/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games \\\r\n PWD=/proc/self/cwd \\\r\n /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/arm-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.d '-frandom-seed=bazel-out/arm-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.o' -fPIC -iquote . -iquote bazel-out/arm-opt/bin -iquote external/bazel_tools -iquote bazel-out/arm-opt/bin/external/bazel_tools -isystem external/bazel_tools/tools/jdk/include -isystem bazel-out/arm-opt/bin/external/bazel_tools/tools/jdk/include -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__=\"redacted\"' '-D__TIMESTAMP__=\"redacted\"' '-D__TIME__=\"redacted\"' -c src/main/java/com/google/devtools/build/lib/syntax/cpu_profiler_unimpl.cc -o bazel-out/arm-opt/bin/src/main/java/com/google/devtools/build/lib/syntax/_objs/libcpu_profiler.so/cpu_profiler_unimpl.pic.o)\r\nExecution platform: //:default_host_platform\r\nIn file included from src/main/java/com/google/devtools/build/lib/syntax/cpu_profiler_unimpl.cc:17:\r\nbazel-out/arm-opt/bin/external/bazel_tools/tools/jdk/include/jni.h:45:10: fatal error: jni_md.h: No such file or directory\r\n #include \"jni_md.h\"\r\n ^~~~~~~~~~\r\ncompilation terminated.\r\nTarget //src:bazel_nojdk failed to build\r\nINFO: Elapsed time: 754.797s, Critical Path: 78.28s\r\nINFO: 805 processes: 805 local.\r\nFAILED: Build did NOT complete successfully\r\n```\r\nCould someone help?\r\n\r\n\r\n",
"The fact that Bazel is compiling cpu_profiler_unimpl.cc means that the config_setting //src/conditions:linux_arm is false on your platform, which is surprising. This condition is determined by the flag --cpu=arm. Did you set that flag?\r\n\r\nYou should open a new issue for this; although it is similar to the ppc64le problem, it clearly requires a different fix.",
"Hi,\r\nI have not changed any build settings other than JVM heap settings. I will open a new issue to this and link back here. \r\nThanks for your response and consideration!\r\n",
"To be clear, I meant: you will need to set --cpu=arm.",
"Ahh.. let me try that. I have created this new issue: https://github.com/bazelbuild/bazel/issues/11709, I will try with that flag and update. Thanks!",
"Hi,\r\nI am not able to set that flag. What have found so far is : https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md and as per this, I have added a 'return \"arm\" in get_cpu_value function inside tools/cpp/lib_cc/configure.bzl. This did not change anything and I hit the same error. Could you help? ",
"@here I am running into the same error building bazel using the zip from 3.3.0 distro https://github.com/bazelbuild/bazel/releases/download/3.3.0/bazel-3.3.0-dist.zip.\r\n\r\nbazel-out/ppc-opt/bin/external/bazel_tools/tools/jdk/include/jni.h:45:10: fatal error: jni_md.h: No such file or directory\r\n #include \"jni_md.h\"\r\n ^~~~~~~~~~\r\ncompilation terminated.\r\nTarget //src:bazel_nojdk failed to build\r\n\r\nAny pointers to resolve this.",
"> @here I am running into the same error building bazel using the zip from 3.3.0 distro https://github.com/bazelbuild/bazel/releases/download/3.3.0/bazel-3.3.0-dist.zip.\r\n> \r\n> bazel-out/ppc-opt/bin/external/bazel_tools/tools/jdk/include/jni.h:45:10: fatal error: jni_md.h: No such file or directory\r\n> #include \"jni_md.h\"\r\n> ^~~~~~~~~~\r\n> compilation terminated.\r\n> Target //src:bazel_nojdk failed to build\r\n> \r\n> Any pointers to resolve this.\r\n\r\nSame here. ",
"I'd try Bazel [3.4.1](https://github.com/bazelbuild/bazel/releases/tag/3.4.1) or [3.5.0](https://github.com/bazelbuild/bazel/releases/tag/3.5.0)",
"Hi, just did and got the same error.\r\n\r\nCheers,\r\n\r\nSimon",
"@aiuto Tony, should I be able to reproduce this in a cross build? I tried `bazel build --cpu=ppc src/bazel` (with 3.5.0) and I got this error:\r\n```\r\nERROR: [...]external/local_config_cc/BUILD:47:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'ppc'\r\n```\r\nAny help much appreciated.\r\n",
"Perhaps https://github.com/bazelbuild/bazel/commit/38c85a4770ff678cbeb5638b76fad0800ebefb52 should have added ppc64le instead of replacing it?\r\nIt is also unclear why the default condition is empty rather than \":jni_md_header-linux\".\r\nHaving to enumerate every platform while one is a good default is brittle.",
"The two conditions have equal definitions, so I don't see why that should matter.\r\nhttps://github.com/bazelbuild/bazel/blob/master/src/conditions/BUILD#L37\r\n\r\nLinux is only a good default if you're actually using Linux. I'd rather it fail fast than use the wrong header.",
"I'm on i686 debian bullseye and running into this issue trying to build bazel 3.7.2 from the dist archive. It's unclear how to make it work, generally, on an unsupported or failing system.\r\n\r\nEDIT: This fails because bazel specifically does not provide support or configurations for 32 bit systems. There are instructions elsewhere for patching hazel for 32 bit systems. Further pursuit of this on 32 bit would likely involve an issue or pull request to notify the user that their CPU architecture is not accepted to build with.\r\n\r\nThis particular issue is triggered similarly as other answers in this thread: there is no condition for the architecture, so the file is not copied in. The jni_md.h file is os-dependent, held in an os-specific subfolder."
] | [] | "2020-02-11T18:30:58Z" | [] | building bazel libcpu_profiler fails to find jni_md.h (ppc64le) | ### Description of the problem / feature request:
compiling from master on ppc64le fails:
> bazel-out/ppc-fastbuild/bin/external/bazel_tools/tools/jdk/include/jni.h:45:10: fatal error: jni_md.h: No such file or directory
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
> bazel build --sandbox_debug -s --verbose_failures --host_javabase=@local_jdk//:jdk //src:bazel
### What operating system are you running Bazel on?
> Ubuntu 18.04.3
### What's the output of `bazel info release`?
building with:
> release 1.1.0- (@non-git)
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
> https://github.com/Unicamp-OpenPower/bazel-build/blob/master/.travis.yml
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
root@ede9b339f10f:/bazel# git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
https://github.com/bazelbuild/bazel.git
1ae1c16133699bcd6ae90f00cec6140ad4146cd3
314cd3353b018420598188cf54c3f97358baa2e3
### Have you found anything relevant by searching the web?
> no
### Any other information, logs, or outputs that you want to share?
This commit seems to have broken us: https://github.com/bazelbuild/bazel/commit/314cd3353b018420598188cf54c3f97358baa2e3
More or the error here: https://gist.github.com/clnperez/781149e8c6882ea668d06483325e1151 | [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BUILD b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
index 45aab0f4953301..b1918666a337a4 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
@@ -165,6 +165,7 @@ cc_library(
hdrs = ["@bazel_tools//tools/jdk:jni_header"] + select({
"//src/conditions:linux_x86_64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:linux_aarch64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
+ "//src/conditions:linux_ppc": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
"//src/conditions:freebsd": ["@bazel_tools//tools/jdk:jni_md_header-freebsd"],
"//src/conditions:openbsd": ["@bazel_tools//tools/jdk:jni_md_header-openbsd"],
@@ -175,6 +176,7 @@ cc_library(
# Remove these crazy prefixes when we move this rule.
"//src/conditions:linux_x86_64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:linux_aarch64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
+ "//src/conditions:linux_ppc": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:darwin": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/darwin"],
"//src/conditions:freebsd": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/freebsd"],
"//src/conditions:openbsd": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/openbsd"],
| null | train | val | 2020-02-20T19:40:22 | "2020-02-10T20:00:01Z" | clnperez | test |
bazelbuild/bazel/10791_10819 | bazelbuild/bazel | bazelbuild/bazel/10791 | bazelbuild/bazel/10819 | [
"timestamp(timedelta=90222.0, similarity=0.8497456594812841)"
] | ac745853146dd6dfa4738f2e6795e5ea000915d0 | bc3210aa47e9dc839e9f44ac182eeb938032f356 | [] | [
"For this and all other level2+ headers, should we use **Capitalize All Words** formatting or **Only first word**?\r\n\r\nThis and the the very next header disagree. And we have inconsistent use all throughout the docset. I'm happy to do a docset-wide refactoring if we can agree on the answer.\r\n\r\nI suspect the answer is **Only first word**. But I have no authority to point to.",
"will md-format rewrite this?",
"Fixed."
] | "2020-02-19T03:44:29Z" | [
"type: feature request",
"type: documentation (cleanup)",
"P1"
] | Bazel docs - style upgrade | Tracks the effort to productionize https://groups.google.com/g/bazel-dev/c/hjRP7JTtZ_U/m/9SZYZUSBDAAJ.
Prototype at https://bazel-docs-staging.netlify.com/versions/master/bazel-overview.html
| [
"site/docs/bazel-vision.md"
] | [
"site/docs/bazel-vision.md"
] | [] | diff --git a/site/docs/bazel-vision.md b/site/docs/bazel-vision.md
index d0aad8a996f545..7e2680f2ac9ae5 100644
--- a/site/docs/bazel-vision.md
+++ b/site/docs/bazel-vision.md
@@ -5,9 +5,9 @@ title: Bazel Vision
# Bazel Vision
-<font size='+1'>Any software developer can efficiently build, test, and package
+<p><font size='+1'>Any software developer can efficiently build, test, and package
any project, of any size or complexity, with tooling that's easy to adopt and
-extend.</font>
+extend.</font></p>
* **Engineers can take build fundamentals for granted.** Software developers
focus on the creative process of authoring code because the mechanical
@@ -15,6 +15,7 @@ extend.</font>
support new languages or unique organizational needs, users focus on the
aspects of extensibility that are unique to their use case, without having
to reinvent the basic plumbing.
+
* **Engineers can easily contribute to any project.** A developer who wants to
start working on a new project can simply clone the project and run the
build. There's no need for local configuration - it just works. With
@@ -22,23 +23,30 @@ extend.</font>
fully test their changes against all platforms the project targets.
Engineers can quickly configure the build for a new project or incrementally
migrate an existing build.
+
* **Projects can scale to any size codebase, any size team.** Fast,
incremental testing allows teams to fully validate every change before it is
committed. This remains true even as repos grow, projects span multiple
repos, and multiple languages are introduced. Infrastructure does not force
developers to trade test coverage for build speed.
-**We believe Bazel has the potential to fulfill this vision.** Bazel was built
-from the ground up to enable builds that are reproducible (a given set of inputs
-will always produce the same outputs) and portable (a build can be run on any
-machine without affecting the output). These characteristics support safe
-incrementality (rebuilding only changed inputs doesn't introduce the risk of
-corruption) and distributability (build actions are isolated and can be
-offloaded). By minimizing the work needed to do a correct build and
-parallelizing that work across multiple cores and remote systems, Bazel can make
-any build fast. Bazel's abstraction layer—instructions specific to languages,
-platforms, and toolchains implemented in a simple extensibility language —
-allows it to be easily applied to any context.
+---
+
+**We believe Bazel has the potential to fulfill this vision.**
+
+Bazel was built from the ground up to enable builds that are reproducible (a
+given set of inputs will always produce the same outputs) and portable (a build
+can be run on any machine without affecting the output).
+
+These characteristics support safe incrementality (rebuilding only changed
+inputs doesn't introduce the risk of corruption) and distributability (build
+actions are isolated and can be offloaded). By minimizing the work needed to do
+a correct build and parallelizing that work across multiple cores and remote
+systems, Bazel can make any build fast.
+
+Bazel's abstraction layer — instructions specific to languages, platforms, and
+toolchains implemented in a simple extensibility language — allows it to be
+easily applied to any context.
## Bazel Core Competencies
@@ -60,9 +68,11 @@ allows it to be easily applied to any context.
## Serving language communities
Software engineering evolves in the context of language communities — typically,
-self-organizing groups of people who use common tools and practices. To be of
-use to members of a language community, high-quality Bazel rules must be
+self-organizing groups of people who use common tools and practices.
+
+To be of use to members of a language community, high-quality Bazel rules must be
available that integrate with the workflows and conventions of that community.
+
Bazel is committed to be extensible and open, and to support good rulesets for
any language.
@@ -84,6 +94,7 @@ any language.
material for new users, comprehensive docs for expert users.
Each of these items is essential and only together do they deliver on Bazel's
-competencies for their particular ecosystem. They are also, by and large,
-sufficient - once all are fulfilled, Bazel fully delivers its value to members
-of that language community.
+competencies for their particular ecosystem.
+
+They are also, by and large, sufficient - once all are fulfilled, Bazel fully
+delivers its value to members of that language community.
| null | train | val | 2020-02-19T04:33:02 | "2020-02-14T23:15:59Z" | gregestren | test |
bazelbuild/bazel/10791_10824 | bazelbuild/bazel | bazelbuild/bazel/10791 | bazelbuild/bazel/10824 | [
"timestamp(timedelta=108349.0, similarity=0.8824954897643075)"
] | 0447bf95eb996cca7530259b93db4882b95bcb84 | null | [] | [] | "2020-02-19T17:21:45Z" | [
"type: feature request",
"type: documentation (cleanup)",
"P1"
] | Bazel docs - style upgrade | Tracks the effort to productionize https://groups.google.com/g/bazel-dev/c/hjRP7JTtZ_U/m/9SZYZUSBDAAJ.
Prototype at https://bazel-docs-staging.netlify.com/versions/master/bazel-overview.html
| [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [
".travis.yml",
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [] | diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000000..8af1e3ba247017
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+os: linux
+arch: ppc64le
+sudo: required
+language: go
+go:
+- "1.13.x"
+
+jobs:
+ include:
+ - dist: xenial
+ env: dist_version=16.04
+ - dist: bionic
+ env: dist_version=18.04
+
+before_install:
+ - sudo apt update
+ - sudo apt install build-essential python zip unzip gcc
+ - sudo apt install default-jre default-jdk
+
+script:
+ - wget -q https://oplab9.parqtec.unicamp.br/pub/ppc64el/bazel/ubuntu_${dist_version}/bazel_bin_ppc64le_1.0.0
+ - sudo mv bazel_bin_ppc64le_1.0.0 /usr/local/bin/bazel
+ - sudo chmod +x /usr/local/bin/bazel
+ - git clone https://github.com/bazelbuild/bazel
+ - cd bazel
+ - git checkout 314cd3353b018420598188cf54c3f97358baa2e3
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null version
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null info
+ - bazel build --host_javabase=@local_jdk//:jdk -- //src:bazel //src:bazel_jdk_minimal
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BUILD b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
index 82dddf8e367b14..f3d92062d0e09e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
@@ -152,6 +152,7 @@ cc_binary(
name = "libcpu_profiler.so",
srcs = select({
"//src/conditions:darwin": ["cpu_profiler_posix.cc"],
+ "//src/conditions:linux_ppc": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_x86_64": ["cpu_profiler_posix.cc"],
"//conditions:default": ["cpu_profiler_unimpl.cc"],
}),
@@ -165,6 +166,7 @@ cc_library(
name = "jni",
hdrs = ["@bazel_tools//tools/jdk:jni_header"] + select({
"//src/conditions:linux_x86_64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
+ "//src/conditions:linux_ppc": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
"//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
"//conditions:default": [],
@@ -172,6 +174,7 @@ cc_library(
includes = ["../../../../../../../../../external/bazel_tools/tools/jdk/include"] + select({
# Remove these crazy prefixes when we move this rule.
"//src/conditions:linux_x86_64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
+ "//src/conditions:linux_ppc": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:darwin": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/darwin"],
"//src/conditions:windows": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/win32"],
"//conditions:default": [],
| null | val | val | 2020-02-19T18:11:40 | "2020-02-14T23:15:59Z" | gregestren | test |
bazelbuild/bazel/10792_10819 | bazelbuild/bazel | bazelbuild/bazel/10792 | bazelbuild/bazel/10819 | [
"timestamp(timedelta=88609.0, similarity=0.8609747650576375)"
] | ac745853146dd6dfa4738f2e6795e5ea000915d0 | bc3210aa47e9dc839e9f44ac182eeb938032f356 | [] | [
"For this and all other level2+ headers, should we use **Capitalize All Words** formatting or **Only first word**?\r\n\r\nThis and the the very next header disagree. And we have inconsistent use all throughout the docset. I'm happy to do a docset-wide refactoring if we can agree on the answer.\r\n\r\nI suspect the answer is **Only first word**. But I have no authority to point to.",
"will md-format rewrite this?",
"Fixed."
] | "2020-02-19T03:44:29Z" | [
"type: documentation (cleanup)",
"P1"
] | Bazel docs - lightweight organizational refresh | This tracks productionizing https://groups.google.com/g/bazel-dev/c/hjRP7JTtZ_U/m/a4SDZkzPBAAJ.
docs.bazel.build gets first priority. We'll also cover blog.bazel.build and https://bazel.build/contributing.html as time permits. | [
"site/docs/bazel-vision.md"
] | [
"site/docs/bazel-vision.md"
] | [] | diff --git a/site/docs/bazel-vision.md b/site/docs/bazel-vision.md
index d0aad8a996f545..7e2680f2ac9ae5 100644
--- a/site/docs/bazel-vision.md
+++ b/site/docs/bazel-vision.md
@@ -5,9 +5,9 @@ title: Bazel Vision
# Bazel Vision
-<font size='+1'>Any software developer can efficiently build, test, and package
+<p><font size='+1'>Any software developer can efficiently build, test, and package
any project, of any size or complexity, with tooling that's easy to adopt and
-extend.</font>
+extend.</font></p>
* **Engineers can take build fundamentals for granted.** Software developers
focus on the creative process of authoring code because the mechanical
@@ -15,6 +15,7 @@ extend.</font>
support new languages or unique organizational needs, users focus on the
aspects of extensibility that are unique to their use case, without having
to reinvent the basic plumbing.
+
* **Engineers can easily contribute to any project.** A developer who wants to
start working on a new project can simply clone the project and run the
build. There's no need for local configuration - it just works. With
@@ -22,23 +23,30 @@ extend.</font>
fully test their changes against all platforms the project targets.
Engineers can quickly configure the build for a new project or incrementally
migrate an existing build.
+
* **Projects can scale to any size codebase, any size team.** Fast,
incremental testing allows teams to fully validate every change before it is
committed. This remains true even as repos grow, projects span multiple
repos, and multiple languages are introduced. Infrastructure does not force
developers to trade test coverage for build speed.
-**We believe Bazel has the potential to fulfill this vision.** Bazel was built
-from the ground up to enable builds that are reproducible (a given set of inputs
-will always produce the same outputs) and portable (a build can be run on any
-machine without affecting the output). These characteristics support safe
-incrementality (rebuilding only changed inputs doesn't introduce the risk of
-corruption) and distributability (build actions are isolated and can be
-offloaded). By minimizing the work needed to do a correct build and
-parallelizing that work across multiple cores and remote systems, Bazel can make
-any build fast. Bazel's abstraction layer—instructions specific to languages,
-platforms, and toolchains implemented in a simple extensibility language —
-allows it to be easily applied to any context.
+---
+
+**We believe Bazel has the potential to fulfill this vision.**
+
+Bazel was built from the ground up to enable builds that are reproducible (a
+given set of inputs will always produce the same outputs) and portable (a build
+can be run on any machine without affecting the output).
+
+These characteristics support safe incrementality (rebuilding only changed
+inputs doesn't introduce the risk of corruption) and distributability (build
+actions are isolated and can be offloaded). By minimizing the work needed to do
+a correct build and parallelizing that work across multiple cores and remote
+systems, Bazel can make any build fast.
+
+Bazel's abstraction layer — instructions specific to languages, platforms, and
+toolchains implemented in a simple extensibility language — allows it to be
+easily applied to any context.
## Bazel Core Competencies
@@ -60,9 +68,11 @@ allows it to be easily applied to any context.
## Serving language communities
Software engineering evolves in the context of language communities — typically,
-self-organizing groups of people who use common tools and practices. To be of
-use to members of a language community, high-quality Bazel rules must be
+self-organizing groups of people who use common tools and practices.
+
+To be of use to members of a language community, high-quality Bazel rules must be
available that integrate with the workflows and conventions of that community.
+
Bazel is committed to be extensible and open, and to support good rulesets for
any language.
@@ -84,6 +94,7 @@ any language.
material for new users, comprehensive docs for expert users.
Each of these items is essential and only together do they deliver on Bazel's
-competencies for their particular ecosystem. They are also, by and large,
-sufficient - once all are fulfilled, Bazel fully delivers its value to members
-of that language community.
+competencies for their particular ecosystem.
+
+They are also, by and large, sufficient - once all are fulfilled, Bazel fully
+delivers its value to members of that language community.
| null | test | val | 2020-02-19T04:33:02 | "2020-02-14T23:19:10Z" | gregestren | test |
bazelbuild/bazel/10792_10824 | bazelbuild/bazel | bazelbuild/bazel/10792 | bazelbuild/bazel/10824 | [
"timestamp(timedelta=106736.0, similarity=0.8783042216074869)"
] | 0447bf95eb996cca7530259b93db4882b95bcb84 | null | [] | [] | "2020-02-19T17:21:45Z" | [
"type: documentation (cleanup)",
"P1"
] | Bazel docs - lightweight organizational refresh | This tracks productionizing https://groups.google.com/g/bazel-dev/c/hjRP7JTtZ_U/m/a4SDZkzPBAAJ.
docs.bazel.build gets first priority. We'll also cover blog.bazel.build and https://bazel.build/contributing.html as time permits. | [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [
".travis.yml",
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [] | diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000000..8af1e3ba247017
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+os: linux
+arch: ppc64le
+sudo: required
+language: go
+go:
+- "1.13.x"
+
+jobs:
+ include:
+ - dist: xenial
+ env: dist_version=16.04
+ - dist: bionic
+ env: dist_version=18.04
+
+before_install:
+ - sudo apt update
+ - sudo apt install build-essential python zip unzip gcc
+ - sudo apt install default-jre default-jdk
+
+script:
+ - wget -q https://oplab9.parqtec.unicamp.br/pub/ppc64el/bazel/ubuntu_${dist_version}/bazel_bin_ppc64le_1.0.0
+ - sudo mv bazel_bin_ppc64le_1.0.0 /usr/local/bin/bazel
+ - sudo chmod +x /usr/local/bin/bazel
+ - git clone https://github.com/bazelbuild/bazel
+ - cd bazel
+ - git checkout 314cd3353b018420598188cf54c3f97358baa2e3
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null version
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null info
+ - bazel build --host_javabase=@local_jdk//:jdk -- //src:bazel //src:bazel_jdk_minimal
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BUILD b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
index 82dddf8e367b14..f3d92062d0e09e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
@@ -152,6 +152,7 @@ cc_binary(
name = "libcpu_profiler.so",
srcs = select({
"//src/conditions:darwin": ["cpu_profiler_posix.cc"],
+ "//src/conditions:linux_ppc": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_x86_64": ["cpu_profiler_posix.cc"],
"//conditions:default": ["cpu_profiler_unimpl.cc"],
}),
@@ -165,6 +166,7 @@ cc_library(
name = "jni",
hdrs = ["@bazel_tools//tools/jdk:jni_header"] + select({
"//src/conditions:linux_x86_64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
+ "//src/conditions:linux_ppc": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
"//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
"//conditions:default": [],
@@ -172,6 +174,7 @@ cc_library(
includes = ["../../../../../../../../../external/bazel_tools/tools/jdk/include"] + select({
# Remove these crazy prefixes when we move this rule.
"//src/conditions:linux_x86_64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
+ "//src/conditions:linux_ppc": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:darwin": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/darwin"],
"//src/conditions:windows": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/win32"],
"//conditions:default": [],
| null | val | val | 2020-02-19T18:11:40 | "2020-02-14T23:19:10Z" | gregestren | test |
bazelbuild/bazel/10794_10819 | bazelbuild/bazel | bazelbuild/bazel/10794 | bazelbuild/bazel/10819 | [
"timestamp(timedelta=88665.0, similarity=0.8432832893471068)"
] | ac745853146dd6dfa4738f2e6795e5ea000915d0 | bc3210aa47e9dc839e9f44ac182eeb938032f356 | [] | [
"For this and all other level2+ headers, should we use **Capitalize All Words** formatting or **Only first word**?\r\n\r\nThis and the the very next header disagree. And we have inconsistent use all throughout the docset. I'm happy to do a docset-wide refactoring if we can agree on the answer.\r\n\r\nI suspect the answer is **Only first word**. But I have no authority to point to.",
"will md-format rewrite this?",
"Fixed."
] | "2020-02-19T03:44:29Z" | [
"type: documentation (cleanup)",
"P1"
] | Bazel docs - do lightweight content formatting fixes | For example, make https://docs.bazel.build/versions/2.1.0/bazel-vision.html less wall-o'-texty.
The broader goal is to make docs inviting, accessible, not intimidating. The less encyclopedic (i.e. dense) each page is the better.
https://github.com/bazelbuild/bazel/issues/10791 should also help by using bigger fonts and enforcing better maximum column widths. | [
"site/docs/bazel-vision.md"
] | [
"site/docs/bazel-vision.md"
] | [] | diff --git a/site/docs/bazel-vision.md b/site/docs/bazel-vision.md
index d0aad8a996f545..7e2680f2ac9ae5 100644
--- a/site/docs/bazel-vision.md
+++ b/site/docs/bazel-vision.md
@@ -5,9 +5,9 @@ title: Bazel Vision
# Bazel Vision
-<font size='+1'>Any software developer can efficiently build, test, and package
+<p><font size='+1'>Any software developer can efficiently build, test, and package
any project, of any size or complexity, with tooling that's easy to adopt and
-extend.</font>
+extend.</font></p>
* **Engineers can take build fundamentals for granted.** Software developers
focus on the creative process of authoring code because the mechanical
@@ -15,6 +15,7 @@ extend.</font>
support new languages or unique organizational needs, users focus on the
aspects of extensibility that are unique to their use case, without having
to reinvent the basic plumbing.
+
* **Engineers can easily contribute to any project.** A developer who wants to
start working on a new project can simply clone the project and run the
build. There's no need for local configuration - it just works. With
@@ -22,23 +23,30 @@ extend.</font>
fully test their changes against all platforms the project targets.
Engineers can quickly configure the build for a new project or incrementally
migrate an existing build.
+
* **Projects can scale to any size codebase, any size team.** Fast,
incremental testing allows teams to fully validate every change before it is
committed. This remains true even as repos grow, projects span multiple
repos, and multiple languages are introduced. Infrastructure does not force
developers to trade test coverage for build speed.
-**We believe Bazel has the potential to fulfill this vision.** Bazel was built
-from the ground up to enable builds that are reproducible (a given set of inputs
-will always produce the same outputs) and portable (a build can be run on any
-machine without affecting the output). These characteristics support safe
-incrementality (rebuilding only changed inputs doesn't introduce the risk of
-corruption) and distributability (build actions are isolated and can be
-offloaded). By minimizing the work needed to do a correct build and
-parallelizing that work across multiple cores and remote systems, Bazel can make
-any build fast. Bazel's abstraction layer—instructions specific to languages,
-platforms, and toolchains implemented in a simple extensibility language —
-allows it to be easily applied to any context.
+---
+
+**We believe Bazel has the potential to fulfill this vision.**
+
+Bazel was built from the ground up to enable builds that are reproducible (a
+given set of inputs will always produce the same outputs) and portable (a build
+can be run on any machine without affecting the output).
+
+These characteristics support safe incrementality (rebuilding only changed
+inputs doesn't introduce the risk of corruption) and distributability (build
+actions are isolated and can be offloaded). By minimizing the work needed to do
+a correct build and parallelizing that work across multiple cores and remote
+systems, Bazel can make any build fast.
+
+Bazel's abstraction layer — instructions specific to languages, platforms, and
+toolchains implemented in a simple extensibility language — allows it to be
+easily applied to any context.
## Bazel Core Competencies
@@ -60,9 +68,11 @@ allows it to be easily applied to any context.
## Serving language communities
Software engineering evolves in the context of language communities — typically,
-self-organizing groups of people who use common tools and practices. To be of
-use to members of a language community, high-quality Bazel rules must be
+self-organizing groups of people who use common tools and practices.
+
+To be of use to members of a language community, high-quality Bazel rules must be
available that integrate with the workflows and conventions of that community.
+
Bazel is committed to be extensible and open, and to support good rulesets for
any language.
@@ -84,6 +94,7 @@ any language.
material for new users, comprehensive docs for expert users.
Each of these items is essential and only together do they deliver on Bazel's
-competencies for their particular ecosystem. They are also, by and large,
-sufficient - once all are fulfilled, Bazel fully delivers its value to members
-of that language community.
+competencies for their particular ecosystem.
+
+They are also, by and large, sufficient - once all are fulfilled, Bazel fully
+delivers its value to members of that language community.
| null | train | val | 2020-02-19T04:33:02 | "2020-02-14T23:27:17Z" | gregestren | test |
bazelbuild/bazel/10794_10824 | bazelbuild/bazel | bazelbuild/bazel/10794 | bazelbuild/bazel/10824 | [
"timestamp(timedelta=106792.0, similarity=0.8437765051650821)"
] | 0447bf95eb996cca7530259b93db4882b95bcb84 | null | [] | [] | "2020-02-19T17:21:45Z" | [
"type: documentation (cleanup)",
"P1"
] | Bazel docs - do lightweight content formatting fixes | For example, make https://docs.bazel.build/versions/2.1.0/bazel-vision.html less wall-o'-texty.
The broader goal is to make docs inviting, accessible, not intimidating. The less encyclopedic (i.e. dense) each page is the better.
https://github.com/bazelbuild/bazel/issues/10791 should also help by using bigger fonts and enforcing better maximum column widths. | [
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [
".travis.yml",
"src/main/java/com/google/devtools/build/lib/syntax/BUILD"
] | [] | diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000000..8af1e3ba247017
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+os: linux
+arch: ppc64le
+sudo: required
+language: go
+go:
+- "1.13.x"
+
+jobs:
+ include:
+ - dist: xenial
+ env: dist_version=16.04
+ - dist: bionic
+ env: dist_version=18.04
+
+before_install:
+ - sudo apt update
+ - sudo apt install build-essential python zip unzip gcc
+ - sudo apt install default-jre default-jdk
+
+script:
+ - wget -q https://oplab9.parqtec.unicamp.br/pub/ppc64el/bazel/ubuntu_${dist_version}/bazel_bin_ppc64le_1.0.0
+ - sudo mv bazel_bin_ppc64le_1.0.0 /usr/local/bin/bazel
+ - sudo chmod +x /usr/local/bin/bazel
+ - git clone https://github.com/bazelbuild/bazel
+ - cd bazel
+ - git checkout 314cd3353b018420598188cf54c3f97358baa2e3
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null version
+ - bazel --nomaster_bazelrc --bazelrc=/dev/null info
+ - bazel build --host_javabase=@local_jdk//:jdk -- //src:bazel //src:bazel_jdk_minimal
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BUILD b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
index 82dddf8e367b14..f3d92062d0e09e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/syntax/BUILD
@@ -152,6 +152,7 @@ cc_binary(
name = "libcpu_profiler.so",
srcs = select({
"//src/conditions:darwin": ["cpu_profiler_posix.cc"],
+ "//src/conditions:linux_ppc": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_x86_64": ["cpu_profiler_posix.cc"],
"//conditions:default": ["cpu_profiler_unimpl.cc"],
}),
@@ -165,6 +166,7 @@ cc_library(
name = "jni",
hdrs = ["@bazel_tools//tools/jdk:jni_header"] + select({
"//src/conditions:linux_x86_64": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
+ "//src/conditions:linux_ppc": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
"//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
"//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
"//conditions:default": [],
@@ -172,6 +174,7 @@ cc_library(
includes = ["../../../../../../../../../external/bazel_tools/tools/jdk/include"] + select({
# Remove these crazy prefixes when we move this rule.
"//src/conditions:linux_x86_64": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
+ "//src/conditions:linux_ppc": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/linux"],
"//src/conditions:darwin": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/darwin"],
"//src/conditions:windows": ["../../../../../../../../../external/bazel_tools/tools/jdk/include/win32"],
"//conditions:default": [],
| null | test | val | 2020-02-19T18:11:40 | "2020-02-14T23:27:17Z" | gregestren | test |
bazelbuild/bazel/10867_10915 | bazelbuild/bazel | bazelbuild/bazel/10867 | bazelbuild/bazel/10915 | [
"timestamp(timedelta=0.0, similarity=0.9220770627435996)"
] | 0f99c3cc0b7b82e198c8f365254493fc4713edcd | b5ae666a5563fa2a4c0cdac45bee8438eeee0d1c | [] | [] | "2020-03-06T13:54:41Z" | [
"type: feature request",
"P2",
"area-Windows",
"team-OSS"
] | Make %USERPROFILE%\_netrc the default location for the netrc file on Windows | ### Description of the problem / feature request:
Bazel has a default "netrc" file location under Linux and Mac OS, but not under Windows. This is identified as "TODO" in [http.bzl](https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/repo/http.bzl#L55)
### Feature requests: what underlying problem are you trying to solve with this feature?
Not having a default location for the netrc file on Windows makes it hard to use, especially as http_archive requires an absolute path ( #10689 ). The only supported way is to use a hard-coded path such as "C:/netrc".
### Proposed Solution
Use "%USERPROFILE%/_netrc" as a default location. While GNU does not define any location for Windows, this location is de facto the one being used. This location is used by:
- [curl/libcurl](https://ec.haxx.se/usingcurl/usingcurl-netrc)
- By extension any software using libcurl, including [git credential manager](https://confluence.atlassian.com/bitbucketserver/permanently-authenticating-with-git-repositories-776639846.html)
- [Go langage](https://github.com/search?q=org%3Agolang+%22_netrc%22&type=Code)
- [Heroku Ruby Library](https://github.com/heroku/netrc/blob/master/lib/netrc.rb#L31)
### What operating system are you running Bazel on?
Windows 10
### What's the output of `bazel info release`?
release 2.1.0
| [
"tools/build_defs/repo/http.bzl"
] | [
"tools/build_defs/repo/http.bzl"
] | [
"src/test/shell/bazel/BUILD",
"src/test/shell/bazel/skylark_repository_test.sh",
"src/test/shell/bazel/testing_server.py",
"src/test/shell/testenv.sh"
] | diff --git a/tools/build_defs/repo/http.bzl b/tools/build_defs/repo/http.bzl
index 587dff0c192529..04efba860e305f 100644
--- a/tools/build_defs/repo/http.bzl
+++ b/tools/build_defs/repo/http.bzl
@@ -45,14 +45,17 @@ def _get_auth(ctx, urls):
netrc = read_netrc(ctx, ctx.attr.netrc)
return use_netrc(netrc, urls, ctx.attr.auth_patterns)
- if "HOME" in ctx.os.environ:
- if not ctx.os.name.startswith("windows"):
- netrcfile = "%s/.netrc" % (ctx.os.environ["HOME"],)
- if ctx.execute(["test", "-f", netrcfile]).return_code == 0:
- netrc = read_netrc(ctx, netrcfile)
- return use_netrc(netrc, urls, ctx.attr.auth_patterns)
-
- # TODO: Search at a similarly canonical place for Windows as well
+ if "HOME" in ctx.os.environ and not ctx.os.name.startswith("windows"):
+ netrcfile = "%s/.netrc" % (ctx.os.environ["HOME"])
+ if ctx.execute(["test", "-f", netrcfile]).return_code == 0:
+ netrc = read_netrc(ctx, netrcfile)
+ return use_netrc(netrc, urls, ctx.attr.auth_patterns)
+
+ if "USERPROFILE" in ctx.os.environ and ctx.os.name.startswith("windows"):
+ netrcfile = "%s/.netrc" % (ctx.os.environ["USERPROFILE"])
+ if ctx.path(netrcfile).exists:
+ netrc = read_netrc(ctx, netrcfile)
+ return use_netrc(netrc, urls, ctx.attr.auth_patterns)
return {}
| diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index d47e4d4af52810..12448cd1b7d387 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -729,7 +729,6 @@ sh_test(
],
shard_count = 6,
tags = [
- "no_windows",
"requires-network",
],
)
diff --git a/src/test/shell/bazel/skylark_repository_test.sh b/src/test/shell/bazel/skylark_repository_test.sh
index 3bf128d03436aa..aeea7d660477c8 100755
--- a/src/test/shell/bazel/skylark_repository_test.sh
+++ b/src/test/shell/bazel/skylark_repository_test.sh
@@ -473,7 +473,8 @@ def _impl(repository_ctx):
result = repository_ctx.execute(
[str(repository_ctx.which("bash")), "-c", "echo PWD=\$PWD TOTO=\$TOTO"],
1000000,
- { "TOTO": "titi" })
+ { "TOTO": "titi" },
+ working_directory = "$repo2")
if result.return_code != 0:
fail("Incorrect return code from bash: %s != 0\n%s" % (result.return_code, result.stderr))
print(result.stdout)
@@ -481,6 +482,9 @@ repo = repository_rule(implementation=_impl, local=True)
EOF
bazel build @foo//:bar >& $TEST_log || fail "Failed to build"
+ if "$is_windows"; then
+ repo2="$(cygpath $repo2)"
+ fi
expect_log "PWD=$repo2 TOTO=titi"
}
@@ -974,6 +978,11 @@ EOF
}
function test_skylark_repository_executable_flag() {
+ if "$is_windows"; then
+ # There is no executable flag on Windows.
+ echo "Skipping test_skylark_repository_executable_flag on Windows"
+ return
+ fi
setup_skylark_repository
# Our custom repository rule
@@ -1039,6 +1048,12 @@ EOF
diff "${output_base}/external/foo/download_executable_file.sh" \
"${download_executable_file}" >/dev/null \
|| fail "download_executable_file.sh is not downloaded successfully"
+
+ # No executable flag for file on Windows
+ if "$is_windows"; then
+ return
+ fi
+
# Test executable
test ! -x "${output_base}/external/foo/download_with_sha256.txt" \
|| fail "download_with_sha256.txt is executable"
@@ -1069,6 +1084,12 @@ function test_skylark_repository_context_downloads_return_struct() {
# Start HTTP server with Python
startup_server "${server_dir}"
+ # On Windows, a file url should be file:///C:/foo/bar,
+ # we need to add one more slash at the beginning.
+ if "$is_windows"; then
+ server_dir="/${server_dir}"
+ fi
+
setup_skylark_repository
# Our custom repository rule
cat >test.bzl <<EOF
@@ -1711,10 +1732,16 @@ netrcrepo = repository_rule(
attrs = {"path": attr.string()},
)
EOF
+
+ netrc_dir="$(pwd)"
+ if "$is_windows"; then
+ netrc_dir="$(cygpath -m ${netrc_dir})"
+ fi
+
cat >> $(create_workspace_with_default_repos WORKSPACE) <<EOF
load("//:def.bzl", "netrcrepo")
-netrcrepo(name = "netrc", path="$(pwd)/.netrc")
+netrcrepo(name = "netrc", path="${netrc_dir}/.netrc")
EOF
# ...and that from the parse result, we can read off the
# credentials for example.com.
@@ -1802,12 +1829,18 @@ authrepo = repository_rule(
},
)
EOF
+
+ netrc_dir="$(pwd)"
+ if "$is_windows"; then
+ netrc_dir="$(cygpath -m ${netrc_dir})"
+ fi
+
cat >> $(create_workspace_with_default_repos WORKSPACE) <<EOF
load("//:def.bzl", "authrepo")
authrepo(
name = "auth",
- path="$(pwd)/.netrc",
+ path="${netrc_dir}/.netrc",
urls = [
"http://example.org/public/null.tar",
"https://foo.example.org/file1.tar",
@@ -1922,12 +1955,16 @@ function test_http_archive_netrc() {
tar cvf x.tar x
sha256=$(sha256sum x.tar | head -c 64)
serve_file_auth x.tar
+ netrc_dir="$(pwd)"
+ if "$is_windows"; then
+ netrc_dir="$(cygpath -m ${netrc_dir})"
+ fi
cat > WORKSPACE <<EOF
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name="ext",
url = "http://127.0.0.1:$nc_port/x.tar",
- netrc = "$(pwd)/.netrc",
+ netrc = "${netrc_dir}/.netrc",
sha256="$sha256",
)
EOF
@@ -1955,12 +1992,16 @@ function test_http_archive_auth_patterns() {
tar cvf x.tar x
sha256=$(sha256sum x.tar | head -c 64)
serve_file_auth x.tar
+ netrc_dir="$(pwd)"
+ if "$is_windows"; then
+ netrc_dir="$(cygpath -m ${netrc_dir})"
+ fi
cat > WORKSPACE <<EOF
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name="ext",
url = "http://127.0.0.1:$nc_port/x.tar",
- netrc = "$(pwd)/.netrc",
+ netrc = "${netrc_dir}/.netrc",
sha256="$sha256",
auth_patterns = {
"127.0.0.1": "Bearer <password>"
@@ -1992,6 +2033,9 @@ function test_implicit_netrc() {
serve_file_auth x.tar
export HOME=`pwd`
+ if "$is_windows"; then
+ export USERPROFILE="$(cygpath -m ${HOME})"
+ fi
cat > .netrc <<'EOF'
machine 127.0.0.1
login foo
diff --git a/src/test/shell/bazel/testing_server.py b/src/test/shell/bazel/testing_server.py
index b84f100f2edf57..fd5a0768e42707 100644
--- a/src/test/shell/bazel/testing_server.py
+++ b/src/test/shell/bazel/testing_server.py
@@ -26,11 +26,13 @@
import os.path
try:
from socketserver import TCPServer
- from socketserver import UnixStreamServer
+ if not os.name == 'nt':
+ from socketserver import UnixStreamServer
except ImportError:
# Python 2.x compatibility hack.
from SocketServer import TCPServer
- from SocketServer import UnixStreamServer
+ if not os.name == 'nt':
+ from SocketServer import UnixStreamServer
import random
import socket
import sys
diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh
index d297c86ea342a5..1a92fd733e1a04 100755
--- a/src/test/shell/testenv.sh
+++ b/src/test/shell/testenv.sh
@@ -106,7 +106,7 @@ linux_sandbox="${BAZEL_RUNFILES}/src/main/tools/linux-sandbox"
# Test data
testdata_path=${BAZEL_RUNFILES}/src/test/shell/bazel/testdata
-python_server="${BAZEL_RUNFILES}/src/test/shell/bazel/testing_server.py"
+python_server="$(rlocation io_bazel/src/test/shell/bazel/testing_server.py)"
# Third-party
protoc_compiler="${BAZEL_RUNFILES}/src/test/shell/integration/protoc"
| train | val | 2020-03-10T00:09:43 | "2020-02-26T16:19:35Z" | plule-ansys | test |
bazelbuild/bazel/10913_10970 | bazelbuild/bazel | bazelbuild/bazel/10913 | bazelbuild/bazel/10970 | [
"timestamp(timedelta=1.0, similarity=0.8844322909199289)"
] | 3d2d8b627500307f7317ad9c7b0eecdf20b81674 | 088a910d5c843a72736bfad2336a5a1ea577e583 | [
"/cc @meteorcloudy "
] | [
"We can use bit-operators here to test for the bits in the permission bitmask :)\r\n\r\nExecutable is `0b001 = 1`\r\nWritable is `0b010 = 2`\r\nReadable is `0b100 = 4`\r\n\r\nSo we can replace this with:\r\n\r\n```java\r\nreturn permission & 4;\r\n```",
"Similarly:\r\n```java\r\nreturn permission & 2;\r\n```",
"Similarly:\r\n```java\r\nreturn permission & 1;\r\n```",
"How is this change related?",
"If you want to use some more exotic Java data types, you could use `Optional<BitSet>` for the filePermission type (and `BitSet` in general, rather than an `int`, to store the permissions). Then you could use an `enum` as the keys for the `BitSet` (e.g. `EXECUTABLE = 0, WRITABLE = 1, READABLE = 2`).\r\n\r\nBut using `-1` as the indicator for \"no explicit permissions\" is also fine, if you prefer it. ;)",
"Thanks, I'll use \r\n```java \r\nreturn (permission & 4) == 4\r\n```",
"Done.",
"Done",
"So this test case is for testing an error message is thrown when no input and output file name is specified. Before, we only parse file names from `---` and `+++` lines. But now we also parses file names from `diff --git` line, therefore we should also remove them here to keep the test passing.",
"I tried to use BitSet, but found converting a character (eg. `7`) to a BitSet also requires some steps. The code overall didn't look much cleaner, so I'll keep using `-1` and bit operations ;)"
] | "2020-03-16T16:49:46Z" | [
"type: bug",
"P2"
] | Native patch doesn't preserve executable bit | ### Description of the problem / feature request:
Native patch doesn't preserve the executable bit of the patched file. If you're trying to patch an executable file in a repository, the file will become a non-executable file.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```
.
├── BUILD
├── WORKSPACE
└── rules_apple.patch
```
BUILD is an empty file.
WORKSPACE:
```
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "build_bazel_rules_apple",
commit = "3bbee3a593d1f6ddb3391ba3a99ffe3f09a4821b",
patch_args = ["-p1"],
patches = ["//:rules_apple.patch"],
remote = "https://github.com/bazelbuild/rules_apple.git",
shallow_since = "1582926244 -0800",
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
```
rules_apple.patch (https://github.com/bazelbuild/rules_apple/pull/724.diff):
```diff
diff --git a/tools/dynamic_framework_slicer/dynamic_framework_slicer.sh b/tools/dynamic_framework_slicer/dynamic_framework_slicer.sh
index c271bd80..357edb87 100755
--- a/tools/dynamic_framework_slicer/dynamic_framework_slicer.sh
+++ b/tools/dynamic_framework_slicer/dynamic_framework_slicer.sh
@@ -79,9 +79,14 @@ else
fi
done
+ # Create a thin binary if there's only one needed slice, otherwise create a universal binary
declare -a lipo_args
- for slice in "${slices_needed[@]}"; do
- lipo_args+=(-extract $slice)
- done
+ if [[ "${#slices_needed[@]}" -eq 1 ]]; then
+ lipo_args+=(-thin ${slices_needed[0]})
+ else
+ for slice in "${slices_needed[@]}"; do
+ lipo_args+=(-extract $slice)
+ done
+ fi
xcrun lipo "$IN" "${lipo_args[@]}" -output "$OUT"
fi
```
Run:
```
bazel build @build_bazel_rules_apple//tools/dynamic_framework_slicer
```
Observed error:
```
ERROR: /private/var/tmp/_bazel_admin/36cd6eaac350dd8b1091da163994488a/external/build_bazel_rules_apple/tools/dynamic_framework_slicer/BUILD:3:1: failed to create symbolic link 'external/build_bazel_rules_apple/tools/dynamic_framework_slicer/dynamic_framework_slicer': file 'external/build_bazel_rules_apple/tools/dynamic_framework_slicer/dynamic_framework_slicer.sh' is not executable
Target @build_bazel_rules_apple//tools/dynamic_framework_slicer:dynamic_framework_slicer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.818s, Critical Path: 0.00s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
```
The build succeeds if I use the `patch` command line tool as the patch tool.
### What operating system are you running Bazel on?
macOS Catalina 10.15.3 (19D76).
### What's the output of `bazel info release`?
release 2.2.0
### Have you found anything relevant by searching the web?
Searching with `patch` and `executable` didn't return any relevant issue. | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java"
] | [
"src/test/java/com/google/devtools/build/lib/bazel/repository/PatchUtilTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
index 8c0a2da84a7715..8ab52cdbd56794 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
@@ -156,7 +156,9 @@ private enum LineType {
GIT_HEADER,
RENAME_FROM,
RENAME_TO,
- GIT_LINE,
+ NEW_MODE,
+ NEW_FILE_MODE,
+ OTHER_GIT_LINE,
UNKNOWN
}
@@ -203,9 +205,15 @@ private static LineType getLineType(String line, boolean isReadingChunk, boolean
if (line.startsWith("rename to ")) {
return LineType.RENAME_TO;
}
+ if (line.startsWith("new mode ")) {
+ return LineType.NEW_MODE;
+ }
+ if (line.startsWith("new file mode ")) {
+ return LineType.NEW_FILE_MODE;
+ }
for (String prefix : GIT_LINE_PREFIXES) {
if (line.startsWith(prefix)) {
- return LineType.GIT_LINE;
+ return LineType.OTHER_GIT_LINE;
}
}
}
@@ -229,8 +237,35 @@ private static void writeFile(Path file, List<String> content) throws IOExceptio
FileSystemUtils.writeLinesAs(file, StandardCharsets.UTF_8, content);
}
+ private static boolean getReadPermission(int permission) {
+ // Parse read permission from posix file permission notation
+ return (permission & 4) == 4;
+ }
+
+ private static boolean getWritePermission(int permission) {
+ // Parse write permission from posix file permission notation
+ return (permission & 2) == 2;
+ }
+
+ private static boolean getExecutablePermission(int permission) {
+ // Parse executable permission from posix file permission notation
+ return (permission & 1) == 1;
+ }
+
+ private static int getFilePermissionValue(Path file) throws IOException {
+ return (file.isReadable() ? 4 : 0) +
+ (file.isWritable() ? 2 : 0) +
+ (file.isExecutable() ? 1 : 0);
+ }
+
+ private static void setFilePermission(Path file, int permission) throws IOException {
+ file.setReadable(getReadPermission(permission));
+ file.setWritable(getWritePermission(permission));
+ file.setExecutable((getExecutablePermission(permission)));
+ }
+
private static void applyPatchToFile(
- Patch<String> patch, Path oldFile, Path newFile, boolean isRenaming)
+ Patch<String> patch, Path oldFile, Path newFile, boolean isRenaming, int filePermission)
throws IOException, PatchFailedException {
// The file we should read oldContent from.
Path inputFile = null;
@@ -245,6 +280,10 @@ private static void applyPatchToFile(
oldContent = new ArrayList<>();
} else {
oldContent = readFile(inputFile);
+ // Preserve old file permission if no explicit permission is set.
+ if (filePermission == -1) {
+ filePermission = getFilePermissionValue(inputFile);
+ }
}
List<String> newContent = OffsetPatch.applyTo(patch, oldContent);
@@ -268,6 +307,9 @@ private static void applyPatchToFile(
if (outputFile != null && !isDeleteFile) {
writeFile(outputFile, newContent);
+ if (filePermission != -1) {
+ setFilePermission(outputFile, filePermission);
+ }
}
}
@@ -448,6 +490,7 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
Path newFile = null;
int oldLineCount = 0;
int newLineCount = 0;
+ int filePermission = -1;
Result result;
for (int i = 0; i < patchFileLines.size(); i++) {
@@ -464,6 +507,18 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
newFileStr = extractPath(line, strip, i + 1);
newFile = getFilePath(newFileStr, outputDirectory, i + 1);
break;
+ case NEW_MODE:
+ case NEW_FILE_MODE:
+ // The line should look like: "new mode 100755" or "new file mode 100755"
+ // 7 is the file permission for owner, which is at index 12 or 17
+ int index = type == LineType.NEW_MODE ? 12 : 17;
+ char c = line.charAt(index);
+ if (c < '0' || c > '7') {
+ throw new PatchFailedException(
+ "Wrong file mode format at line "+ (i + 1) + ": " + line);
+ }
+ filePermission = Character.getNumericValue(c);
+ break;
case CHUNK_HEAD:
int pos = line.indexOf("@@", 2);
String headerStr = line.substring(0, pos + 2);
@@ -543,7 +598,7 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
newFile = getFilePath(newFileStr, outputDirectory, i + 1);
}
break;
- case GIT_LINE:
+ case OTHER_GIT_LINE:
break;
case GIT_HEADER:
case UNKNOWN:
@@ -553,7 +608,7 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
// Renaming is a git only format
boolean isRenaming = isGitDiff && hasRenameFrom && hasRenameTo;
- if (!patchContent.isEmpty() || isRenaming) {
+ if (!patchContent.isEmpty() || isRenaming || filePermission != -1) {
// We collected something useful, let's do some sanity checks before applying the patch.
int patchStartLocation = i + 1 - patchContent.size();
@@ -569,7 +624,7 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
checkFilesStatusForPatching(
patch, oldFile, newFile, oldFileStr, newFileStr, patchStartLocation);
- applyPatchToFile(patch, oldFile, newFile, isRenaming);
+ applyPatchToFile(patch, oldFile, newFile, isRenaming, filePermission);
}
patchContent.clear();
@@ -578,11 +633,27 @@ public static void apply(Path patchFile, int strip, Path outputDirectory)
newFileStr = null;
oldFile = null;
newFile = null;
+ filePermission = -1;
oldLineCount = 0;
newLineCount = 0;
isReadingChunk = false;
// If the new patch starts with "diff --git " then it's a git diff.
isGitDiff = type == LineType.GIT_HEADER;
+ if (isGitDiff) {
+ // In case there is no line starting with +++ and --- (file permission change),
+ // try to parse the file names from the line starting with "diff --git"
+ String[] args = line.split(" ");
+ if (args.length >= 4) {
+ oldFileStr = stripPath(args[2], strip);
+ if (!oldFileStr.isEmpty()) {
+ oldFile = getFilePath(oldFileStr, outputDirectory, i + 1);
+ }
+ newFileStr = stripPath(args[3], strip);
+ if (!newFileStr.isEmpty()) {
+ newFile = getFilePath(newFileStr, outputDirectory, i + 1);
+ }
+ }
+ }
hasRenameFrom = false;
hasRenameTo = false;
break;
| diff --git a/src/test/java/com/google/devtools/build/lib/bazel/repository/PatchUtilTest.java b/src/test/java/com/google/devtools/build/lib/bazel/repository/PatchUtilTest.java
index 5fbcace554a2b1..64fb6d0eea7a63 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/repository/PatchUtilTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/repository/PatchUtilTest.java
@@ -50,7 +50,7 @@ public void testAddFile() throws IOException, PatchFailedException {
scratch.file(
"/root/patchfile",
"diff --git a/newfile b/newfile",
- "new file mode 100644",
+ "new file mode 100544",
"index 0000000..f742c88",
"--- /dev/null",
"+++ b/newfile",
@@ -63,6 +63,10 @@ public void testAddFile() throws IOException, PatchFailedException {
Path newFile = root.getRelative("newfile");
ImmutableList<String> newFileContent = ImmutableList.of("I'm a new file", "hello, world");
assertThat(PatchUtil.readFile(newFile)).containsExactlyElementsIn(newFileContent);
+ // Make sure file permission is set as specified.
+ assertThat(newFile.isReadable()).isTrue();
+ assertThat(newFile.isWritable()).isFalse();
+ assertThat(newFile.isExecutable()).isTrue();
}
@Test
@@ -154,6 +158,9 @@ public void testApplyToOldFile() throws IOException, PatchFailedException {
public void testApplyToNewFile() throws IOException, PatchFailedException {
// If only newfile exists, we should patch the new file.
Path newFile = scratch.file("/root/newfile", "line one");
+ newFile.setReadable(true);
+ newFile.setWritable(true);
+ newFile.setExecutable(true);
Path patchFile =
scratch.file(
"/root/patchfile",
@@ -165,6 +172,29 @@ public void testApplyToNewFile() throws IOException, PatchFailedException {
PatchUtil.apply(patchFile, 0, root);
ImmutableList<String> newContent = ImmutableList.of("line one", "line two");
assertThat(PatchUtil.readFile(newFile)).containsExactlyElementsIn(newContent);
+ // Make sure file permission is preserved.
+ assertThat(newFile.isReadable()).isTrue();
+ assertThat(newFile.isWritable()).isTrue();
+ assertThat(newFile.isExecutable()).isTrue();
+ }
+
+ @Test
+ public void testChangeFilePermission() throws IOException, PatchFailedException {
+ Path myFile = scratch.file("/root/test.sh", "line one");
+ myFile.setReadable(true);
+ myFile.setWritable(true);
+ myFile.setExecutable(false);
+ Path patchFile =
+ scratch.file(
+ "/root/patchfile",
+ "diff --git a/test.sh b/test.sh",
+ "old mode 100644",
+ "new mode 100755");
+ PatchUtil.apply(patchFile, 1, root);
+ assertThat(PatchUtil.readFile(myFile)).containsExactlyElementsIn(ImmutableList.of("line one"));
+ assertThat(myFile.isReadable()).isTrue();
+ assertThat(myFile.isWritable()).isTrue();
+ assertThat(myFile.isExecutable()).isTrue();
}
@Test
@@ -378,7 +408,7 @@ public void testMissingBothOldAndNewFile() throws IOException {
Path patchFile =
scratch.file(
"/root/patchfile",
- "diff --git a/foo.cc b/foo.cc",
+ "diff --git a/ b/",
"index f3008f9..ec4aaa0 100644",
"@@ -2,4 +2,5 @@",
" ",
| train | val | 2020-03-16T16:29:47 | "2020-03-06T05:59:43Z" | thii | test |
bazelbuild/bazel/10931_10935 | bazelbuild/bazel | bazelbuild/bazel/10931 | bazelbuild/bazel/10935 | [
"timestamp(timedelta=0.0, similarity=0.9054300288928118)"
] | ff4673260dc2f5de6e0aae3b66af18edf62cadd1 | 73b4c37b025e31156e1daef0cc1bbc9cbd08346e | [
"See also https://github.com/bazelbuild/bazel/blob/master/src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java#L70"
] | [] | "2020-03-10T11:17:47Z" | [
"area-Windows",
"untriaged",
"team-OSS"
] | FilterTestHeaderOutputStream doesn't respect system line separator | `private static final int NEWLINE = '\n';`
https://github.com/bazelbuild/bazel/blob/59f17d6e0550bf63a0b6ef182e2d63474e058ede/src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java#L95
cc @meteorcloudy | [
"src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java"
] | [
"src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java"
] | [
"src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java b/src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java
index 409c10d903a9ce..5023a26af9a3d4 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/TestLogHelper.java
@@ -15,6 +15,7 @@
import com.google.common.io.ByteStreams;
import com.google.devtools.build.lib.exec.TestStrategy.TestOutputFormat;
+import com.google.devtools.build.lib.util.OS;
import com.google.devtools.build.lib.vfs.Path;
import java.io.BufferedOutputStream;
import java.io.FilterOutputStream;
@@ -105,7 +106,9 @@ public void write(int b) throws IOException {
} else if (b == NEWLINE) {
String line = lineBuilder.toString();
lineBuilder = new StringBuilder();
- if (line.equals(TestLogHelper.HEADER_DELIMITER)) {
+ if (line.equals(TestLogHelper.HEADER_DELIMITER) ||
+ // On Windows, the line break could be \r\n, we want this case to work as well.
+ (OS.getCurrent() == OS.WINDOWS && line.equals(TestLogHelper.HEADER_DELIMITER + "\r"))) {
seenDelimiter = true;
}
} else if (lineBuilder.length() <= TestLogHelper.HEADER_DELIMITER.length()) {
| diff --git a/src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java b/src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java
index cc04eadf9d1051..fb044675176cdd 100644
--- a/src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java
+++ b/src/test/java/com/google/devtools/build/lib/exec/StreamedTestOutputTest.java
@@ -66,11 +66,6 @@ public void testNoHeaderOutputsEntireFile() throws IOException {
@Test
public void testOnlyOutputsContentsAfterHeaderWhenPresent() throws IOException {
- if (OS.getCurrent() == OS.WINDOWS) {
- // TODO(b/151095783): Disabled because underlying code doesn't respect system line separator.
- return;
- }
-
Path watchedPath = fileSystem.getPath("/myfile");
FileSystemUtils.writeLinesAs(
watchedPath,
@@ -86,7 +81,8 @@ public void testOnlyOutputsContentsAfterHeaderWhenPresent() throws IOException {
try (StreamedTestOutput underTest =
new StreamedTestOutput(OutErr.create(out, err), fileSystem.getPath("/myfile"))) {}
- assertThat(out.toString(StandardCharsets.UTF_8.name())).isEqualTo("included\nlines\n");
+ assertThat(out.toString(StandardCharsets.UTF_8.name()))
+ .isEqualTo(String.format("included%nlines%n"));
assertThat(err.toString(StandardCharsets.UTF_8.name())).isEmpty();
}
| train | val | 2020-03-10T11:05:47 | "2020-03-09T19:55:02Z" | laurentlb | test |
bazelbuild/bazel/11040_11113 | bazelbuild/bazel | bazelbuild/bazel/11040 | bazelbuild/bazel/11113 | [
"timestamp(timedelta=1.0, similarity=0.8547104776867628)"
] | 59dd64c6eb1347fcca72374fd5758e226f77b5ee | a5bc750eaf13d8debfe537c0f565f20096bb58a5 | [
"Bisecting the problem:\r\n\r\nebb86fcdc202c440a362a54f6b0de8a049dfa84b is the first bad commit\r\n\"bazel packages: record Starlark stack in RuleClass at creation\"\r\n\r\n//CC @alandonovan ",
"cc @laurentlb This is a UI regression.",
"cc/ +Alan Donovan <[email protected]>\n\nOn Sat, Apr 4, 2020 at 8:33 AM Jin <[email protected]> wrote:\n\n> cc @laurentlb <https://github.com/laurentlb> This is a UI regression.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/bazelbuild/bazel/issues/11040#issuecomment-609021971>,\n> or unsubscribe\n> <https://github.com/notifications/unsubscribe-auth/AAXHHHHWXUN4Q2UYR5MPQMLRK4SH5ANCNFSM4LV42EQA>\n> .\n>\n",
"Sorry for the regression. My change (ebb86fc) had the necessary effect of plumbing the callstack from Starlark all the way to repository_rule instantiation, which means that repository_rules now have generator_* attributes, just like ordinary package rules. Though I forgot to mention it in the change description, this was an intentional behavior change that seemed like a good thing.\r\n\r\nIs it a good thing? If so, then the RepositoryResolvedEvent machinery (which I don't understand at all) will need to change in some way to accommodate it. If not, then I will need to suppress the creation of generator_* attributes for repository rules.\r\n\r\nTo me, the first of these approaches seems simpler (though perhaps not easier), because it moves complexity out of the core.\r\n\r\n@laurentl @susinmotion ",
"@brandjon Who owns the WORKSPACE.resolved hack^Wmachinery?",
"I'm afraid no one owns (or is familiar) with this machinery anymore.\r\nBoth approaches seem reasonable to me.",
"According to repository rule [docs](https://docs.bazel.build/versions/3.0.0/skylark/repository_rules.html#implementation-function), repo rule functions may return a dict indicating what params would need to be passed in order to make the call to the repo rule reproducible in the future. Since repo rules now have new implicit attributes, this logic will identify their absence in any returned dict as indicating a problem.\r\n\r\nI'll go ahead and make the repo rule machinery explicitly ignore those particular builtin attributes by hardcoding their names. I'm unaware of any more general mechanism we have for identifying implicit attributes (aside from special character names like `$`, which I don't think applies here).",
"Got it; your solution sounds reasonable. Thanks for investigating.",
"FTR, I was going to give the same treatment to the `name` attribute as well, since it too is implicitly available on every repository rule. But on further reflection, that seems like a bad idea since the returned dictionary feeds into the resolved file machinery (we presumably wouldn't want to encourage users to omit a critical field there)."
] | [] | "2020-04-10T20:22:37Z" | [
"type: bug",
"P0"
] | Warning: Rule '<every remote repository rule>' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"] | I'm seeing these warnings for every remote repository rule on Bazel@HEAD (5c1c0d1ed8643c90fba239d1bc642e4ebd044c2c).
Here are the warnings for [gitiles](https://gerrit.googlesource.com/gitiles) repository:
```
$ bazel build :gitiles
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 0e7d47af-ed3f-4882-8129-8ead508a664b
DEBUG: Rule 'com_googlesource_gerrit_bazlets' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1581093008 -0500" and dropping ["generator_name", "generator_function"]
DEBUG: Repository com_googlesource_gerrit_bazlets instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule git_repository defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18: in <toplevel>
DEBUG: Rule 'rules_java' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"]
DEBUG: Repository rules_java instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"]
DEBUG: Repository rules_cc instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
DEBUG: Rule 'remote_java_tools_linux' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"]
DEBUG: Repository remote_java_tools_linux instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
DEBUG: Rule 'rules_proto' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"]
DEBUG: Repository rules_proto instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
DEBUG: Rule 'remotejdk11_linux' indicated that a canonical reproducible form can be obtained by dropping arguments ["generator_name", "generator_function"]
DEBUG: Repository remotejdk11_linux instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/davido/.cache/bazel/_bazel_davido/9fdffb7f2a398de2e1a63eaee2ea7c50/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
``` | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java"
] | [
"src/test/shell/bazel/workspace_resolved_test.sh"
] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java
index a77d6fa8816fd4..5520eaa70b5d1b 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryResolvedEvent.java
@@ -244,18 +244,32 @@ public static String getRuleDefinitionInformation(Rule rule) {
return buf.toString();
}
+ /**
+ * Attributes that may be defined on a repository rule without affecting its canonical
+ * representation. These may be created implicitly by Bazel.
+ */
+ private static final ImmutableSet<String> IGNORED_ATTRIBUTE_NAMES =
+ ImmutableSet.of("generator_name", "generator_function", "generator_location");
+
/**
* Compare two maps from Strings to objects, returning a pair of the map with all entries not in
* the original map or in the original map, but with a different value, and the keys dropped from
* the original map. However, ignore changes where a value is explicitly set to its default.
+ *
+ * <p>Ignores attributes listed in {@code IGNORED_ATTRIBUTE_NAMES}.
*/
static Pair<Map<String, Object>, List<String>> compare(
Map<String, Object> orig, Map<String, Object> defaults, Map<?, ?> modified) {
ImmutableMap.Builder<String, Object> valuesChanged = ImmutableMap.<String, Object>builder();
for (Map.Entry<?, ?> entry : modified.entrySet()) {
if (entry.getKey() instanceof String) {
- Object value = entry.getValue();
String key = (String) entry.getKey();
+ if (IGNORED_ATTRIBUTE_NAMES.contains(key)) {
+ // The dict returned by the repo rule really shouldn't know about these anyway, but
+ // for symmetry we'll ignore them if they happen to be present.
+ continue;
+ }
+ Object value = entry.getValue();
Object old = orig.get(key);
if (old == null) {
Object defaultValue = defaults.get(key);
@@ -271,6 +285,9 @@ static Pair<Map<String, Object>, List<String>> compare(
}
ImmutableList.Builder<String> keysDropped = ImmutableList.<String>builder();
for (String key : orig.keySet()) {
+ if (IGNORED_ATTRIBUTE_NAMES.contains(key)) {
+ continue;
+ }
if (!modified.containsKey(key)) {
keysDropped.add(key);
}
| diff --git a/src/test/shell/bazel/workspace_resolved_test.sh b/src/test/shell/bazel/workspace_resolved_test.sh
index 12bf50be264349..9a82cf744e4173 100755
--- a/src/test/shell/bazel/workspace_resolved_test.sh
+++ b/src/test/shell/bazel/workspace_resolved_test.sh
@@ -1216,4 +1216,51 @@ EOF
expect_log " TEST_TMPDIR/.*/external/bazel_tools/tools/build_defs/repo/http.bzl:"
}
+# Regression test for #11040.
+#
+# Test that a canonical repo warning is generated for explicitly specified
+# attributes whose values differ, and that it is never generated for implicitly
+# created attributes (in particular, the generator_* attributes).
+test_canonical_warning() {
+ EXTREPODIR=`pwd`
+ tar xvf ${TEST_SRCDIR}/test_WORKSPACE_files/archives.tar
+
+ mkdir main
+ touch main/BUILD
+ cat > main/reporule.bzl <<EOF
+def _impl(repository_ctx):
+ repository_ctx.file("a.txt", "A")
+ repository_ctx.file("BUILD.bazel", "exports_files(['a.txt'])")
+ # Don't include "name", test that we warn about it below.
+ return {"myattr": "bar"}
+
+reporule = repository_rule(
+ implementation = _impl,
+ attrs = {
+ "myattr": attr.string()
+ })
+
+# We need to use a macro for the generator_* attributes to be defined.
+def instantiate_reporule(name, **kwargs):
+ reporule(name=name, **kwargs)
+EOF
+ cat > main/WORKSPACE <<EOF
+workspace(name = "main")
+load("//:reporule.bzl", "instantiate_reporule")
+instantiate_reporule(
+ name = "myrepo",
+ myattr = "foo"
+)
+EOF
+
+ cd main
+ # We should get a warning for "myattr" having a changed value and for "name"
+ # being dropped, but not for the generator_* attributes.
+ bazel sync --distdir=${EXTREPODIR}/test_WORKSPACE/distdir >/dev/null 2>$TEST_log
+ expect_log "Rule 'myrepo' indicated that a canonical reproducible form \
+can be obtained by modifying arguments myattr = \"bar\" and dropping \
+\[.*\"name\".*\]"
+ expect_not_log "Rule 'myrepo' indicated .*generator"
+}
+
run_suite "workspace_resolved_test tests"
| val | val | 2020-04-10T22:05:55 | "2020-03-29T09:25:40Z" | davido | test |
bazelbuild/bazel/11095_11096 | bazelbuild/bazel | bazelbuild/bazel/11095 | bazelbuild/bazel/11096 | [
"timestamp(timedelta=0.0, similarity=0.9228630271523497)"
] | 1af5e991cf205c61f9fdcc9687691c3c5515122e | 1786eb0674379a1f75261c9137924e105e267a56 | [
"cc @gregestren ",
"Figured out the problem:\r\n\r\n```\r\n$ TMP=`mktemp -d /tmp/tmp.XXXXXXXXXX` && bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer --jvm_flag=-Dio.bazel.EnableJni=0 --batch --install_base=${TMP} --output_base=${TMP}/output/ --output_user_root=${TMP} help everything-as-html\r\nApr 08, 2020 3:03:24 PM com.google.devtools.build.lib.analysis.BlazeVersionInfo logVersionInfo\r\nWARNING: Bazel release version information not available\r\nApr 08, 2020 3:03:24 PM com.google.devtools.build.lib.runtime.BlazeRuntime batchMain\r\nINFO: Running Bazel in batch mode with startup args [--batch, --install_base=/tmp/tmp.4SOLYWMRux, --output_base=/tmp/tmp.4SOLYWMRux/output/, --output_user_root=/tmp/tmp.4SOLYWMRux]\r\nApr 08, 2020 3:03:24 PM com.google.devtools.build.lib.bugreport.BugReport logCrash\r\nSEVERE: Crash: java.lang.IllegalArgumentException: Bad --failure_detail_out option specified: 'null' java.lang.IllegalArgumentException: Bad --failure_detail_out option specified: 'null'\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1229)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.batchMain(BlazeRuntime.java:993)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:814)\r\n\tat com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:79)\r\n\r\nApr 08, 2020 3:03:24 PM com.google.devtools.build.lib.bugreport.BugReport sendBugReport\r\nINFO: (Not a released binary; not logged.)\r\njava.lang.IllegalArgumentException: Bad --failure_detail_out option specified: 'null'\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1229)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.batchMain(BlazeRuntime.java:993)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:814)\r\n\tat com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:79)\r\nApr 08, 2020 3:03:24 PM com.google.devtools.build.lib.bugreport.BugReport printThrowableTo\r\nSEVERE: <unknown> crashed\r\njava.lang.IllegalArgumentException: Bad --failure_detail_out option specified: 'null'\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1229)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.batchMain(BlazeRuntime.java:993)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:814)\r\n\tat com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:79)\r\n\r\nERROR: <unknown> crash in async thread:\r\njava.lang.IllegalArgumentException: Bad --failure_detail_out option specified: 'null'\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1229)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.batchMain(BlazeRuntime.java:993)\r\n\tat com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:814)\r\n\tat com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:79)\r\n```\r\n\r\nWe should consider adding the site build target (https://github.com/bazelbuild/bazel/pull/11093), or at least docgen targets, to presubmit.",
"Why does this call the server jar directly?",
"It uses the output of `bazel help everything-as-html` to generate the command line reference.",
"Why doesn't it call the launcher?",
"In https://bazel-review.googlesource.com/c/bazel/+/3880/2/src/main/java/com/google/devtools/build/lib/BUILD#982, @damienmg asked the same question, and @ulfjack said:\r\n\r\n> Tried that, didn't work. By default, there's no JDK in the sandbox, and JAVA_HOME isn't set.\r\n\r\n> Also, the packaging step is fairly expensive, compared to 'just' building the Java binary, so it seemed ok to go with this.",
"Interesting, I filed a breakage on this before too: https://github.com/bazelbuild/bazel/issues/4730\r\n\r\nhttps://github.com/bazelbuild/bazel/issues/4730#issuecomment-369150294 laments that we don't have presubmits for this, which I'm adding in https://github.com/bazelbuild/bazel/pull/11096",
"I feel like that can be revisited, that was from 2016. Also, it seems like getting it to use the launcher would reduce future brittleness.",
"I can definitely do that, but for now, the site generation is broken/blocked, so the fix is rather high priority.",
"Opened https://github.com/bazelbuild/bazel/issues/11102"
] | [
"This is obviously unneeded, but it also makes sense to copy over a tricky preamble like this without changes. So I'm calling it out as OK, in spite of it looking funny.",
"grep -q ....\r\nwill just set an exit status without doing any output.",
"Nice, done."
] | "2020-04-08T07:11:05Z" | [
"type: documentation (cleanup)",
"breakage"
] | //src/main/java/com/google/devtools/build/lib:gen_command-line-reference is broken | Bisected to 09924273efc7050a2e342cd89b823a619ca073f8 (cc @anakanemison)
```
$ bazel build //src/main/java/com/google/devtools/build/lib:gen_command-line-reference --verbose_failures
...
INFO: Analyzed target //src/main/java/com/google/devtools/build/lib:gen_command-line-reference (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/jingwen/bazels/github/src/main/java/com/google/devtools/build/lib/BUILD:756:1: Executing genrule //src/main/java/com/google/devtools/build/lib:gen_command-line-reference failed (Exit 37): bash failed: error executing command
...
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cat site/command-line-reference-prefix.html > bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html && TMP=`mktemp -d /tmp/tmp.XXXXXXXXXX` && bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer --jvm_flag=-Dio.bazel.EnableJni=0 --batch --install_base=${TMP} --output_base=${TMP}/output/ --output_user_root=${TMP} help everything-as-html >> bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html 2>/dev/null && cat site/command-line-reference-suffix.html >> bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html')
Execution platform: //:default_host_platform
Use --sandbox_debug to see verbose messages from the sandbox bash failed: error executing command
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cat site/command-line-reference-prefix.html > bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html && TMP=`mktemp -d /tmp/tmp.XXXXXXXXXX` && bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer --jvm_flag=-Dio.bazel.EnableJni=0 --batch --install_base=${TMP} --output_base=${TMP}/output/ --output_user_root=${TMP} help everything-as-html >> bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html 2>/dev/null && cat site/command-line-reference-suffix.html >> bazel-out/darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/command-line-reference.html')
Execution platform: //:default_host_platform
Use --sandbox_debug to see verbose messages from the sandbox
Target //src/main/java/com/google/devtools/build/lib:gen_command-line-reference failed to build
INFO: Elapsed time: 1.082s, Critical Path: 0.88s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
```
Same error is happening on the Cloud Build job for docs.bazel.build.
https://pantheon.corp.google.com/cloud-build/builds/90b4bb72-5e19-4379-948e-79267dec30fb?project=bazel-public | [
"site/BUILD",
"src/main/java/com/google/devtools/build/lib/BUILD"
] | [
"site/BUILD",
"src/main/java/com/google/devtools/build/lib/BUILD"
] | [
"src/test/shell/bazel/BUILD",
"src/test/shell/bazel/bazel_docgen_test.sh"
] | diff --git a/site/BUILD b/site/BUILD
index d9b4b153d6f4ca..ef3d4ba3c00401 100644
--- a/site/BUILD
+++ b/site/BUILD
@@ -155,6 +155,15 @@ jekyll_build(
srcs = [
"@jekyll_tree_%s//file" % DOC_VERSION["version"].replace(".", "_")
for DOC_VERSION in DOC_VERSIONS
- ] + [":jekyll-tree"], # jekyll-tree *must* come last to be the default.
+ ] + [":jekyll-tree"], # jekyll-tree *must* come last to use layouts and includes from master
bucket = "docs.bazel.build",
)
+
+# A smaller site build target. Contains just the docs for latest released version and master.
+jekyll_build(
+ name = "site_latest",
+ srcs = [
+ "@jekyll_tree_%s//file" % DOC_VERSIONS[0]["version"].replace(".", "_"),
+ ":jekyll-tree", # jekyll-tree *must* come last to use layouts and includes from master
+ ],
+)
diff --git a/src/main/java/com/google/devtools/build/lib/BUILD b/src/main/java/com/google/devtools/build/lib/BUILD
index ff1b09a84296e8..cdbc54ca9c36ab 100644
--- a/src/main/java/com/google/devtools/build/lib/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/BUILD
@@ -711,6 +711,21 @@ java_library(
],
)
+########################################################################
+#
+# Documentation generation
+#
+
+filegroup(
+ name = "generated_docs",
+ srcs = [
+ "//src/main/java/com/google/devtools/build/lib:gen_buildencyclopedia",
+ "//src/main/java/com/google/devtools/build/lib:gen_command-line-reference",
+ "//src/main/java/com/google/devtools/build/lib:gen_skylarklibrary",
+ ],
+ visibility = ["//src/test/shell/bazel:__pkg__"]
+)
+
filegroup(
name = "docs_embedded_in_sources",
srcs = glob(["**/*.java"]) + [
@@ -747,10 +762,7 @@ genrule(
"//src/main/java/com/google/devtools/build/docgen:docgen_bin",
"//src/main/java/com/google/devtools/build/docgen:docgen_javalib",
],
- visibility = [
- "//site:__pkg__",
- "//src/test/shell/bazel:__pkg__",
- ],
+ visibility = ["//site:__pkg__"],
)
genrule(
@@ -766,15 +778,14 @@ genrule(
"$(location //src/main/java/com/google/devtools/build/lib/bazel:BazelServer) " +
"--jvm_flag=-Dio.bazel.EnableJni=0 --batch " +
"--install_base=$${TMP} --output_base=$${TMP}/output/ --output_user_root=$${TMP} " +
+ "--failure_detail_out=$${TMP}/output/failure_detail.rawproto " +
"help everything-as-html >> $@ 2>/dev/null && " +
"cat $(location //site:command-line-reference-suffix.html) >> $@"
),
tools = [
"//src/main/java/com/google/devtools/build/lib/bazel:BazelServer",
],
- visibility = [
- "//site:__pkg__",
- ],
+ visibility = ["//site:__pkg__"],
)
genrule(
| diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index c0f0772756f839..3f69d81de57ab9 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -597,8 +597,9 @@ sh_test(
name = "bazel_docgen_test",
size = "large",
srcs = ["bazel_docgen_test.sh"],
- data = ["//src/main/java/com/google/devtools/build/lib:gen_buildencyclopedia"],
+ data = ["//src/main/java/com/google/devtools/build/lib:generated_docs"],
tags = ["no_windows"],
+ deps = ["@bazel_tools//tools/bash/runfiles"],
)
sh_test(
diff --git a/src/test/shell/bazel/bazel_docgen_test.sh b/src/test/shell/bazel/bazel_docgen_test.sh
index e17a059fba3e0d..11e6f16047e526 100755
--- a/src/test/shell/bazel/bazel_docgen_test.sh
+++ b/src/test/shell/bazel/bazel_docgen_test.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2015 The Bazel Authors. All rights reserved.
+# Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,10 +13,30 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# Test the Bazel documentation generation
-#
-# if we get to run this script, the prerequisite is there, and we're happy.
+# A smoke file test for generated doc files.
+
+set -euo pipefail
+
+# --- begin runfiles.bash initialization v2 ---
+# Copy-pasted from the Bazel Bash runfiles library v2.
+set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash
+source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
+ source "$0.runfiles/$f" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
+# --- end runfiles.bash initialization v2 ---
+
+EXPECTED_ZIPS="build-encyclopedia.zip skylark-library.zip"
+
+for out in $EXPECTED_ZIPS; do
+ filepath="$(rlocation io_bazel/src/main/java/com/google/devtools/build/lib/$out)"
+ # Test that the file has a corrected ZIP structure.
+ zipinfo "$filepath" 1>/dev/null
+done
-echo PASS
+COMMAND_LINE_REF_FILE="$(rlocation io_bazel/src/main/java/com/google/devtools/build/lib/command-line-reference.html)"
+# Test that the file contains (at least) the title string.
+grep -q "Command-Line Reference" "$COMMAND_LINE_REF_FILE"
| test | val | 2020-04-08T09:31:35 | "2020-04-08T06:54:24Z" | jin | test |
bazelbuild/bazel/11105_11213 | bazelbuild/bazel | bazelbuild/bazel/11105 | bazelbuild/bazel/11213 | [
"timestamp(timedelta=34109.0, similarity=0.8699825378818541)"
] | 241904e3a26b7dfb39fe97085c1281e9f91c2359 | a48ee432b7ce82f44f7d66f7488aed21fc8e0090 | [
"There simply is not enough to triage this.\r\nHow did you build the container that causes this?\r\nIs this actually an error in container setup, or a normal use case?",
"Hi,\r\nlooks like I am running in to the same problem.\r\n\r\nI have a proxmox server and created a LXC Debain 10 container in it.\r\n\r\n\r\n\r\n```\r\n[lxc]~/bazel_examples/examples/cpp-tutorial/stage1 (master) $ bazel build --verbose_failures //main:hello-world \r\nStarting local Bazel server and connecting to it...\r\n\r\nServer terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/home/sfos/.cache/bazel/_bazel_sfos/3f321be1cafa1793bc6eb1acb8b9c579/server/jvm.out')\r\n\r\n[lxc]~/bazel_examples/examples/cpp-tutorial/stage1 (master) $ cat /home/sfos/.cache/bazel/_bazel_sfos/3f321be1cafa1793bc6eb1acb8b9c579/server/jvm.out\r\njava.lang.IllegalArgumentException: Multiple entries with same key: Writeback=1056 and Writeback=1056\r\n\tat com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:215)\r\n\tat com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:209)\r\n\tat com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:147)\r\n\tat com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:110)\r\n\tat com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:393)\r\n\tat com.google.devtools.build.lib.unix.ProcMeminfoParser.<init>(ProcMeminfoParser.java:62)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMbHelper(LocalHostResourceManagerLinux.java:86)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMb(LocalHostResourceManagerLinux.java:40)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getLocalHostResources(LocalHostResourceManagerLinux.java:46)\r\n\tat com.google.devtools.build.lib.actions.LocalHostCapacity.getNewLocalHostCapacity(LocalHostCapacity.java:46)\r\n\tat com.google.devtools.build.lib.actions.LocalHostCapacity.getLocalHostCapacity(LocalHostCapacity.java:34)\r\n\tat com.google.devtools.build.lib.runtime.LoadingPhaseThreadsOption$LoadingPhaseThreadCountConverter.lambda$new$0(LoadingPhaseThreadsOption.java:54)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.applyOperator(ResourceConverter.java:136)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:122)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:41)\r\n\tat com.google.devtools.common.options.OptionDefinition.getDefaultValue(OptionDefinition.java:271)\r\n\tat com.google.devtools.common.options.OptionValueDescription$DefaultOptionValueDescription.getValue(OptionValueDescription.java:123)\r\n\tat com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:378)\r\n\tat com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:325)\r\n\tat com.google.devtools.common.options.OptionsParser.parseWithSourceFunction(OptionsParser.java:653)\r\n\tat com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseArgsAndConfigs(BlazeOptionHandler.java:200)\r\n\tat com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseOptions(BlazeOptionHandler.java:267)\r\n\tat com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:275)\r\n\tat com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:208)\r\n\tat com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:603)\r\n\tat com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:663)\r\n\tat io.grpc.Context$1.run(Context.java:595)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.base/java.lang.Thread.run(Unknown Source)\r\nERROR: bazel crash in async thread:\r\njava.lang.IllegalArgumentException: Multiple entries with same key: Writeback=1056 and Writeback=1056\r\n\tat com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:215)\r\n\tat com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:209)\r\n\tat com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:147)\r\n\tat com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:110)\r\n\tat com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:393)\r\n\tat com.google.devtools.build.lib.unix.ProcMeminfoParser.<init>(ProcMeminfoParser.java:62)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMbHelper(LocalHostResourceManagerLinux.java:86)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMb(LocalHostResourceManagerLinux.java:40)\r\n\tat com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getLocalHostResources(LocalHostResourceManagerLinux.java:46)\r\n\tat com.google.devtools.build.lib.actions.LocalHostCapacity.getNewLocalHostCapacity(LocalHostCapacity.java:46)\r\n\tat com.google.devtools.build.lib.actions.LocalHostCapacity.getLocalHostCapacity(LocalHostCapacity.java:34)\r\n\tat com.google.devtools.build.lib.runtime.LoadingPhaseThreadsOption$LoadingPhaseThreadCountConverter.lambda$new$0(LoadingPhaseThreadsOption.java:54)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.applyOperator(ResourceConverter.java:136)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:122)\r\n\tat com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:41)\r\n\tat com.google.devtools.common.options.OptionDefinition.getDefaultValue(OptionDefinition.java:271)\r\n\tat com.google.devtools.common.options.OptionValueDescription$DefaultOptionValueDescription.getValue(OptionValueDescription.java:123)\r\n\tat com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:378)\r\n\tat com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:325)\r\n\tat com.google.devtools.common.options.OptionsParser.parseWithSourceFunction(OptionsParser.java:653)\r\n\tat com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseArgsAndConfigs(BlazeOptionHandler.java:200)\r\n\tat com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseOptions(BlazeOptionHandler.java:267)\r\n\tat com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:275)\r\n\tat com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:208)\r\n\tat com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:603)\r\n\tat com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:663)\r\n\tat io.grpc.Context$1.run(Context.java:595)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.base/java.lang.Thread.run(Unknown Source)\r\n```\r\n\r\n```\r\n$ bazel version\r\nStarting local Bazel server and connecting to it...\r\nBuild label: 3.1.0\r\nBuild target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar\r\nBuild time: Wed Apr 22 10:32:27 2020 (1587551547)\r\nBuild timestamp: 1587551547\r\nBuild timestamp as int: 1587551547\r\n```\r\n\r\n```\r\n# cat /proc/meminfo | grep Writeback\r\nWriteback: 1056 kB\r\nWriteback: 1056 kB\r\n```",
"This should be easy to fix. Do you want to send a patch?",
"from reading the code the fix is most likely:\r\n\r\n```diff\r\ndiff --git a/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java b/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java\r\nindex dcfe8086f8..c3c15367c8 100644\r\n--- a/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java\r\n+++ b/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java\r\n@@ -54,7 +54,9 @@ public class ProcMeminfoParser {\r\n String valString = line.substring(colon + 1);\r\n try {\r\n long val = Long.parseLong(CharMatcher.inRange('0', '9').retainFrom(valString));\r\n- builder.put(keyword, val);\r\n+ if (!builder.containsKey(keyword)) {\r\n+ builder.put(keyword, val);\r\n+ }\r\n } catch (NumberFormatException e) {\r\n // Ignore: we'll fail later if somebody tries to capture this value.\r\n }\r\n\r\n```\r\n\r\nbut need to build it for testing, \r\nwhich is not possible on this machine do to the bug.\r\n\r\nUpdate:\r\n\r\nshort update, the `ImmutableMap.Builder` does not have a `containsKey` only `ImmutableMap`.\r\na bit more code restructure is needed, will open a PR when I get it working.",
"Should be fixed by ae03671e73e0a1933f0514019e33e357b1fb6050 unless I'm mistaken."
] | [
"Just change this into `memInfo = ImmutableMap.copyOf(newMemInfo);`, and drop the builder variable above. No need to create three maps if two are enough.",
"The code implements first wins, but this asserts last wins. Did you actually run the test?",
"good point, changed",
"No, since I where confused by the documentation, \r\nwhat are the values I need to use for the `...`?\r\nin this command ```bazel test //src/... //third_party/ijar/...```",
"Can you add documentation here what happens if there are duplicate entries?",
"`bazel test //src/test/java/com/google/devtools/build/lib:unix_test` is probably good enough for local testing in this case. :-)\r\n",
"updated"
] | "2020-04-24T11:49:42Z" | [
"more data needed",
"untriaged",
"team-Local-Exec"
] | Duplicate entries in `/proc/meminfo` make bazel server crash |
### Description of the problem / feature request:
running `bazel build //:hello_world` leads to
```
$ bazel build //:hello_world
Starting local Bazel server and connecting to it...
Server terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/home/dark/.cache/bazel/_bazel_dark/37eeb5c8b6e4daaae7f4d5edfdef7735/server/jvm.out')
```
jvm.out:
```
java.lang.IllegalArgumentException: Multiple entries with same key: Writeback=0 and Writeback=0
at com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:215)
at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:209)
at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:147)
at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:110)
at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:393)
at com.google.devtools.build.lib.unix.ProcMeminfoParser.<init>(ProcMeminfoParser.java:62)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMbHelper(LocalHostResourceManagerLinux.java:86)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMb(LocalHostResourceManagerLinux.java:40)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getLocalHostResources(LocalHostResourceManagerLinux.java:46)
at com.google.devtools.build.lib.actions.LocalHostCapacity.getNewLocalHostCapacity(LocalHostCapacity.java:46)
at com.google.devtools.build.lib.actions.LocalHostCapacity.getLocalHostCapacity(LocalHostCapacity.java:34)
at com.google.devtools.build.lib.runtime.LoadingPhaseThreadsOption$LoadingPhaseThreadCountConverter.lambda$new$0(LoadingPhaseThreadsOption.java:54)
at com.google.devtools.build.lib.util.ResourceConverter.applyOperator(ResourceConverter.java:136)
at com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:122)
at com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:41)
at com.google.devtools.common.options.OptionDefinition.getDefaultValue(OptionDefinition.java:270)
at com.google.devtools.common.options.OptionValueDescription$DefaultOptionValueDescription.getValue(OptionValueDescription.java:123)
at com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:378)
at com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:325)
at com.google.devtools.common.options.OptionsParser.parseWithSourceFunction(OptionsParser.java:642)
at com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseArgsAndConfigs(BlazeOptionHandler.java:207)
at com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseOptions(BlazeOptionHandler.java:274)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:275)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:208)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:603)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:659)
at io.grpc.Context$1.run(Context.java:595)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
ERROR: bazel crash in async thread:
java.lang.IllegalArgumentException: Multiple entries with same key: Writeback=0 and Writeback=0
at com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:215)
at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:209)
at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:147)
at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:110)
at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:393)
at com.google.devtools.build.lib.unix.ProcMeminfoParser.<init>(ProcMeminfoParser.java:62)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMbHelper(LocalHostResourceManagerLinux.java:86)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getMemoryInMb(LocalHostResourceManagerLinux.java:40)
at com.google.devtools.build.lib.actions.LocalHostResourceManagerLinux.getLocalHostResources(LocalHostResourceManagerLinux.java:46)
at com.google.devtools.build.lib.actions.LocalHostCapacity.getNewLocalHostCapacity(LocalHostCapacity.java:46)
at com.google.devtools.build.lib.actions.LocalHostCapacity.getLocalHostCapacity(LocalHostCapacity.java:34)
at com.google.devtools.build.lib.runtime.LoadingPhaseThreadsOption$LoadingPhaseThreadCountConverter.lambda$new$0(LoadingPhaseThreadsOption.java:54)
at com.google.devtools.build.lib.util.ResourceConverter.applyOperator(ResourceConverter.java:136)
at com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:122)
at com.google.devtools.build.lib.util.ResourceConverter.convert(ResourceConverter.java:41)
at com.google.devtools.common.options.OptionDefinition.getDefaultValue(OptionDefinition.java:270)
at com.google.devtools.common.options.OptionValueDescription$DefaultOptionValueDescription.getValue(OptionValueDescription.java:123)
at com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:378)
at com.google.devtools.common.options.OptionsParserImpl.parse(OptionsParserImpl.java:325)
at com.google.devtools.common.options.OptionsParser.parseWithSourceFunction(OptionsParser.java:642)
at com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseArgsAndConfigs(BlazeOptionHandler.java:207)
at com.google.devtools.build.lib.runtime.BlazeOptionHandler.parseOptions(BlazeOptionHandler.java:274)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:275)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:208)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:603)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$2(GrpcServerImpl.java:659)
at io.grpc.Context$1.run(Context.java:595)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
> Replace this line with your answer.
### What operating system are you running Bazel on?
```
$ uname -a
Linux buildbox 5.3.13-2-pve #1 SMP PVE 5.3.13-2 (Fri, 24 Jan 2020 09:49:36 +0100) x86_64 x86_64 x86_64 GNU/Linux
```
/proc/meminfo
```
MemTotal: 100663296 kB
MemFree: 93340676 kB
MemAvailable: 98430428 kB
Buffers: 0 kB
Cached: 5089752 kB
SwapCached: 0 kB
Active: 4217336 kB
Inactive: 1956280 kB
Active(anon): 1565476 kB
Inactive(anon): 745800 kB
Active(file): 2651860 kB
Inactive(file): 1210480 kB
Unevictable: 0 kB
Mlocked: 5336 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 733396 kB
Mapped: 43032 kB
Shmem: 1577880 kB
KReclaimable: 1557508 kB
Slab: 0 kB
SReclaimable: 0 kB
SUnreclaim: 0 kB
KernelStack: 41392 kB
PageTables: 103680 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
Writeback: 0 kB
CommitLimit: 65929152 kB
Committed_AS: 19702672 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 3950392 kB
VmallocChunk: 0 kB
Percpu: 564736 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 94660008 kB
DirectMap2M: 37351424 kB
DirectMap1G: 2097152 kB
```
### What's the output of `bazel info release`?
```
$ bazel info release
Starting local Bazel server and connecting to it...
Server terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/home/dark/.cache/bazel/_bazel_dark/37eeb5c8b6e4daaae7f4d5edfdef7735/server/jvm.out')
```
### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
this is official release of 2.2.0
```
$ bazel version
Starting local Bazel server and connecting to it...
Build label: 2.2.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Mar 3 09:26:12 2020 (1583227572)
Build timestamp: 1583227572
Build timestamp as int: 1583227572
```
### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
This isn't a git repo.
### Have you found anything relevant by searching the web?
No, but I've found tests
https://github.com/bazelbuild/bazel/blob/1f684e1b87cd8881a0a4b33e86ba66743e32d674/src/test/java/com/google/devtools/build/lib/actions/LocalHostResourceManagerLinuxTest.java
that seem to not cover this case
### Any other information, logs, or outputs that you want to share?
See above | [
"src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java"
] | [
"src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java"
] | [
"src/test/java/com/google/devtools/build/lib/unix/ProcMeminfoParserTest.java"
] | diff --git a/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java b/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java
index dcfe8086f8eb68..92dd93cc2d6a77 100644
--- a/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java
+++ b/src/main/java/com/google/devtools/build/lib/unix/ProcMeminfoParser.java
@@ -23,9 +23,12 @@
import java.nio.charset.Charset;
import java.util.List;
import java.util.Map;
+import java.util.HashMap;
/**
* Parse and return information from /proc/meminfo.
+ * In case of duplicate entries the first one is used
+ * and other values are skipped.
*/
public class ProcMeminfoParser {
@@ -44,7 +47,7 @@ public ProcMeminfoParser() throws IOException {
@VisibleForTesting
public ProcMeminfoParser(String fileName) throws IOException {
List<String> lines = Files.readLines(new File(fileName), Charset.defaultCharset());
- ImmutableMap.Builder<String, Long> builder = ImmutableMap.builder();
+ Map<String, Long> newMemInfo = new HashMap<>();
for (String line : lines) {
int colon = line.indexOf(':');
if (colon == -1) {
@@ -54,12 +57,14 @@ public ProcMeminfoParser(String fileName) throws IOException {
String valString = line.substring(colon + 1);
try {
long val = Long.parseLong(CharMatcher.inRange('0', '9').retainFrom(valString));
- builder.put(keyword, val);
+ if (!newMemInfo.containsKey(keyword)) {
+ newMemInfo.put(keyword, val);
+ }
} catch (NumberFormatException e) {
// Ignore: we'll fail later if somebody tries to capture this value.
}
}
- memInfo = builder.build();
+ memInfo = ImmutableMap.copyOf(newMemInfo);
}
/** Gets a named field in KB. */
| diff --git a/src/test/java/com/google/devtools/build/lib/unix/ProcMeminfoParserTest.java b/src/test/java/com/google/devtools/build/lib/unix/ProcMeminfoParserTest.java
index 059c58ae24fdc8..fff62cddfafdae 100644
--- a/src/test/java/com/google/devtools/build/lib/unix/ProcMeminfoParserTest.java
+++ b/src/test/java/com/google/devtools/build/lib/unix/ProcMeminfoParserTest.java
@@ -66,6 +66,7 @@ public void memInfo() throws Exception {
"Hugepagesize: 2048 kB",
"Bogus: not_a_number",
"Bogus2: 1000000000000000000000000000000000000000000000000 kB",
+ "Writeback: 123 kB",
"Not even a valid line"
);
@@ -75,6 +76,7 @@ public void memInfo() throws Exception {
assertThat(memInfo.getFreeRamKb()).isEqualTo(14717640);
assertThat(memInfo.getRamKb("Cached")).isEqualTo(509940);
assertThat(memInfo.getTotalKb()).isEqualTo(3091732);
+ assertThat(memInfo.getRamKb("Writeback")).isEqualTo(0);
assertThrows(ProcMeminfoParser.KeywordNotFoundException.class,
() -> memInfo.getRamKb("Bogus"));
assertThrows(ProcMeminfoParser.KeywordNotFoundException.class,
| val | val | 2020-04-24T10:43:26 | "2020-04-09T01:06:02Z" | DarkDimius | test |
bazelbuild/bazel/11186_11190 | bazelbuild/bazel | bazelbuild/bazel/11186 | bazelbuild/bazel/11190 | [
"timestamp(timedelta=0.0, similarity=0.8680651548178261)"
] | 990a7de2a07a33d4a50d3ec55085728074e5b2b4 | 78451bda21c192a757e50e47c83d349c47ecbf03 | [] | [
"very attentive :)",
"isn't this supposed to be `file://` (note the double slash?)",
"(I keep forgetting that this syntax exists)",
"No, the syntax is, apparently, file:(path), where path can be relative to the current directory or absolute. This matches the previous implementation.",
"Me too."
] | "2020-04-22T13:33:09Z" | [
"type: bug",
"P2",
"team-Rules-Java"
] | java_stub_template improperly qualifies paths | In [java_stub_template.txt](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt;drc=02f8da948bf3955304a4cef9399bd3907430bbc4;l=298), when building the classpath for the manifest file, every path entry is first qualified with the working directory, even when the path is already an absolute path.
The code should check for relative paths before qualifying them. | [
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt"
] | [
"src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
index 1aac7f8c90c131..41b3362ba863f6 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
@@ -288,28 +288,41 @@ ARGS=(
function create_and_run_classpath_jar() {
- # Build class path as one single string separated by spaces
- MANIFEST_CLASSPATH=""
+ # Build class path.
+ MANIFEST_CLASSPATH=()
if is_windows; then
CLASSPATH_SEPARATOR=";"
- URI_PREFIX="file:/" # e.g. "file:/C:/temp/foo.jar"
else
CLASSPATH_SEPARATOR=":"
- URI_PREFIX="file:$(pwd)/" # e.g. "file:/usr/local/foo.jar"
fi
- URI_PREFIX=${URI_PREFIX//\//\\/}
- MANIFEST_CLASSPATH="${CLASSPATH_SEPARATOR}${CLASSPATH}"
+ OLDIFS="$IFS"
+ IFS="${CLASSPATH_SEPARATOR}" # Use a custom separator for the loop.
+ for path in ${CLASSPATH}; do
+ # Convert spaces to %20
- MANIFEST_CLASSPATH=$(sed "s/ /%20/g" <<< "${MANIFEST_CLASSPATH}")
- MANIFEST_CLASSPATH=$(sed "s/$CLASSPATH_SEPARATOR/ $URI_PREFIX/g" <<< "${MANIFEST_CLASSPATH}")
+ if is_windows; then
+ path="file:/${path}" # e.g. "file:/C:/temp/foo.jar"
+ else
+ # If not absolute, qualify the path
+ case "${path}" in
+ /*) ;; # Already an absolute path
+ *) path="$(pwd)/${path}";; # Now qualified
+ esac
+ path="file:${path}" # e.g. "file:/usr/local/foo.jar"
+ fi
+
+ path=$(sed "s/ /%20/g" <<< "${path}")
+ MANIFEST_CLASSPATH+=("${path}")
+ done
+ IFS="$OLDIFS"
# Create manifest file
MANIFEST_FILE="$(mktemp -t XXXXXXXX.jar_manifest)"
(
echo "Manifest-Version: 1.0"
- CLASSPATH_LINE="Class-Path:$MANIFEST_CLASSPATH"
+ CLASSPATH_LINE="Class-Path: ${MANIFEST_CLASSPATH[*]}"
CLASSPATH_MANIFEST_LINES=$(sed -E $'s/(.{71})/\\1\\\n /g' <<< "${CLASSPATH_LINE}")
echo "$CLASSPATH_MANIFEST_LINES"
| null | train | val | 2020-04-22T15:03:47 | "2020-04-22T12:18:10Z" | katre | test |
bazelbuild/bazel/11223_11225 | bazelbuild/bazel | bazelbuild/bazel/11223 | bazelbuild/bazel/11225 | [
"timestamp(timedelta=1.0, similarity=0.8557589510761733)"
] | 76d895aa28d0511bcd9c42c1961644ef03a6088c | 519da8e908695f6a754cef8d040742fb77ec2073 | [
"I've submitted a potential fix for this that appears to solve my repro case locally https://github.com/bazelbuild/bazel/pull/11225"
] | [
"```suggestion\r\n ImmutableSet<Artifact> ccLibs = ImmutableSet.copyOf(objcProvider.getCcLibraries());\r\n```",
"Thanks! I was trying to find the nicer invocation here",
"`copyOf` is most likely more efficient too. Depending on the type of `getCcLibraries` it can allocate a set of right size and copy elements from it without resizing. A builder allocates a buffer of default size which is fine for small collections, but with large collections it would thrown away right after `addAll` call."
] | "2020-04-25T00:08:50Z" | [
"type: bug",
"P3",
"team-Rules-CPP"
] | Duplicate symbols from apple_static_library with Swift | When using the `ios_static_framework` rule from rules_apple, which has an underlying `apple_static_library` target. If you have a dependency tree like this:
```
ios_static_framework
swift_library
objc_library
cc_library
```
The symbols from the `cc_library` target end up duplicated in the final binary. Our assumption is that it has something to do with this comment https://github.com/bazelbuild/bazel/blob/1645eb8ac6a1df5f7f41599039113bba9f081c89/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java#L760-L765 since the `cc_library` targets get added to the ObjcProvider's `library` field by rules_swift https://github.com/bazelbuild/rules_swift/blob/2ebfc403ffdb428befd38e25e236ae181aa1a49b/swift/internal/compiling.bzl#L1486-L1501 which is required for normal cases, but appears to cause this duplication issue when fully linking the binary.
Here's a small sample project that repros this: [duplicatesymbols.zip](https://github.com/bazelbuild/bazel/files/4531969/duplicatesymbols.zip)
With this project run `bazel build ios_framework`, you will then see this warning:
```
/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning same member name (ccfoo_8ef19ba5cbaeb2c2d18053f5cec4195e.o) in output file used for input files: bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libcclib.a(ccfoo_8ef19ba5cbaeb2c2d18053f5cec4195e.o) and: bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libcclib.a(ccfoo_8ef19ba5cbaeb2c2d18053f5cec4195e.o) due to use of basename, truncation and blank paddingf
```
and if you unzip the produced framework and run `nm` on it you can see the duplication:
```
% nm swiftlib.framework/swiftlib
swiftlib.framework/swiftlib(swiftfoo.swift_942f052b5affefc31fa39383ae5d7835.o):
0000000000000000 T _$s8swiftlib3fooyyF
0000000000000018 S ___swift_reflection_version
U __swift_FORCE_LOAD_$_swiftCompatibility50
0000000000000008 S __swift_FORCE_LOAD_$_swiftCompatibility50_$_swiftlib
U __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements
0000000000000010 S __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_swiftlib
000000000000001a s l_llvm.swift_module_hash
swiftlib.framework/swiftlib(objcfoo_a34b0088e5e8bcbb11ab6edade8e425b.o):
U _OBJC_CLASS_$_NSObject
00000000000000c0 S _OBJC_CLASS_$_objcfoo
U _OBJC_METACLASS_$_NSObject
0000000000000098 S _OBJC_METACLASS_$_objcfoo
U __objc_empty_cache
0000000000000050 s l_OBJC_CLASS_RO_$_objcfoo
0000000000000008 s l_OBJC_METACLASS_RO_$_objcfoo
swiftlib.framework/swiftlib(ccfoo_8ef19ba5cbaeb2c2d18053f5cec4195e.o):
0000000000000000 T __Z6cc_foov
swiftlib.framework/swiftlib(ccfoo_8ef19ba5cbaeb2c2d18053f5cec4195e.o):
0000000000000000 T __Z6cc_foov
```
where `__Z6cc_foov` should only be there once.
You can also see the cc_library archive is passed twice in the libtool invocation:
```
external/local_config_cc/libtool \
-no_warning_for_no_symbols \
-static \
-arch_only x86_64 \
-syslibroot __BAZEL_XCODE_SDKROOT__ \
-o \
bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/ios_framework.apple_static_library-fl.a \
bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libswiftlib.a \
bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libobjclib.a \
bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libcclib.a \
bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-fastbuild-ST-96e8508176c304a494afa69d0efb2bff98cc46f1bcec8e953485b6ad02335d21/bin/libcclib.a
```
### What operating system are you running Bazel on?
macOS
### What's the output of `bazel info release`?
release 3.1.0
### Have you found anything relevant by searching the web?
No, it sounds like Google probably isn't using `ios_static_framework` with Swift much yet, so this hasn't been hit internally.
### Any other information, logs, or outputs that you want to share?
I spent some time poking around this code:
https://github.com/bazelbuild/bazel/blob/f7d726f88f20c871d274b75a01f6a64d186403dc/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java#L189-L201
since I expect adding both sets of libraries here may be related, but I haven't been able to come up with a fix. | [
"src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java"
] | [
"src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java"
] | [] | diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java
index 969e419e418ed1..160ca6939a6aac 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcVariablesExtension.java
@@ -18,8 +18,10 @@
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.LINKOPT;
import com.google.common.base.Preconditions;
+import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
@@ -189,9 +191,18 @@ private void addArchiveVariables(CcToolchainVariables.Builder builder) {
private void addFullyLinkArchiveVariables(CcToolchainVariables.Builder builder) {
builder.addStringVariable(
FULLY_LINKED_ARCHIVE_PATH_VARIABLE_NAME, fullyLinkArchive.getExecPathString());
+
+ // ObjcProvider.getObjcLibraries contains both libraries from objc providers
+ // as well as those from CcInfo. ObjcProvider.getCcLibraries only contains
+ // those from CcInfo. We have to split these lists to make sure duplicate
+ // libraries are not included in the fully linked archive.
+ ImmutableSet<Artifact> ccLibs = ImmutableSet.copyOf(objcProvider.getCcLibraries());
+ Predicate<Artifact> isNotCcLib = library -> !ccLibs.contains(library);
+ Iterable<Artifact> objcLibraries = Iterables.filter(objcProvider.getObjcLibraries(), isNotCcLib);
+
builder.addStringSequenceVariable(
OBJC_LIBRARY_EXEC_PATHS_VARIABLE_NAME,
- Artifact.toExecPaths(objcProvider.getObjcLibraries()));
+ Artifact.toExecPaths(objcLibraries));
builder.addStringSequenceVariable(
CC_LIBRARY_EXEC_PATHS_VARIABLE_NAME,
Artifact.toExecPaths(objcProvider.getCcLibraries()));
| null | val | val | 2020-10-29T01:52:17 | "2020-04-24T23:29:04Z" | keith | test |
provectus/kafka-ui/21_23 | provectus/kafka-ui | provectus/kafka-ui/21 | provectus/kafka-ui/23 | [
"timestamp(timedelta=0.0, similarity=0.8520123272679944)",
"connected"
] | c26edd1316e7878376d60223206ecb767240f6d7 | bdea7099cbc16a56fda4cf62960f77f9be75a33b | [] | [] | "2020-04-09T14:20:23Z" | [
"scope/frontend"
] | customizable: Time to retain data | Field Time to retain data in topic creation should be customizable. Now it's only allow to choose from enum | [
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/New/New.tsx",
"kafka-ui-react-app/src/lib/constants.ts"
] | [
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/New/New.tsx",
"kafka-ui-react-app/src/components/Topics/New/TimeToRetain.tsx",
"kafka-ui-react-app/src/lib/constants.ts"
] | [] | diff --git a/kafka-ui-react-app/package-lock.json b/kafka-ui-react-app/package-lock.json
index 4a2ad5ff718..1ba845e9bae 100644
--- a/kafka-ui-react-app/package-lock.json
+++ b/kafka-ui-react-app/package-lock.json
@@ -10478,6 +10478,11 @@
"json-parse-better-errors": "^1.0.1"
}
},
+ "parse-ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
+ "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA=="
+ },
"parse5": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
@@ -11686,6 +11691,14 @@
"react-is": "^16.8.4"
}
},
+ "pretty-ms": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-6.0.1.tgz",
+ "integrity": "sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==",
+ "requires": {
+ "parse-ms": "^2.1.0"
+ }
+ },
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index 9f52b99ed9d..cee64d5651e 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -22,6 +22,7 @@
"json-server": "^0.15.1",
"lodash": "^4.17.15",
"node-sass": "^4.13.1",
+ "pretty-ms": "^6.0.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-hook-form": "^4.5.5",
diff --git a/kafka-ui-react-app/src/components/Topics/New/New.tsx b/kafka-ui-react-app/src/components/Topics/New/New.tsx
index c5dfe688df9..51b53f6078b 100644
--- a/kafka-ui-react-app/src/components/Topics/New/New.tsx
+++ b/kafka-ui-react-app/src/components/Topics/New/New.tsx
@@ -2,12 +2,13 @@ import React from 'react';
import { ClusterName, CleanupPolicy, TopicFormData, TopicName } from 'redux/interfaces';
import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
import { clusterTopicsPath } from 'lib/paths';
-import { useForm, ErrorMessage } from 'react-hook-form';
+import { useForm, FormContext, ErrorMessage } from 'react-hook-form';
+
import {
TOPIC_NAME_VALIDATION_PATTERN,
- MILLISECONDS_IN_DAY,
BYTES_IN_GB,
} from 'lib/constants';
+import TimeToRetain from './TimeToRetain';
interface Props {
clusterName: ClusterName;
@@ -24,17 +25,17 @@ const New: React.FC<Props> = ({
redirectToTopicPath,
resetUploadedState
}) => {
- const {register, handleSubmit, errors, getValues} = useForm<TopicFormData>();
+ const methods = useForm<TopicFormData>();
const [isSubmitting, setIsSubmitting] = React.useState<boolean>(false);
React.useEffect(
() => {
if (isSubmitting && isTopicCreated) {
- const {name} = getValues();
+ const {name} = methods.getValues();
redirectToTopicPath(clusterName, name);
}
},
- [isSubmitting, isTopicCreated, redirectToTopicPath, clusterName, getValues],
+ [isSubmitting, isTopicCreated, redirectToTopicPath, clusterName, methods.getValues],
);
const onSubmit = async (data: TopicFormData) => {
@@ -59,192 +60,168 @@ const New: React.FC<Props> = ({
</div>
<div className="box">
- <form onSubmit={handleSubmit(onSubmit)}>
- <div className="columns">
- <div className="column is-three-quarters">
- <label className="label">
- Topic Name *
- </label>
- <input
- className="input"
- placeholder="Topic Name"
- ref={register({
- required: 'Topic Name is required.',
- pattern: {
- value: TOPIC_NAME_VALIDATION_PATTERN,
- message: 'Only alphanumeric, _, -, and . allowed',
- },
- })}
- name="name"
- autoComplete="off"
- disabled={isSubmitting}
- />
- <p className="help is-danger">
- <ErrorMessage errors={errors} name="name"/>
- </p>
- </div>
+ <FormContext {...methods}>
+ <form onSubmit={methods.handleSubmit(onSubmit)}>
+ <div className="columns">
+ <div className="column is-three-quarters">
+ <label className="label">
+ Topic Name *
+ </label>
+ <input
+ className="input"
+ placeholder="Topic Name"
+ ref={methods.register({
+ required: 'Topic Name is required.',
+ pattern: {
+ value: TOPIC_NAME_VALIDATION_PATTERN,
+ message: 'Only alphanumeric, _, -, and . allowed',
+ },
+ })}
+ name="name"
+ autoComplete="off"
+ disabled={isSubmitting}
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={methods.errors} name="name"/>
+ </p>
+ </div>
- <div className="column">
- <label className="label">
- Number of partitions *
- </label>
- <input
- className="input"
- type="number"
- placeholder="Number of partitions"
- defaultValue="1"
- ref={register({required: 'Number of partitions is required.'})}
- name="partitions"
- disabled={isSubmitting}
- />
- <p className="help is-danger">
- <ErrorMessage errors={errors} name="partitions"/>
- </p>
- </div>
- </div>
-
- <div className="columns">
- <div className="column">
- <label className="label">
- Replication Factor *
- </label>
- <input
- className="input"
- type="number"
- placeholder="Replication Factor"
- defaultValue="1"
- ref={register({required: 'Replication Factor is required.'})}
- name="replicationFactor"
- disabled={isSubmitting}
- />
- <p className="help is-danger">
- <ErrorMessage errors={errors} name="replicationFactor"/>
- </p>
+ <div className="column">
+ <label className="label">
+ Number of partitions *
+ </label>
+ <input
+ className="input"
+ type="number"
+ placeholder="Number of partitions"
+ defaultValue="1"
+ ref={methods.register({required: 'Number of partitions is required.'})}
+ name="partitions"
+ disabled={isSubmitting}
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={methods.errors} name="partitions"/>
+ </p>
+ </div>
</div>
- <div className="column">
- <label className="label">
- Min In Sync Replicas *
- </label>
- <input
- className="input"
- type="number"
- placeholder="Replication Factor"
- defaultValue="1"
- ref={register({required: 'Min In Sync Replicas is required.'})}
- name="minInSyncReplicas"
- disabled={isSubmitting}
- />
- <p className="help is-danger">
- <ErrorMessage errors={errors} name="minInSyncReplicas"/>
- </p>
- </div>
- </div>
-
- <div className="columns">
- <div className="column is-one-third">
- <label className="label">
- Cleanup policy
- </label>
- <div className="select is-block">
- <select
- defaultValue={CleanupPolicy.Delete}
- name="cleanupPolicy"
- ref={register}
+ <div className="columns">
+ <div className="column">
+ <label className="label">
+ Replication Factor *
+ </label>
+ <input
+ className="input"
+ type="number"
+ placeholder="Replication Factor"
+ defaultValue="1"
+ ref={methods.register({required: 'Replication Factor is required.'})}
+ name="replicationFactor"
disabled={isSubmitting}
- >
- <option value={CleanupPolicy.Delete}>
- Delete
- </option>
- <option value={CleanupPolicy.Compact}>
- Compact
- </option>
- </select>
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={methods.errors} name="replicationFactor"/>
+ </p>
</div>
- </div>
- <div className="column is-one-third">
- <label className="label">
- Time to retain data
- </label>
- <div className="select is-block">
- <select
- defaultValue={MILLISECONDS_IN_DAY * 7}
- name="retentionMs"
- ref={register}
+ <div className="column">
+ <label className="label">
+ Min In Sync Replicas *
+ </label>
+ <input
+ className="input"
+ type="number"
+ placeholder="Replication Factor"
+ defaultValue="1"
+ ref={methods.register({required: 'Min In Sync Replicas is required.'})}
+ name="minInSyncReplicas"
disabled={isSubmitting}
- >
- <option value={MILLISECONDS_IN_DAY / 2}>
- 12 hours
- </option>
- <option value={MILLISECONDS_IN_DAY}>
- 1 day
- </option>
- <option value={MILLISECONDS_IN_DAY * 2}>
- 2 days
- </option>
- <option value={MILLISECONDS_IN_DAY * 7}>
- 1 week
- </option>
- <option value={MILLISECONDS_IN_DAY * 7 * 4}>
- 4 weeks
- </option>
- </select>
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={methods.errors} name="minInSyncReplicas"/>
+ </p>
</div>
</div>
- <div className="column is-one-third">
- <label className="label">
- Max size on disk in GB
- </label>
- <div className="select is-block">
- <select
- defaultValue={-1}
- name="retentionBytes"
- ref={register}
- disabled={isSubmitting}
- >
- <option value={-1}>
- Not Set
- </option>
- <option value={BYTES_IN_GB}>
- 1 GB
- </option>
- <option value={BYTES_IN_GB * 10}>
- 10 GB
- </option>
- <option value={BYTES_IN_GB * 20}>
- 20 GB
- </option>
- <option value={BYTES_IN_GB * 50}>
- 50 GB
- </option>
- </select>
+ <div className="columns">
+ <div className="column is-one-third">
+ <label className="label">
+ Cleanup policy
+ </label>
+ <div className="select is-block">
+ <select
+ defaultValue={CleanupPolicy.Delete}
+ name="cleanupPolicy"
+ ref={methods.register}
+ disabled={isSubmitting}
+ >
+ <option value={CleanupPolicy.Delete}>
+ Delete
+ </option>
+ <option value={CleanupPolicy.Compact}>
+ Compact
+ </option>
+ </select>
+ </div>
+ </div>
+
+ <div className="column is-one-third">
+ <TimeToRetain isSubmitting={isSubmitting} />
+ </div>
+
+ <div className="column is-one-third">
+ <label className="label">
+ Max size on disk in GB
+ </label>
+ <div className="select is-block">
+ <select
+ defaultValue={-1}
+ name="retentionBytes"
+ ref={methods.register}
+ disabled={isSubmitting}
+ >
+ <option value={-1}>
+ Not Set
+ </option>
+ <option value={BYTES_IN_GB}>
+ 1 GB
+ </option>
+ <option value={BYTES_IN_GB * 10}>
+ 10 GB
+ </option>
+ <option value={BYTES_IN_GB * 20}>
+ 20 GB
+ </option>
+ <option value={BYTES_IN_GB * 50}>
+ 50 GB
+ </option>
+ </select>
+ </div>
</div>
</div>
- </div>
-
- <div className="columns">
- <div className="column">
- <label className="label">
- Maximum message size in bytes *
- </label>
- <input
- className="input"
- type="number"
- defaultValue="1000012"
- ref={register({required: 'Maximum message size in bytes is required'})}
- name="maxMessageBytes"
- disabled={isSubmitting}
- />
- <p className="help is-danger">
- <ErrorMessage errors={errors} name="maxMessageBytes"/>
- </p>
+
+ <div className="columns">
+ <div className="column">
+ <label className="label">
+ Maximum message size in bytes *
+ </label>
+ <input
+ className="input"
+ type="number"
+ defaultValue="1000012"
+ ref={methods.register({required: 'Maximum message size in bytes is required'})}
+ name="maxMessageBytes"
+ disabled={isSubmitting}
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={methods.errors} name="maxMessageBytes"/>
+ </p>
+ </div>
</div>
- </div>
- <input type="submit" className="button is-primary" disabled={isSubmitting}/>
- </form>
+ <input type="submit" className="button is-primary" disabled={isSubmitting}/>
+ </form>
+ </FormContext>
</div>
</div>
);
diff --git a/kafka-ui-react-app/src/components/Topics/New/TimeToRetain.tsx b/kafka-ui-react-app/src/components/Topics/New/TimeToRetain.tsx
new file mode 100644
index 00000000000..871ce4c3d4c
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Topics/New/TimeToRetain.tsx
@@ -0,0 +1,53 @@
+import React from 'react';
+import prettyMilliseconds from 'pretty-ms';
+import { useFormContext, ErrorMessage } from 'react-hook-form';
+import { MILLISECONDS_IN_WEEK } from 'lib/constants';
+
+const MILLISECONDS_IN_SECOND = 1000;
+
+interface Props {
+ isSubmitting: boolean;
+}
+
+const TimeToRetain: React.FC<Props> = ({
+ isSubmitting,
+}) => {
+ const { register, errors, watch } = useFormContext();
+ const defaultValue = MILLISECONDS_IN_WEEK;
+ const name: string = 'retentionMs';
+ const watchedValue: any = watch(name, defaultValue.toString());
+
+ const valueHint = React.useMemo(() => {
+ const value = parseInt(watchedValue, 10);
+ return value >= MILLISECONDS_IN_SECOND ? prettyMilliseconds(value) : false;
+ }, [watchedValue])
+
+ return (
+ <>
+ <label className="label">
+ Time to retain data (in ms)
+ </label>
+ <input
+ className="input"
+ type="number"
+ defaultValue={defaultValue}
+ name={name}
+ ref={register(
+ { min: { value: -1, message: 'must be greater than or equal to -1' }}
+ )}
+ disabled={isSubmitting}
+ />
+ <p className="help is-danger">
+ <ErrorMessage errors={errors} name={name}/>
+ </p>
+ {
+ valueHint &&
+ <p className="help is-info">
+ {valueHint}
+ </p>
+ }
+ </>
+ );
+}
+
+export default TimeToRetain;
diff --git a/kafka-ui-react-app/src/lib/constants.ts b/kafka-ui-react-app/src/lib/constants.ts
index 554de1b02f3..ad518d4669a 100644
--- a/kafka-ui-react-app/src/lib/constants.ts
+++ b/kafka-ui-react-app/src/lib/constants.ts
@@ -10,6 +10,6 @@ export const BASE_URL = process.env.REACT_APP_API_URL;
export const TOPIC_NAME_VALIDATION_PATTERN = RegExp(/^[.,A-Za-z0-9_-]+$/);
-export const MILLISECONDS_IN_DAY = 86_400_000;
+export const MILLISECONDS_IN_WEEK = 604_800_000;
export const BYTES_IN_GB = 1_073_741_824;
| null | val | train | 2020-04-07T10:15:48 | "2020-04-09T11:27:18Z" | germanosin | train |
provectus/kafka-ui/24_26 | provectus/kafka-ui | provectus/kafka-ui/24 | provectus/kafka-ui/26 | [
"timestamp(timedelta=1.0, similarity=0.8749427837031752)",
"connected"
] | ea9426e8dd817e8a667679d9f2a17a738c4b2a42 | e2918b41ca928283339f256e552b0643e501bc92 | [] | [
"```suggestion\r\n \"pre-commit\": \"yarn tsc --noEmit && lint-staged\"\r\n```",
"For preventing of commit uncompilable ts code.",
"Is it really need?",
"my bad, when I was reinstalling husky looks like it overwrote the pre-commit hook",
"@workshur @Gataniel What do you think about switch on that rule?",
"@Gataniel We can do that in context of separate ticket. \"Turn `@typescript-eslint/explicit-function-return-type` rule ON and fix all broken functions then\"",
"ok 👍 "
] | "2020-04-10T13:54:28Z" | [
"type/enhancement",
"scope/frontend"
] | Add ESlint | Please add ESlint with strict config. Ask @aMoRRoMa about best config | [
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx"
] | [
"kafka-ui-react-app/.editorconfig",
"kafka-ui-react-app/.eslintrc.json",
"kafka-ui-react-app/.prettierrc",
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx"
] | [] | diff --git a/kafka-ui-react-app/.editorconfig b/kafka-ui-react-app/.editorconfig
new file mode 100644
index 00000000000..11695dbd4ce
--- /dev/null
+++ b/kafka-ui-react-app/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+end_of_line = lf
+indent_style = space
+indent_size = 2
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/kafka-ui-react-app/.eslintrc.json b/kafka-ui-react-app/.eslintrc.json
new file mode 100644
index 00000000000..aa2aca13cd7
--- /dev/null
+++ b/kafka-ui-react-app/.eslintrc.json
@@ -0,0 +1,59 @@
+{
+ "env": {
+ "browser": true,
+ "es6": true
+ },
+ "globals": {
+ "Atomics": "readonly",
+ "SharedArrayBuffer": "readonly"
+ },
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaFeatures": {
+ "jsx": true
+ },
+ "ecmaVersion": 2018,
+ "sourceType": "module"
+ },
+ "plugins": ["react", "@typescript-eslint", "prettier"],
+ "extends": [
+ "plugin:react/recommended",
+ "airbnb",
+ "plugin:prettier/recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ "rules": {
+ "import/extensions": [
+ "error",
+ "ignorePackages",
+ {
+ "js": "never",
+ "jsx": "never",
+ "ts": "never",
+ "tsx": "never"
+ }
+ ],
+ "prettier/prettier": "error",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "react/jsx-filename-extension": [
+ 1,
+ { "extensions": [".js", ".jsx", ".ts", ".tsx"] }
+ ]
+ },
+ "overrides": [
+ {
+ "files": ["**/*.tsx"],
+ "rules": {
+ "react/prop-types": "off"
+ }
+ }
+ ],
+ "settings": {
+ "import/resolver": {
+ "node": {
+ "extensions": [".js", ".jsx", ".ts", ".tsx"]
+ }
+ }
+ }
+}
diff --git a/kafka-ui-react-app/.prettierrc b/kafka-ui-react-app/.prettierrc
new file mode 100644
index 00000000000..c1a6f667131
--- /dev/null
+++ b/kafka-ui-react-app/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "singleQuote": true,
+ "trailingComma": "es5"
+}
diff --git a/kafka-ui-react-app/package-lock.json b/kafka-ui-react-app/package-lock.json
index 1ba845e9bae..a1a04432953 100644
--- a/kafka-ui-react-app/package-lock.json
+++ b/kafka-ui-react-app/package-lock.json
@@ -949,12 +949,21 @@
}
},
"@babel/runtime-corejs3": {
- "version": "7.7.6",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.7.6.tgz",
- "integrity": "sha512-NrRUehqG0sMSCaP+0XV/vOvvjNl4BQOWq3Qys1Q2KTEm5tGMo9h0dHnIzeKerj0a7SIB8LP5kYg/T1raE3FoKQ==",
+ "version": "7.9.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz",
+ "integrity": "sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA==",
+ "dev": true,
"requires": {
"core-js-pure": "^3.0.0",
- "regenerator-runtime": "^0.13.2"
+ "regenerator-runtime": "^0.13.4"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
+ "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
+ "dev": true
+ }
}
},
"@babel/template": {
@@ -1445,6 +1454,11 @@
"resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.2.9.tgz",
"integrity": "sha512-MNl+rT5UmZeilaPxAVs6YaPC2m6aA8rofviZbhbxpPpl61uKodfdQVsBtgJGTqGizEf02oW3tsVe7FYB8kK14A=="
},
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
+ },
"@types/eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
@@ -1510,9 +1524,9 @@
}
},
"@types/json-schema": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz",
- "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A=="
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
+ "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA=="
},
"@types/lodash": {
"version": "4.14.149",
@@ -1643,48 +1657,48 @@
"integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg=="
},
"@typescript-eslint/eslint-plugin": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.12.0.tgz",
- "integrity": "sha512-1t4r9rpLuEwl3hgt90jY18wJHSyb0E3orVL3DaqwmpiSDHmHiSspVsvsFF78BJ/3NNG3qmeso836jpuBWYziAA==",
+ "version": "2.27.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz",
+ "integrity": "sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw==",
"requires": {
- "@typescript-eslint/experimental-utils": "2.12.0",
- "eslint-utils": "^1.4.3",
+ "@typescript-eslint/experimental-utils": "2.27.0",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
"tsutils": "^3.17.1"
}
},
"@typescript-eslint/experimental-utils": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz",
- "integrity": "sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==",
+ "version": "2.27.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz",
+ "integrity": "sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw==",
"requires": {
"@types/json-schema": "^7.0.3",
- "@typescript-eslint/typescript-estree": "2.12.0",
- "eslint-scope": "^5.0.0"
+ "@typescript-eslint/typescript-estree": "2.27.0",
+ "eslint-scope": "^5.0.0",
+ "eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.12.0.tgz",
- "integrity": "sha512-lPdkwpdzxEfjI8TyTzZqPatkrswLSVu4bqUgnB03fHSOwpC7KSerPgJRgIAf11UGNf7HKjJV6oaPZI4AghLU6g==",
+ "version": "2.27.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.27.0.tgz",
+ "integrity": "sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg==",
"requires": {
"@types/eslint-visitor-keys": "^1.0.0",
- "@typescript-eslint/experimental-utils": "2.12.0",
- "@typescript-eslint/typescript-estree": "2.12.0",
+ "@typescript-eslint/experimental-utils": "2.27.0",
+ "@typescript-eslint/typescript-estree": "2.27.0",
"eslint-visitor-keys": "^1.1.0"
}
},
"@typescript-eslint/typescript-estree": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz",
- "integrity": "sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==",
+ "version": "2.27.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz",
+ "integrity": "sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg==",
"requires": {
"debug": "^4.1.1",
"eslint-visitor-keys": "^1.1.0",
"glob": "^7.1.6",
"is-glob": "^4.0.1",
- "lodash.unescape": "4.0.1",
+ "lodash": "^4.17.15",
"semver": "^6.3.0",
"tsutils": "^3.17.1"
}
@@ -1877,9 +1891,9 @@
}
},
"acorn": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
- "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ=="
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
+ "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg=="
},
"acorn-globals": {
"version": "4.3.4",
@@ -1898,9 +1912,9 @@
}
},
"acorn-jsx": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz",
- "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw=="
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
+ "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ=="
},
"acorn-walk": {
"version": "6.2.0",
@@ -2158,6 +2172,16 @@
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
+ "array.prototype.flat": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
+ "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1"
+ }
+ },
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
@@ -2272,13 +2296,9 @@
"integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A=="
},
"axobject-query": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.1.tgz",
- "integrity": "sha512-lF98xa/yvy6j3fBHAgQXIYl+J4eZadOSqsPojemUqClzNbBV38wWGpUbQbVEyf4eUF5yF7eHmGgGA2JiHyjeqw==",
- "requires": {
- "@babel/runtime": "^7.7.4",
- "@babel/runtime-corejs3": "^7.7.4"
- }
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz",
+ "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ=="
},
"babel-code-frame": {
"version": "6.26.0",
@@ -3990,6 +4010,12 @@
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
+ "compare-versions": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
+ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
+ "dev": true
+ },
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -4202,9 +4228,10 @@
}
},
"core-js-pure": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.5.0.tgz",
- "integrity": "sha512-wB0QtKAofWigiISuT1Tej3hKgq932fB//Lf1VoPbiLpTYlHY0nIDhgF+q1na0DAKFHH5wGCirkAknOmDN8ijXA=="
+ "version": "3.6.4",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz",
+ "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==",
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -4570,9 +4597,9 @@
}
},
"damerau-levenshtein": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz",
- "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA=="
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
+ "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug=="
},
"dashdash": {
"version": "1.14.1",
@@ -4849,6 +4876,26 @@
"path-type": "^3.0.0"
}
},
+ "dnode": {
+ "version": "git+https://github.com/christianvuerings/dnode.git#e08e620b18c9086d47fe68e08328b19465c62fb7",
+ "from": "git+https://github.com/christianvuerings/dnode.git#e08e620b18c9086d47fe68e08328b19465c62fb7",
+ "dev": true,
+ "requires": {
+ "dnode-protocol": "~0.2.2",
+ "jsonify": "~0.0.0",
+ "weak-napi": "^1.0.3"
+ }
+ },
+ "dnode-protocol": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/dnode-protocol/-/dnode-protocol-0.2.2.tgz",
+ "integrity": "sha1-URUdFvw7X4SBXuC5SXoQYdDRlJ0=",
+ "dev": true,
+ "requires": {
+ "jsonify": "~0.0.0",
+ "traverse": "~0.6.3"
+ }
+ },
"dns-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
@@ -5217,9 +5264,9 @@
}
},
"eslint": {
- "version": "6.7.2",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz",
- "integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==",
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
+ "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
"requires": {
"@babel/code-frame": "^7.0.0",
"ajv": "^6.10.0",
@@ -5260,10 +5307,18 @@
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
+ "eslint-utils": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+ "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "requires": {
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
"globals": {
- "version": "12.3.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
- "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
+ "version": "12.4.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
+ "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
"requires": {
"type-fest": "^0.8.1"
}
@@ -5289,6 +5344,45 @@
}
}
},
+ "eslint-config-airbnb": {
+ "version": "18.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.1.0.tgz",
+ "integrity": "sha512-kZFuQC/MPnH7KJp6v95xsLBf63G/w7YqdPfQ0MUanxQ7zcKUNG8j+sSY860g3NwCBOa62apw16J6pRN+AOgXzw==",
+ "dev": true,
+ "requires": {
+ "eslint-config-airbnb-base": "^14.1.0",
+ "object.assign": "^4.1.0",
+ "object.entries": "^1.1.1"
+ }
+ },
+ "eslint-config-airbnb-base": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.1.0.tgz",
+ "integrity": "sha512-+XCcfGyCnbzOnktDVhwsCAx+9DmrzEmuwxyHUJpw+kqBVT744OUBrB09khgFKlK1lshVww6qXGsYPZpavoNjJw==",
+ "dev": true,
+ "requires": {
+ "confusing-browser-globals": "^1.0.9",
+ "object.assign": "^4.1.0",
+ "object.entries": "^1.1.1"
+ }
+ },
+ "eslint-config-prettier": {
+ "version": "6.10.1",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz",
+ "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==",
+ "dev": true,
+ "requires": {
+ "get-stdin": "^6.0.0"
+ },
+ "dependencies": {
+ "get-stdin": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
+ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
+ "dev": true
+ }
+ }
+ },
"eslint-config-react-app": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.1.0.tgz",
@@ -5298,12 +5392,12 @@
}
},
"eslint-import-resolver-node": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
- "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz",
+ "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==",
"requires": {
"debug": "^2.6.9",
- "resolve": "^1.5.0"
+ "resolve": "^1.13.1"
},
"dependencies": {
"debug": {
@@ -5318,6 +5412,14 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "resolve": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
+ "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
}
}
},
@@ -5334,9 +5436,9 @@
}
},
"eslint-module-utils": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz",
- "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
+ "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
"requires": {
"debug": "^2.6.9",
"pkg-dir": "^2.0.0"
@@ -5412,27 +5514,30 @@
}
},
"eslint-plugin-import": {
- "version": "2.18.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
- "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==",
+ "version": "2.20.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz",
+ "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==",
+ "dev": true,
"requires": {
"array-includes": "^3.0.3",
+ "array.prototype.flat": "^1.2.1",
"contains-path": "^0.1.0",
"debug": "^2.6.9",
"doctrine": "1.5.0",
"eslint-import-resolver-node": "^0.3.2",
- "eslint-module-utils": "^2.4.0",
+ "eslint-module-utils": "^2.4.1",
"has": "^1.0.3",
"minimatch": "^3.0.4",
"object.values": "^1.1.0",
"read-pkg-up": "^2.0.0",
- "resolve": "^1.11.0"
+ "resolve": "^1.12.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -5441,6 +5546,7 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+ "dev": true,
"requires": {
"esutils": "^2.0.2",
"isarray": "^1.0.0"
@@ -5450,6 +5556,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
"requires": {
"locate-path": "^2.0.0"
}
@@ -5458,6 +5565,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@@ -5469,6 +5577,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
@@ -5477,12 +5586,14 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
"requires": {
"p-try": "^1.0.0"
}
@@ -5491,6 +5602,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
"requires": {
"p-limit": "^1.1.0"
}
@@ -5498,12 +5610,14 @@
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "dev": true,
"requires": {
"error-ex": "^1.2.0"
}
@@ -5512,6 +5626,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "dev": true,
"requires": {
"pify": "^2.0.0"
}
@@ -5519,12 +5634,14 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "dev": true,
"requires": {
"load-json-file": "^2.0.0",
"normalize-package-data": "^2.3.2",
@@ -5535,6 +5652,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "dev": true,
"requires": {
"find-up": "^2.0.0",
"read-pkg": "^2.0.0"
@@ -5565,36 +5683,118 @@
}
}
},
+ "eslint-plugin-prettier": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz",
+ "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==",
+ "dev": true,
+ "requires": {
+ "prettier-linter-helpers": "^1.0.0"
+ }
+ },
"eslint-plugin-react": {
- "version": "7.16.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz",
- "integrity": "sha512-GacBAATewhhptbK3/vTP09CbFrgUJmBSaaRcWdbQLFvUZy9yVcQxigBNHGPU/KE2AyHpzj3AWXpxoMTsIDiHug==",
+ "version": "7.19.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz",
+ "integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==",
+ "dev": true,
"requires": {
- "array-includes": "^3.0.3",
+ "array-includes": "^3.1.1",
"doctrine": "^2.1.0",
"has": "^1.0.3",
- "jsx-ast-utils": "^2.2.1",
- "object.entries": "^1.1.0",
- "object.fromentries": "^2.0.0",
- "object.values": "^1.1.0",
+ "jsx-ast-utils": "^2.2.3",
+ "object.entries": "^1.1.1",
+ "object.fromentries": "^2.0.2",
+ "object.values": "^1.1.1",
"prop-types": "^15.7.2",
- "resolve": "^1.12.0"
+ "resolve": "^1.15.1",
+ "semver": "^6.3.0",
+ "string.prototype.matchall": "^4.0.2",
+ "xregexp": "^4.3.0"
},
"dependencies": {
+ "array-includes": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
+ "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0",
+ "is-string": "^1.0.5"
+ }
+ },
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
"requires": {
"esutils": "^2.0.2"
}
+ },
+ "es-abstract": {
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
+ }
+ },
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
+ "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
}
}
},
"eslint-plugin-react-hooks": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz",
- "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA=="
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz",
+ "integrity": "sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==",
+ "dev": true
},
"eslint-scope": {
"version": "5.0.0",
@@ -5606,9 +5806,9 @@
}
},
"eslint-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
- "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
+ "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
@@ -5619,12 +5819,12 @@
"integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A=="
},
"espree": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz",
- "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
+ "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
"requires": {
- "acorn": "^7.1.0",
- "acorn-jsx": "^5.1.0",
+ "acorn": "^7.1.1",
+ "acorn-jsx": "^5.2.0",
"eslint-visitor-keys": "^1.1.0"
}
},
@@ -5633,12 +5833,87 @@
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
+ "esprint": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/esprint/-/esprint-0.6.0.tgz",
+ "integrity": "sha512-pmnhbskul594uRBbFUdOmIaeDuOK9b/a3t0TMZDdKkSZgekFeESH9/t3CVBebuhEKDl8im4i+YhPg1cUw65lgQ==",
+ "dev": true,
+ "requires": {
+ "dnode": "git+https://github.com/christianvuerings/dnode.git#e08e620b18c9086d47fe68e08328b19465c62fb7",
+ "fb-watchman": "^2.0.0",
+ "glob": "^7.1.4",
+ "sane": "^4.1.0",
+ "worker-farm": "^1.7.0",
+ "yargs": "^14.0.0"
+ },
+ "dependencies": {
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
+ "yargs": {
+ "version": "14.2.3",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
+ "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
+ "dev": true,
+ "requires": {
+ "cliui": "^5.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^3.0.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^3.0.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^15.0.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "15.0.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
+ "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
+ }
+ },
"esquery": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
- "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz",
+ "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==",
"requires": {
- "estraverse": "^4.0.0"
+ "estraverse": "^5.0.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz",
+ "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A=="
+ }
}
},
"esrecurse": {
@@ -5982,6 +6257,12 @@
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
+ "fast-diff": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
+ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
+ "dev": true
+ },
"fast-glob": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
@@ -6048,9 +6329,9 @@
"integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w=="
},
"figures": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz",
- "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"requires": {
"escape-string-regexp": "^1.0.5"
}
@@ -6151,6 +6432,15 @@
"locate-path": "^3.0.0"
}
},
+ "find-versions": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
+ "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
+ "dev": true,
+ "requires": {
+ "semver-regex": "^2.0.0"
+ }
+ },
"flat-cache": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
@@ -6162,9 +6452,9 @@
}
},
"flatted": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
- "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg=="
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA=="
},
"flatten": {
"version": "1.0.3",
@@ -6479,6 +6769,23 @@
"pump": "^3.0.0"
}
},
+ "get-symbol-from-current-process-h": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz",
+ "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==",
+ "dev": true,
+ "optional": true
+ },
+ "get-uv-event-loop-napi-h": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz",
+ "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "get-symbol-from-current-process-h": "^1.0.1"
+ }
+ },
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@@ -6506,9 +6813,9 @@
}
},
"glob-parent": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
- "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"requires": {
"is-glob": "^4.0.1"
}
@@ -6999,6 +7306,172 @@
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
},
+ "husky": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz",
+ "integrity": "sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^4.0.0",
+ "ci-info": "^2.0.0",
+ "compare-versions": "^3.6.0",
+ "cosmiconfig": "^6.0.0",
+ "find-versions": "^3.2.0",
+ "opencollective-postinstall": "^2.0.2",
+ "pkg-dir": "^4.2.0",
+ "please-upgrade-node": "^3.2.0",
+ "slash": "^3.0.0",
+ "which-pm-runs": "^1.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
+ "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+ "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+ "dev": true,
+ "requires": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.7.2"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "parse-json": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
+ "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ },
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -7127,23 +7600,90 @@
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"inquirer": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz",
- "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz",
+ "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==",
"requires": {
"ansi-escapes": "^4.2.1",
- "chalk": "^2.4.2",
+ "chalk": "^3.0.0",
"cli-cursor": "^3.1.0",
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^3.0.0",
"lodash": "^4.17.15",
"mute-stream": "0.0.8",
- "run-async": "^2.2.0",
+ "run-async": "^2.4.0",
"rxjs": "^6.5.3",
"string-width": "^4.1.0",
- "strip-ansi": "^5.1.0",
+ "strip-ansi": "^6.0.0",
"through": "^2.3.6"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "run-async": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
+ "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
+ "requires": {
+ "is-promise": "^2.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
}
},
"internal-ip": {
@@ -7155,6 +7695,17 @@
"ipaddr.js": "^1.9.0"
}
},
+ "internal-slot": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz",
+ "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==",
+ "dev": true,
+ "requires": {
+ "es-abstract": "^1.17.0-next.1",
+ "has": "^1.0.3",
+ "side-channel": "^1.0.2"
+ }
+ },
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
@@ -7420,6 +7971,12 @@
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+ "dev": true
+ },
"is-svg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
@@ -9000,11 +9557,6 @@
"lodash._reinterpolate": "^3.0.0"
}
},
- "lodash.unescape": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
- "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw="
- },
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
@@ -9732,6 +10284,13 @@
"lower-case": "^1.1.1"
}
},
+ "node-addon-api": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.1.tgz",
+ "integrity": "sha512-2+DuKodWvwRTrCfKOeR24KIc5unKjOh8mz17NCzVnHWfjAdDqbfbjqh7gUT+BkXBRQM52+xCHciKWonJ3CbJMQ==",
+ "dev": true,
+ "optional": true
+ },
"node-forge": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
@@ -10225,6 +10784,12 @@
}
}
},
+ "opencollective-postinstall": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
+ "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
+ "dev": true
+ },
"opn": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
@@ -11666,6 +12231,21 @@
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
},
+ "prettier": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz",
+ "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==",
+ "dev": true
+ },
+ "prettier-linter-helpers": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
+ "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+ "dev": true,
+ "requires": {
+ "fast-diff": "^1.1.2"
+ }
+ },
"pretty-bytes": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz",
@@ -12229,6 +12809,168 @@
"webpack-dev-server": "3.9.0",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "doctrine": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
+ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+ "requires": {
+ "esutils": "^2.0.2",
+ "isarray": "^1.0.0"
+ }
+ },
+ "eslint-plugin-import": {
+ "version": "2.18.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
+ "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==",
+ "requires": {
+ "array-includes": "^3.0.3",
+ "contains-path": "^0.1.0",
+ "debug": "^2.6.9",
+ "doctrine": "1.5.0",
+ "eslint-import-resolver-node": "^0.3.2",
+ "eslint-module-utils": "^2.4.0",
+ "has": "^1.0.3",
+ "minimatch": "^3.0.4",
+ "object.values": "^1.1.0",
+ "read-pkg-up": "^2.0.0",
+ "resolve": "^1.11.0"
+ }
+ },
+ "eslint-plugin-react": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz",
+ "integrity": "sha512-GacBAATewhhptbK3/vTP09CbFrgUJmBSaaRcWdbQLFvUZy9yVcQxigBNHGPU/KE2AyHpzj3AWXpxoMTsIDiHug==",
+ "requires": {
+ "array-includes": "^3.0.3",
+ "doctrine": "^2.1.0",
+ "has": "^1.0.3",
+ "jsx-ast-utils": "^2.2.1",
+ "object.entries": "^1.1.0",
+ "object.fromentries": "^2.0.0",
+ "object.values": "^1.1.0",
+ "prop-types": "^15.7.2",
+ "resolve": "^1.12.0"
+ },
+ "dependencies": {
+ "doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ }
+ }
+ },
+ "eslint-plugin-react-hooks": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz",
+ "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA=="
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "requires": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "requires": {
+ "p-limit": "^1.1.0"
+ }
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "requires": {
+ "error-ex": "^1.2.0"
+ }
+ },
+ "path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "requires": {
+ "pify": "^2.0.0"
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ },
+ "read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "requires": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ }
+ }
}
},
"read-pkg": {
@@ -12383,9 +13125,9 @@
}
},
"regexpp": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz",
- "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g=="
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
+ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q=="
},
"regexpu-core": {
"version": "4.6.0",
@@ -13150,6 +13892,12 @@
}
}
},
+ "semver-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
+ "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
+ "dev": true
+ },
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
@@ -13299,6 +14047,17 @@
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
},
+ "setimmediate-napi": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/setimmediate-napi/-/setimmediate-napi-1.0.6.tgz",
+ "integrity": "sha512-sdNXN15Av1jPXuSal4Mk4tEAKn0+8lfF9Z50/negaQMrAIO9c1qM0eiCh8fT6gctp0RiCObk+6/Xfn5RMGdZoA==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "get-symbol-from-current-process-h": "^1.0.1",
+ "get-uv-event-loop-napi-h": "^1.0.5"
+ }
+ },
"setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
@@ -13362,6 +14121,16 @@
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
},
+ "side-channel": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz",
+ "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==",
+ "dev": true,
+ "requires": {
+ "es-abstract": "^1.17.0-next.1",
+ "object-inspect": "^1.7.0"
+ }
+ },
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@@ -13910,6 +14679,128 @@
}
}
},
+ "string.prototype.matchall": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz",
+ "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0",
+ "has-symbols": "^1.0.1",
+ "internal-slot": "^1.0.2",
+ "regexp.prototype.flags": "^1.3.0",
+ "side-channel": "^1.0.2"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
+ }
+ },
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "dev": true
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ }
+ }
+ },
+ "string.prototype.trimend": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
+ "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
+ }
+ },
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "dev": true
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ }
+ }
+ },
"string.prototype.trimleft": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
@@ -13928,6 +14819,65 @@
"function-bind": "^1.1.1"
}
},
+ "string.prototype.trimstart": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
+ "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
+ }
+ },
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "dev": true
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ }
+ }
+ },
"string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -13989,9 +14939,9 @@
}
},
"strip-json-comments": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
- "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw=="
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
+ "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w=="
},
"style-loader": {
"version": "1.0.0",
@@ -14416,6 +15366,12 @@
"punycode": "^2.1.0"
}
},
+ "traverse": {
+ "version": "0.6.6",
+ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz",
+ "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=",
+ "dev": true
+ },
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
@@ -14877,6 +15833,18 @@
"minimalistic-assert": "^1.0.0"
}
},
+ "weak-napi": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/weak-napi/-/weak-napi-1.0.3.tgz",
+ "integrity": "sha512-cyqeMaYA5qI7RoZKAKvIHwEROEKDNxK7jXj3u56nF2rGBh+HFyhYmBb1/wAN4RqzRmkYKVVKQyqHpBoJjqtGUA==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "bindings": "^1.3.0",
+ "node-addon-api": "^1.1.0",
+ "setimmediate-napi": "^1.0.3"
+ }
+ },
"webidl-conversions": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
@@ -15300,6 +16268,12 @@
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
+ "which-pm-runs": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
+ "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
+ "dev": true
+ },
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
@@ -15639,6 +16613,15 @@
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
+ "xregexp": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz",
+ "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime-corejs3": "^7.8.3"
+ }
+ },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index cee64d5651e..48552886d08 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -35,13 +35,25 @@
"typesafe-actions": "^5.1.0",
"typescript": "~3.7.4"
},
+ "lint-staged": {
+ "*.{js,ts,jsx,tsx}": [
+ "eslint -c .eslintrc.json --fix"
+ ]
+ },
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
+ "lint": "esprint check",
+ "lint:fix": "esprint check --fix",
"test": "react-scripts test",
"eject": "react-scripts eject",
"mock": "node ./mock/index.js"
},
+ "husky": {
+ "hooks": {
+ "pre-commit": "yarn tsc --noEmit && lint-staged"
+ }
+ },
"eslintConfig": {
"extends": "react-app"
},
@@ -56,5 +68,21 @@
"last 1 firefox version",
"last 1 safari version"
]
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^2.27.0",
+ "@typescript-eslint/parser": "^2.27.0",
+ "eslint": "^6.8.0",
+ "eslint-config-airbnb": "^18.1.0",
+ "eslint-config-prettier": "^6.10.1",
+ "eslint-plugin-import": "^2.20.2",
+ "eslint-plugin-jsx-a11y": "^6.2.3",
+ "eslint-plugin-prettier": "^3.1.2",
+ "eslint-plugin-react": "^7.19.0",
+ "eslint-plugin-react-hooks": "^2.5.1",
+ "esprint": "^0.6.0",
+ "husky": "^4.2.5",
+ "lint-staged": ">=10",
+ "prettier": "^2.0.4"
}
}
diff --git a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx
index 9d928907d72..74457088427 100644
--- a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx
+++ b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParamValue.tsx
@@ -16,24 +16,26 @@ const CustomParamValue: React.FC<Props> = ({
name,
defaultValue,
}) => {
-
const { register, unregister, errors, watch, setValue } = useFormContext();
- const selectInputName: string = `${index}[name]`;
- const valInputName: string = `${index}[value]`;
+ const selectInputName = `${index}[name]`;
+ const valInputName = `${index}[value]`;
const selectedParamName = watch(selectInputName, name);
- React.useEffect(
- () => {
- if (selectedParamName) {
- setValue(valInputName, CUSTOM_PARAMS_OPTIONS[selectedParamName].defaultValue, true);
- }
- },
- [selectedParamName],
- );
+ React.useEffect(() => {
+ if (selectedParamName) {
+ setValue(
+ valInputName,
+ CUSTOM_PARAMS_OPTIONS[selectedParamName].defaultValue,
+ true
+ );
+ }
+ }, [selectedParamName]);
- React.useEffect(
- () => { if (isFirstParam(index)) { unregister(valInputName) } },
- );
+ React.useEffect(() => {
+ if (isFirstParam(index)) {
+ unregister(valInputName);
+ }
+ });
return (
<>
@@ -50,7 +52,7 @@ const CustomParamValue: React.FC<Props> = ({
disabled={isDisabled}
/>
<p className="help is-danger">
- <ErrorMessage errors={errors} name={valInputName}/>
+ <ErrorMessage errors={errors} name={valInputName} />
</p>
</>
);
| null | val | train | 2020-04-13T11:20:44 | "2020-04-09T15:42:00Z" | workshur | train |
provectus/kafka-ui/14_27 | provectus/kafka-ui | provectus/kafka-ui/14 | provectus/kafka-ui/27 | [
"connected"
] | e2918b41ca928283339f256e552b0643e501bc92 | ef1edba34b242051206e7ae5cf7d1a03d6cc2cae | [] | [] | "2020-04-13T10:03:55Z" | [
"scope/frontend"
] | Add custom parameters to topic creation form | ### AC
The user is able to:
- add multiple custom parameters to topic creation form
- select available custom topic parameter from list
- update value of added parameter
- remove added parameter
- review validation error & update custom params
<img width="546" alt="Screenshot 2020-02-27 22 37 49" src="https://user-images.githubusercontent.com/365855/75480177-d7090f00-59b1-11ea-8b36-f92bedb6a940.png">
blocked by: https://github.com/provectus/kafka-ui/issues/7 | [
"kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx",
"kafka-ui-react-app/src/redux/api/topics.ts"
] | [
"kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx",
"kafka-ui-react-app/src/redux/api/topics.ts"
] | [] | diff --git a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
index 8fe22db0368..64bb6866052 100644
--- a/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
+++ b/kafka-ui-react-app/src/components/Topics/New/CustomParams/CustomParams.tsx
@@ -26,7 +26,7 @@ const CustomParams: React.FC<Props> = ({
const onAdd = (event: React.MouseEvent<HTMLButtonElement>) => {
event.preventDefault();
- const newIndex = `${INDEX_PREFIX}.${new Date().getTime()}`;
+ const newIndex = `${INDEX_PREFIX}.${new Date().getTime()}ts`;
setFormCustomParams({
...formCustomParams,
diff --git a/kafka-ui-react-app/src/redux/api/topics.ts b/kafka-ui-react-app/src/redux/api/topics.ts
index 160c392c9b5..544d41136c0 100644
--- a/kafka-ui-react-app/src/redux/api/topics.ts
+++ b/kafka-ui-react-app/src/redux/api/topics.ts
@@ -1,3 +1,4 @@
+import { reduce } from 'lodash';
import {
TopicName,
Topic,
@@ -5,6 +6,7 @@ import {
TopicDetails,
TopicConfig,
TopicFormData,
+ TopicFormCustomParam,
} from 'redux/interfaces';
import {
BASE_URL,
@@ -23,6 +25,10 @@ export const getTopics = (clusterName: ClusterName): Promise<Topic[]> =>
fetch(`${BASE_URL}/clusters/${clusterName}/topics`, { ...BASE_PARAMS })
.then(res => res.json());
+interface Result {
+ [index: string]: string,
+}
+
export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promise<Topic> => {
const {
name,
@@ -34,6 +40,12 @@ export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promis
maxMessageBytes,
minInSyncReplicas,
} = form;
+
+ const customParams = reduce(Object.values(form.customParams), (result: Result, customParam: TopicFormCustomParam) => {
+ result[customParam.name] = customParam.value;
+ return result;
+ }, {});
+
const body = JSON.stringify({
name,
partitions,
@@ -44,8 +56,10 @@ export const postTopic = (clusterName: ClusterName, form: TopicFormData): Promis
'retention.bytes': retentionBytes,
'max.message.bytes': maxMessageBytes,
'min.insync.replicas': minInSyncReplicas,
+ ...customParams,
}
});
+
return fetch(`${BASE_URL}/clusters/${clusterName}/topics`, {
...BASE_PARAMS,
method: 'POST',
| null | test | train | 2020-04-14T14:36:05 | "2020-02-27T19:41:22Z" | workshur | train |
provectus/kafka-ui/128_129 | provectus/kafka-ui | provectus/kafka-ui/128 | provectus/kafka-ui/129 | [
"timestamp(timedelta=1.0, similarity=0.8466043474292333)",
"connected"
] | 3c4ccf9eb42a7380f0827e0a228e193cf397b047 | 4ec04223574e967d3f012652a0cceaa5605a8bab | [] | [
"I would suggest to add multiline attr instead\r\n```suggestion\r\n multiline?: boolean;\r\n```\r\nor \r\n```suggestion\r\n levelClassName?: 'level-multiline';\r\n```",
"Done👌 "
] | "2020-11-25T23:31:08Z" | [
"type/enhancement",
"scope/frontend"
] | Brokers, Topic Overview: Show space usage | [
"kafka-ui-react-app/src/components/Brokers/Brokers.tsx",
"kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts",
"kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx",
"kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts",
"kafka-ui-react-app/src/theme/bulma_overrides.scss"
] | [
"kafka-ui-react-app/src/components/Brokers/Brokers.tsx",
"kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts",
"kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx",
"kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx",
"kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts",
"kafka-ui-react-app/src/theme/bulma_overrides.scss"
] | [] | diff --git a/kafka-ui-react-app/src/components/Brokers/Brokers.tsx b/kafka-ui-react-app/src/components/Brokers/Brokers.tsx
index 4b8eb4683e4..e84cfdbf36f 100644
--- a/kafka-ui-react-app/src/components/Brokers/Brokers.tsx
+++ b/kafka-ui-react-app/src/components/Brokers/Brokers.tsx
@@ -6,6 +6,7 @@ import cx from 'classnames';
import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper';
import Indicator from 'components/common/Dashboard/Indicator';
import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
+import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
interface Props extends ClusterStats {
clusterName: ClusterName;
@@ -14,7 +15,7 @@ interface Props extends ClusterStats {
fetchBrokers: (clusterName: ClusterName) => void;
}
-const Topics: React.FC<Props> = ({
+const Brokers: React.FC<Props> = ({
clusterName,
brokerCount,
activeControllers,
@@ -24,6 +25,7 @@ const Topics: React.FC<Props> = ({
inSyncReplicasCount,
outOfSyncReplicasCount,
underReplicatedPartitionCount,
+ diskUsage,
fetchClusterStats,
fetchBrokers,
}) => {
@@ -73,8 +75,24 @@ const Topics: React.FC<Props> = ({
{outOfSyncReplicasCount}
</Indicator>
</MetricsWrapper>
+
+ <MetricsWrapper multiline title="Disk Usage">
+ {diskUsage?.map((brokerDiskUsage) => (
+ <React.Fragment key={brokerDiskUsage.brokerId}>
+ <Indicator className="is-one-third" label="Broker">
+ {brokerDiskUsage.brokerId}
+ </Indicator>
+ <Indicator className="is-one-third" label="Segment Size" title="">
+ <BytesFormatted value={brokerDiskUsage.segmentSize} />
+ </Indicator>
+ <Indicator className="is-one-third" label="Segment count">
+ {brokerDiskUsage.segmentCount}
+ </Indicator>
+ </React.Fragment>
+ ))}
+ </MetricsWrapper>
</div>
);
};
-export default Topics;
+export default Brokers;
diff --git a/kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts b/kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts
index c954c055473..f236d1763c9 100644
--- a/kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts
+++ b/kafka-ui-react-app/src/components/Brokers/BrokersContainer.ts
@@ -31,6 +31,7 @@ const mapStateToProps = (
underReplicatedPartitionCount: brokerSelectors.getUnderReplicatedPartitionCount(
state
),
+ diskUsage: brokerSelectors.getDiskUsage(state),
});
const mapDispatchToProps = {
diff --git a/kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx b/kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx
index cce3953f9dd..a9f6a42fa4b 100644
--- a/kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Details/Overview/Overview.tsx
@@ -3,6 +3,7 @@ import { ClusterName, TopicName } from 'redux/interfaces';
import { Topic, TopicDetails } from 'generated-sources';
import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper';
import Indicator from 'components/common/Dashboard/Indicator';
+import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
interface Props extends Topic, TopicDetails {
isFetched: boolean;
@@ -22,6 +23,8 @@ const Overview: React.FC<Props> = ({
partitionCount,
internal,
replicationFactor,
+ segmentSize,
+ segmentCount,
fetchTopicDetails,
}) => {
React.useEffect(() => {
@@ -53,6 +56,10 @@ const Overview: React.FC<Props> = ({
{internal ? 'Internal' : 'External'}
</span>
</Indicator>
+ <Indicator label="Segment Size" title="">
+ <BytesFormatted value={segmentSize} />
+ </Indicator>
+ <Indicator label="Segment count">{segmentCount}</Indicator>
</MetricsWrapper>
<div className="box">
<table className="table is-striped is-fullwidth">
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
new file mode 100644
index 00000000000..a4c24bae672
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+
+interface Props {
+ value: string | number | undefined;
+ precision?: number;
+}
+
+const BytesFormatted: React.FC<Props> = ({ value, precision }) => {
+ const formatBytes = React.useCallback(() => {
+ const numVal = typeof value === 'string' ? parseInt(value, 10) : value;
+ if (!numVal) return 0;
+ const pow = Math.floor(Math.log2(numVal) / 10);
+ const multiplier = 10 ** (precision || 2);
+ return (
+ Math.round((numVal * multiplier) / 1024 ** pow) / multiplier +
+ ['Bytes', 'KB', 'MB', 'GB', 'TB'][pow]
+ );
+ }, [value]);
+ return <span>{formatBytes()}</span>;
+};
+
+export default BytesFormatted;
diff --git a/kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx b/kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx
index c50bb3da7e0..c4c08d430e5 100644
--- a/kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx
+++ b/kafka-ui-react-app/src/components/common/Dashboard/Indicator.tsx
@@ -1,13 +1,15 @@
import React from 'react';
+import cx from 'classnames';
interface Props {
label: string;
title?: string;
+ className?: string;
}
-const Indicator: React.FC<Props> = ({ label, title, children }) => {
+const Indicator: React.FC<Props> = ({ label, title, className, children }) => {
return (
- <div className="level-item level-left">
+ <div className={cx('level-item', 'level-left', className)}>
<div title={title || label}>
<p className="heading">{label}</p>
<p className="title">{children}</p>
diff --git a/kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx b/kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx
index e93ba91c717..7e3d7b34a6a 100644
--- a/kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx
+++ b/kafka-ui-react-app/src/components/common/Dashboard/MetricsWrapper.tsx
@@ -4,17 +4,21 @@ import cx from 'classnames';
interface Props {
title?: string;
wrapperClassName?: string;
+ multiline?: boolean;
}
const MetricsWrapper: React.FC<Props> = ({
title,
children,
wrapperClassName,
+ multiline,
}) => {
return (
<div className={cx('box', wrapperClassName)}>
{title && <h5 className="subtitle is-6">{title}</h5>}
- <div className="level">{children}</div>
+ <div className={cx('level', multiline ? 'level-multiline' : '')}>
+ {children}
+ </div>
</div>
);
};
diff --git a/kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts b/kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts
index 74b55c95019..eab6d08b50c 100644
--- a/kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts
+++ b/kafka-ui-react-app/src/redux/reducers/brokers/selectors.ts
@@ -43,3 +43,8 @@ export const getUnderReplicatedPartitionCount = createSelector(
brokersState,
({ underReplicatedPartitionCount }) => underReplicatedPartitionCount
);
+
+export const getDiskUsage = createSelector(
+ brokersState,
+ ({ diskUsage }) => diskUsage
+);
diff --git a/kafka-ui-react-app/src/theme/bulma_overrides.scss b/kafka-ui-react-app/src/theme/bulma_overrides.scss
index 407d9b7b7fc..047d9d822b1 100644
--- a/kafka-ui-react-app/src/theme/bulma_overrides.scss
+++ b/kafka-ui-react-app/src/theme/bulma_overrides.scss
@@ -68,3 +68,13 @@
from { opacity: 0; }
to { opacity: 1; }
}
+
+.level.level-multiline {
+ flex-wrap: wrap;
+ .level-item.is-one-third {
+ flex-basis: 26%;
+ }
+ .level-item.is-one-third:nth-child(n+4) {
+ margin-top: 10px;
+ }
+}
| null | train | train | 2020-11-24T11:25:15 | "2020-11-25T23:29:59Z" | soffest | train |
|
provectus/kafka-ui/149_150 | provectus/kafka-ui | provectus/kafka-ui/149 | provectus/kafka-ui/150 | [
"connected"
] | 4bd5f7d9da21e0dad4b86d7c94a63dfb0a181e02 | fbc2ab306e451758e466487f21235207ea8c37b7 | [] | [
"It's not a good idea to put it here. I think we can run it separate if needed "
] | "2020-12-25T14:06:57Z" | [] | Consumer groups screen (ui/clusters/xxx/consumer-groups) stays empty | running as container on K8s version 0.0.8
JS stack trace:
```
react-dom.production.min.js:216 TypeError: Cannot read property 'consumerGroupId' of undefined
at List.tsx:56
at Array.map (<anonymous>)
at ar (List.tsx:54)
at oi (react-dom.production.min.js:157)
at qu (react-dom.production.min.js:267)
at Cc (react-dom.production.min.js:250)
at xc (react-dom.production.min.js:250)
at Sc (react-dom.production.min.js:250)
at bc (react-dom.production.min.js:243)
at react-dom.production.min.js:123
```
I checked the web-service response and it is fine:
```
[{clusterId: null, consumerGroupId: "audit-log-service", numConsumers: 1, numTopics: 1},…]
0: {clusterId: null, consumerGroupId: "audit-log-service", numConsumers: 1, numTopics: 1}
clusterId: null
consumerGroupId: "audit-log-service"
numConsumers: 1
numTopics: 1
1: {clusterId: null, consumerGroupId: "KMOffsetCache-cmak-588949fcf5-5hplf", numConsumers: 1,…}
clusterId: null
consumerGroupId: "KMOffsetCache-cmak-588949fcf5-5hplf"
numConsumers: 1
numTopics: 1
``` | [
"kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts"
] | [
"kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts"
] | [] | diff --git a/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts b/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
index 7973d600b72..6776dbcc586 100644
--- a/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
+++ b/kafka-ui-react-app/src/redux/reducers/consumerGroups/reducer.ts
@@ -19,7 +19,7 @@ const updateConsumerGroupsList = (
return payload.reduce(
(memo: ConsumerGroupsState, consumerGroup) => ({
...memo,
- byId: {
+ byID: {
...memo.byID,
[consumerGroup.consumerGroupId]: {
...memo.byID[consumerGroup.consumerGroupId],
| null | train | train | 2020-12-15T13:26:37 | "2020-12-24T13:23:28Z" | christophfroeschl | train |
provectus/kafka-ui/138_159 | provectus/kafka-ui | provectus/kafka-ui/138 | provectus/kafka-ui/159 | [
"connected"
] | c27dfb8ff9c91e5e2f94268a86f259d650be9974 | 9f3ae3a6146f3f77ba088a18d6c7b334e8f88ac6 | [] | [
"Please remove these extra spaces.",
"I'm not sure we need to update pom files manually. @soffest could you please take a look?"
] | "2021-01-19T14:29:17Z" | [
"good first issue",
"scope/frontend"
] | Update node version of react app to the latest LTS version (v14) | - Add engine filed to package.json https://docs.npmjs.com/cli/v6/configuring-npm/package-json#engines
- update .nvmrc
- update pom.xml
| [
"kafka-ui-react-app/.nvmrc",
"kafka-ui-react-app/package.json",
"pom.xml"
] | [
"kafka-ui-react-app/.nvmrc",
"kafka-ui-react-app/package.json",
"pom.xml"
] | [] | diff --git a/kafka-ui-react-app/.nvmrc b/kafka-ui-react-app/.nvmrc
index 28193ca74f5..9a0c3d3f455 100644
--- a/kafka-ui-react-app/.nvmrc
+++ b/kafka-ui-react-app/.nvmrc
@@ -1,1 +1,1 @@
-v12.13.1
+v14.15.4
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index bd301d8f2d9..417cf021764 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -100,5 +100,8 @@
"react-scripts": "4.0.1",
"typescript": "~4.1.2"
},
+ "engines": {
+ "node": ">=14.15.4"
+ },
"proxy": "http://localhost:8080"
}
diff --git a/pom.xml b/pom.xml
index 5ac9ab77b2c..2e145672735 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
<git.revision>latest</git.revision>
<zkclient.version>0.11</zkclient.version>
<kafka-clients.version>2.4.0</kafka-clients.version>
- <node.version>v12.13.1</node.version>
+ <node.version>v14.15.4</node.version>
<dockerfile-maven-plugin.version>1.4.10</dockerfile-maven-plugin.version>
<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
| null | val | train | 2021-01-20T12:38:05 | "2020-12-07T11:59:36Z" | workshur | train |
provectus/kafka-ui/132_160 | provectus/kafka-ui | provectus/kafka-ui/132 | provectus/kafka-ui/160 | [
"connected"
] | 9f3ae3a6146f3f77ba088a18d6c7b334e8f88ac6 | 3c843e1266981a7ff0e21a3adad823f7d578a18c | [] | [
"@Guzel738 Can you disable `no-console` rule for the whole file instead commenting single lines?",
"There is no need to disable `no-console` rule for the whole project. We can disable it for `serviceWorker.ts` file.",
"@Guzel738 Could you please remove `no-console` rule from this config?\r\n```suggestion\r\n\r\n```\r\n",
"👍 "
] | "2021-01-20T12:38:54Z" | [
"good first issue",
"scope/frontend"
] | Get rid of all unexpected "any" types. | 1. Run `npm run lint` from `/kafka-ui-react-app`
2. Specify a correct type instead of `any` for all cases from the list
```
src/components/Topics/Details/Messages/Messages.tsx
Line 41:29: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Line 76:13: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Line 101:52: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Line 181:43: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Line 230:53: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
src/redux/store/configureStore/dev.ts
Line 9:16: Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
``` | [
"kafka-ui-react-app/.eslintrc.json",
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/redux/store/configureStore/dev.ts",
"kafka-ui-react-app/src/serviceWorker.ts"
] | [
"kafka-ui-react-app/.eslintrc.json",
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/redux/store/configureStore/dev.ts",
"kafka-ui-react-app/src/serviceWorker.ts"
] | [] | diff --git a/kafka-ui-react-app/.eslintrc.json b/kafka-ui-react-app/.eslintrc.json
index 6ffce16d636..b35f0e2732f 100644
--- a/kafka-ui-react-app/.eslintrc.json
+++ b/kafka-ui-react-app/.eslintrc.json
@@ -28,7 +28,8 @@
"prettier/prettier": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"jsx-a11y/label-has-associated-control": "off",
- "import/prefer-default-export": "off"
+ "import/prefer-default-export": "off",
+ "@typescript-eslint/no-explicit-any": "error"
},
"overrides": [
{
diff --git a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
index 9db4d57804f..f9ef65f18e4 100644
--- a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
@@ -38,8 +38,8 @@ interface FilterProps {
partition: TopicMessage['partition'];
}
-function usePrevious(value: any) {
- const ref = useRef();
+function usePrevious(value: Date | null) {
+ const ref = useRef<Date | null>();
useEffect(() => {
ref.current = value;
});
@@ -73,7 +73,8 @@ const Messages: React.FC<Props> = ({
Partial<TopicMessageQueryParams>
>({ limit: 100 });
const [debouncedCallback] = useDebouncedCallback(
- (query: any) => setQueryParams({ ...queryParams, ...query }),
+ (query: Partial<TopicMessageQueryParams>) =>
+ setQueryParams({ ...queryParams, ...query }),
1000
);
@@ -98,7 +99,7 @@ const Messages: React.FC<Props> = ({
);
}, [messages, partitions]);
- const getSeekToValuesForPartitions = (partition: any) => {
+ const getSeekToValuesForPartitions = (partition: Option) => {
const foundedValues = filterProps.find(
(prop) => prop.partition === partition.value
);
@@ -178,7 +179,7 @@ const Messages: React.FC<Props> = ({
return format(date, 'yyyy-MM-dd HH:mm:ss');
};
- const getMessageContentBody = (content: any) => {
+ const getMessageContentBody = (content: Record<string, unknown>) => {
try {
const contentObj =
typeof content !== 'object' ? JSON.parse(content) : content;
@@ -226,7 +227,7 @@ const Messages: React.FC<Props> = ({
});
};
- const filterOptions = (options: Option[], filter: any) => {
+ const filterOptions = (options: Option[], filter: string) => {
if (!filter) {
return options;
}
@@ -256,7 +257,10 @@ const Messages: React.FC<Props> = ({
<td style={{ width: 150 }}>{message.offset}</td>
<td style={{ width: 100 }}>{message.partition}</td>
<td key={Math.random()} style={{ wordBreak: 'break-word' }}>
- {getMessageContentBody(message.content)}
+ {message.content &&
+ getMessageContentBody(
+ message.content as Record<string, unknown>
+ )}
</td>
</tr>
))}
diff --git a/kafka-ui-react-app/src/redux/store/configureStore/dev.ts b/kafka-ui-react-app/src/redux/store/configureStore/dev.ts
index 552ec094c7f..e90d7c2af01 100644
--- a/kafka-ui-react-app/src/redux/store/configureStore/dev.ts
+++ b/kafka-ui-react-app/src/redux/store/configureStore/dev.ts
@@ -2,11 +2,17 @@ import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from '../../reducers';
+declare global {
+ interface Window {
+ __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose;
+ }
+}
+
export default () => {
const middlewares = [thunk];
const composeEnhancers =
- (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+ window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const enhancer = composeEnhancers(applyMiddleware(...middlewares));
diff --git a/kafka-ui-react-app/src/serviceWorker.ts b/kafka-ui-react-app/src/serviceWorker.ts
index 98a3447f698..f2566365332 100644
--- a/kafka-ui-react-app/src/serviceWorker.ts
+++ b/kafka-ui-react-app/src/serviceWorker.ts
@@ -9,6 +9,7 @@
// To learn more about the benefits of this model and instructions on how to
// opt-in, read https://bit.ly/CRA-PWA
+/* eslint-disable no-console */
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
| null | test | train | 2021-01-26T10:45:03 | "2020-12-02T13:56:21Z" | workshur | train |
provectus/kafka-ui/154_167 | provectus/kafka-ui | provectus/kafka-ui/154 | provectus/kafka-ui/167 | [
"connected"
] | 1d60db44df81ed0a1c8a935f49bdbe4c7ad4ead6 | cc097e9327c8253699c31dd47cdf2ae5ff3fcada | [] | [
"This should read like a sentence. `It renders PageLoader`\r\n```suggestion\r\n it('renders PageLoader', () => {\r\n```",
"The structure of test in general should be:\r\n```\r\ndescribe Messages Component\r\n- describe Initial State\r\n - it. renders loader \r\n- describe MessageTable\r\n - describe with messages\r\n - it renders table\r\n - it renders JSONTree\r\n - it parses massage content correctly\r\n - describe without messages\r\n - it renders empty table\r\n- describe Offset Field\r\n - it ...\r\n - etc\r\n```",
"I would suggest to use shallow/ mount outside of `createMessageComponent`\r\n\r\n```diff\r\n- const createMessageComponent = (props: Partial<Props> = {}) =>\r\n+ const setupWrapper = (props: Partial<Props> = {}) =>\r\n- shallow(\r\n <Messages\r\n clusterName=\"Test cluster\"\r\n topicName=\"Cluster topic\"\r\n isFetched\r\n fetchTopicMessages={jest.fn()}\r\n messages={[]}\r\n partitions={[]}\r\n {...props}\r\n />\r\n - );\r\n\r\nit('should render string', () => {\r\n - const wrapper = createMessageComponent();\r\n + const wrapper = shallow(setupWrapper());\r\n expect(wrapper.text()).toContain('No messages at selected topic');\r\n});\r\n\r\n```",
"remove me",
"looks wrong... Can we use something like \r\n```suggestion\r\n expect(wrapper.exists(DatePicker)).toBeTruthy();\r\n```\r\nor \r\n\r\n```suggestion\r\n expect(wrapper.find(DatePicker).length).toEqual(1);\r\n```",
"Please update all other examples",
"I would suggest using `off` as value for consistency with other rules or use numbers for the rest rules too.",
"I would suggest remove `npm test` from here and update `lint-staged` script like\r\n```\r\n\"lint-staged\": {\r\n \"*.{js,ts,jsx,tsx}\": [\r\n \"eslint -c .eslintrc.json --fix\",\r\n \"git add\",\r\n \"jest --bail --findRelatedTests\"\r\n ]\r\n },\r\n```\r\n`jest --bail --findRelatedTests` this will call only tests related to current changes instead of calling all test by `npm test`",
"I would suggest using relative paths only in the scope of the same directory like `./something.ts` in the rest cases only absolute like `components/.../something.ts`.",
"@Guzel738 Can you move newly added packages to `devDependecies`? So we can keep everything related to the tests in one place.",
"I think we can remove it because `react-scripts` provides `npm test -- --coverage`",
"It's not the best way to deal with eslint errors. Let's remove this line and disable rules inside of a file.",
"This will disable the rule for a whole project. Let's disable only for tests via `overrides` in eslint config\r\n\r\n> `{\r\n> \"files\": [ \"*.spec.tsx\" ],\r\n> \"rules\": {\r\n> \"react/jsx-props-no-spreading\": \"off\"\r\n> }`",
"I think we can replace the current `setupTest.ts` file with this one.",
"This one should be in `devDependecies` too",
"Please update lock file too to reflect the latest changes and it's good to go."
] | "2021-02-01T08:33:00Z" | [
"scope/frontend"
] | Configure project to support tests | For better stability of the project, we need to write tests. The first step is to add support for them in the project.
1. Add the required packages: `jest` and any react support library `enzyme` or `react-test-renderer`
2. Configure them
3. Cover one component with tests
4. Add integration to the git hooks | [
"kafka-ui-react-app/.eslintrc.json",
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/setupTests.ts"
] | [
"kafka-ui-react-app/.eslintrc.json",
"kafka-ui-react-app/jest.config.js",
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/setupTests.ts"
] | [
"kafka-ui-react-app/src/tests/Topics/Details/Messages/Messages.spec.tsx"
] | diff --git a/kafka-ui-react-app/.eslintrc.json b/kafka-ui-react-app/.eslintrc.json
index b35f0e2732f..abde6f187d3 100644
--- a/kafka-ui-react-app/.eslintrc.json
+++ b/kafka-ui-react-app/.eslintrc.json
@@ -1,7 +1,8 @@
{
"env": {
"browser": true,
- "es6": true
+ "es6": true,
+ "jest": true
},
"globals": {
"Atomics": "readonly",
@@ -14,7 +15,7 @@
},
"ecmaVersion": 2018,
"sourceType": "module",
- "project": "./tsconfig.json"
+ "project": ["./tsconfig.json", "./src/setupTests.ts"]
},
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
@@ -37,6 +38,12 @@
"rules": {
"react/prop-types": "off"
}
+ },
+ {
+ "files": ["*.spec.tsx"],
+ "rules": {
+ "react/jsx-props-no-spreading": "off"
+ }
}
]
}
diff --git a/kafka-ui-react-app/jest.config.js b/kafka-ui-react-app/jest.config.js
new file mode 100644
index 00000000000..6d7b8ae45bc
--- /dev/null
+++ b/kafka-ui-react-app/jest.config.js
@@ -0,0 +1,8 @@
+module.exports = {
+ roots: ['<rootDir>/src'],
+ transform: {
+ '^.+\\.tsx?$': 'ts-jest',
+ },
+ testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
+};
diff --git a/kafka-ui-react-app/package-lock.json b/kafka-ui-react-app/package-lock.json
index 68d5a8a2373..8cd0ecc26d5 100644
--- a/kafka-ui-react-app/package-lock.json
+++ b/kafka-ui-react-app/package-lock.json
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
- "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
+ "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
@@ -72,32 +72,18 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
- },
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
}
}
},
"@babel/generator": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
- "integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
+ "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
"dev": true,
"requires": {
- "@babel/types": "^7.12.10",
+ "@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
- },
- "dependencies": {
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
- }
}
},
"@babel/helper-annotate-as-pure": {
@@ -119,27 +105,6 @@
"@babel/types": "^7.10.4"
}
},
- "@babel/helper-builder-react-jsx": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz",
- "integrity": "sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg==",
- "dev": true,
- "requires": {
- "@babel/helper-annotate-as-pure": "^7.10.4",
- "@babel/types": "^7.10.4"
- }
- },
- "@babel/helper-builder-react-jsx-experimental": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.10.tgz",
- "integrity": "sha512-3Kcr2LGpL7CTRDTTYm1bzeor9qZbxbvU2AxsLA6mUG9gYarSfIKMK0UlU+azLWI+s0+BH768bwyaziWB2NOJlQ==",
- "dev": true,
- "requires": {
- "@babel/helper-annotate-as-pure": "^7.12.10",
- "@babel/helper-module-imports": "^7.12.5",
- "@babel/types": "^7.12.10"
- }
- },
"@babel/helper-compilation-targets": {
"version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz",
@@ -204,14 +169,14 @@
}
},
"@babel/helper-function-name": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
- "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
+ "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
"dev": true,
"requires": {
- "@babel/helper-get-function-arity": "^7.10.4",
- "@babel/template": "^7.10.4",
- "@babel/types": "^7.10.4"
+ "@babel/helper-get-function-arity": "^7.12.10",
+ "@babel/template": "^7.12.7",
+ "@babel/types": "^7.12.11"
}
},
"@babel/helper-get-function-arity": {
@@ -294,15 +259,15 @@
}
},
"@babel/helper-replace-supers": {
- "version": "7.12.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz",
- "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz",
+ "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==",
"dev": true,
"requires": {
- "@babel/helper-member-expression-to-functions": "^7.12.1",
- "@babel/helper-optimise-call-expression": "^7.10.4",
- "@babel/traverse": "^7.12.5",
- "@babel/types": "^7.12.5"
+ "@babel/helper-member-expression-to-functions": "^7.12.7",
+ "@babel/helper-optimise-call-expression": "^7.12.10",
+ "@babel/traverse": "^7.12.10",
+ "@babel/types": "^7.12.11"
}
},
"@babel/helper-simple-access": {
@@ -324,24 +289,24 @@
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.11.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
- "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
+ "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
"dev": true,
"requires": {
- "@babel/types": "^7.11.0"
+ "@babel/types": "^7.12.11"
}
},
"@babel/helper-validator-identifier": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
- "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
"dev": true
},
"@babel/helper-validator-option": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz",
- "integrity": "sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz",
+ "integrity": "sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==",
"dev": true
},
"@babel/helper-wrap-function": {
@@ -376,18 +341,70 @@
"@babel/helper-validator-identifier": "^7.10.4",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
}
},
"@babel/parser": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
- "integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+ "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
"dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz",
- "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz",
+ "integrity": "sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.10.4",
@@ -720,9 +737,9 @@
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz",
- "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz",
+ "integrity": "sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.10.4"
@@ -957,26 +974,25 @@
}
},
"@babel/plugin-transform-react-jsx": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.10.tgz",
- "integrity": "sha512-MM7/BC8QdHXM7Qc1wdnuk73R4gbuOpfrSUgfV/nODGc86sPY1tgmY2M9E9uAnf2e4DOIp8aKGWqgZfQxnTNGuw==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.12.tgz",
+ "integrity": "sha512-JDWGuzGNWscYcq8oJVCtSE61a5+XAOos+V0HrxnDieUus4UMnBEosDnY1VJqU5iZ4pA04QY7l0+JvHL1hZEfsw==",
"dev": true,
"requires": {
- "@babel/helper-builder-react-jsx": "^7.10.4",
- "@babel/helper-builder-react-jsx-experimental": "^7.12.10",
+ "@babel/helper-annotate-as-pure": "^7.12.10",
+ "@babel/helper-module-imports": "^7.12.5",
"@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-jsx": "^7.12.1"
+ "@babel/plugin-syntax-jsx": "^7.12.1",
+ "@babel/types": "^7.12.12"
}
},
"@babel/plugin-transform-react-jsx-development": {
- "version": "7.12.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.7.tgz",
- "integrity": "sha512-Rs3ETtMtR3VLXFeYRChle5SsP/P9Jp/6dsewBQfokDSzKJThlsuFcnzLTDRALiUmTC48ej19YD9uN1mupEeEDg==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.12.tgz",
+ "integrity": "sha512-i1AxnKxHeMxUaWVXQOSIco4tvVvvCxMSfeBMnMM06mpaJt3g+MpxYQQrDfojUQldP1xxraPSJYSMEljoWM/dCg==",
"dev": true,
"requires": {
- "@babel/helper-builder-react-jsx-experimental": "^7.12.4",
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-jsx": "^7.12.1"
+ "@babel/plugin-transform-react-jsx": "^7.12.12"
}
},
"@babel/plugin-transform-react-jsx-self": {
@@ -1122,16 +1138,16 @@
}
},
"@babel/preset-env": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.10.tgz",
- "integrity": "sha512-Gz9hnBT/tGeTE2DBNDkD7BiWRELZt+8lSysHuDwmYXUIvtwZl0zI+D6mZgXZX0u8YBlLS4tmai9ONNY9tjRgRA==",
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz",
+ "integrity": "sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==",
"dev": true,
"requires": {
"@babel/compat-data": "^7.12.7",
"@babel/helper-compilation-targets": "^7.12.5",
"@babel/helper-module-imports": "^7.12.5",
"@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-validator-option": "^7.12.1",
+ "@babel/helper-validator-option": "^7.12.11",
"@babel/plugin-proposal-async-generator-functions": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-dynamic-import": "^7.12.1",
@@ -1160,7 +1176,7 @@
"@babel/plugin-transform-arrow-functions": "^7.12.1",
"@babel/plugin-transform-async-to-generator": "^7.12.1",
"@babel/plugin-transform-block-scoped-functions": "^7.12.1",
- "@babel/plugin-transform-block-scoping": "^7.12.1",
+ "@babel/plugin-transform-block-scoping": "^7.12.11",
"@babel/plugin-transform-classes": "^7.12.1",
"@babel/plugin-transform-computed-properties": "^7.12.1",
"@babel/plugin-transform-destructuring": "^7.12.1",
@@ -1190,7 +1206,7 @@
"@babel/plugin-transform-unicode-escapes": "^7.12.1",
"@babel/plugin-transform-unicode-regex": "^7.12.1",
"@babel/preset-modules": "^0.1.3",
- "@babel/types": "^7.12.10",
+ "@babel/types": "^7.12.11",
"core-js-compat": "^3.8.0",
"semver": "^5.5.0"
},
@@ -1269,17 +1285,17 @@
}
},
"@babel/traverse": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
- "integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
+ "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.12.10",
- "@babel/helper-function-name": "^7.10.4",
- "@babel/helper-split-export-declaration": "^7.11.0",
- "@babel/parser": "^7.12.10",
- "@babel/types": "^7.12.10",
+ "@babel/code-frame": "^7.12.11",
+ "@babel/generator": "^7.12.11",
+ "@babel/helper-function-name": "^7.12.11",
+ "@babel/helper-split-export-declaration": "^7.12.11",
+ "@babel/parser": "^7.12.11",
+ "@babel/types": "^7.12.12",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
@@ -1309,12 +1325,12 @@
}
},
"@babel/types": {
- "version": "7.12.10",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
- "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+ "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
- "@babel/helper-validator-identifier": "^7.10.4",
+ "@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@@ -1348,9 +1364,9 @@
"dev": true
},
"@eslint/eslintrc": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
- "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
+ "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
@@ -1360,7 +1376,7 @@
"ignore": "^4.0.6",
"import-fresh": "^3.2.1",
"js-yaml": "^3.13.1",
- "lodash": "^4.17.19",
+ "lodash": "^4.17.20",
"minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1"
},
@@ -1515,88 +1531,6 @@
"jest-message-util": "^26.6.2",
"jest-util": "^26.6.2",
"slash": "^3.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"@jest/core": {
@@ -1635,71 +1569,6 @@
"strip-ansi": "^6.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -1710,12 +1579,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"jest-resolve": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
@@ -1766,9 +1629,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -1813,15 +1676,6 @@
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -1835,88 +1689,6 @@
"@jest/types": "^26.6.2",
"@types/node": "*",
"jest-mock": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"@jest/fake-timers": {
@@ -1931,88 +1703,6 @@
"jest-message-util": "^26.6.2",
"jest-mock": "^26.6.2",
"jest-util": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"@jest/globals": {
@@ -2024,88 +1714,6 @@
"@jest/environment": "^26.6.2",
"@jest/types": "^26.6.2",
"expect": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"@jest/reporters": {
@@ -2141,71 +1749,6 @@
"v8-to-istanbul": "^7.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -2216,12 +1759,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"jest-resolve": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
@@ -2272,9 +1809,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -2320,14 +1857,11 @@
"type-fest": "^0.8.1"
}
},
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
}
}
},
@@ -2340,6 +1874,14 @@
"callsites": "^3.0.0",
"graceful-fs": "^4.2.4",
"source-map": "^0.6.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"@jest/test-result": {
@@ -2352,88 +1894,6 @@
"@jest/types": "^26.6.2",
"@types/istanbul-lib-coverage": "^2.0.0",
"collect-v8-coverage": "^1.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"@jest/test-sequencer": {
@@ -2472,151 +1932,79 @@
"write-file-atomic": "^3.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- },
- "write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dev": true,
- "requires": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
}
}
},
"@jest/types": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz",
- "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^1.1.1",
- "@types/yargs": "^13.0.0"
+ "@types/istanbul-reports": "^3.0.0",
+ "@types/node": "*",
+ "@types/yargs": "^15.0.0",
+ "chalk": "^4.0.0"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "14.14.22",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
+ "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==",
+ "dev": true
+ }
}
},
"@nodelib/fs.scandir": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
- "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
+ "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==",
"dev": true,
"requires": {
- "@nodelib/fs.stat": "2.0.3",
+ "@nodelib/fs.stat": "2.0.4",
"run-parallel": "^1.1.9"
}
},
"@nodelib/fs.stat": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
- "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
+ "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
"dev": true
},
"@nodelib/fs.walk": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
- "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz",
+ "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==",
"dev": true,
"requires": {
- "@nodelib/fs.scandir": "2.1.3",
+ "@nodelib/fs.scandir": "2.1.4",
"fastq": "^1.6.0"
}
},
"@npmcli/move-file": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz",
- "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.0.tgz",
+ "integrity": "sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ==",
"dev": true,
"requires": {
- "mkdirp": "^1.0.4"
+ "mkdirp": "^1.0.4",
+ "rimraf": "^2.7.1"
},
"dependencies": {
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
}
}
},
@@ -2696,9 +2084,9 @@
"dev": true
},
"@sinonjs/commons": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz",
- "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==",
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz",
+ "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==",
"dev": true,
"requires": {
"type-detect": "4.0.8"
@@ -2881,28 +2269,14 @@
"chalk": "^3.0.0"
}
},
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "@types/istanbul-reports": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
+ "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
"dev": true,
"requires": {
- "color-convert": "^2.0.1"
+ "@types/istanbul-lib-coverage": "*",
+ "@types/istanbul-lib-report": "*"
}
},
"chalk": {
@@ -2915,27 +2289,6 @@
"supports-color": "^7.1.0"
}
},
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"pretty-format": {
"version": "25.5.0",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz",
@@ -2948,32 +2301,86 @@
"react-is": "^16.12.0"
}
},
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
}
}
},
"@testing-library/jest-dom": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz",
- "integrity": "sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==",
+ "version": "5.11.9",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.11.9.tgz",
+ "integrity": "sha512-Mn2gnA9d1wStlAIT2NU8J15LNob0YFBVjs2aEQ3j8rsfRQo+lAs7/ui1i2TGaJjapLmuNPLTsrm+nPjmZDwpcQ==",
"dev": true,
"requires": {
- "@babel/runtime": "^7.5.1",
- "chalk": "^2.4.1",
- "css": "^2.2.3",
+ "@babel/runtime": "^7.9.2",
+ "@types/testing-library__jest-dom": "^5.9.1",
+ "aria-query": "^4.2.2",
+ "chalk": "^3.0.0",
+ "css": "^3.0.0",
"css.escape": "^1.5.1",
- "jest-diff": "^24.0.0",
- "jest-matcher-utils": "^24.0.0",
- "lodash": "^4.17.11",
- "pretty-format": "^24.0.0",
+ "lodash": "^4.17.15",
"redent": "^3.0.0"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "css": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
+ "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.4",
+ "source-map": "^0.6.1",
+ "source-map-resolve": "^0.6.0"
+ }
+ },
+ "redent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
+ "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
+ "dev": true,
+ "requires": {
+ "indent-string": "^4.0.0",
+ "strip-indent": "^3.0.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "source-map-resolve": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
+ "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
+ "dev": true,
+ "requires": {
+ "atob": "^2.1.2",
+ "decode-uri-component": "^0.2.0"
+ }
+ },
+ "strip-indent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
+ "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
+ "dev": true,
+ "requires": {
+ "min-indent": "^1.0.0"
+ }
+ }
}
},
"@testing-library/react": {
@@ -3045,12 +2452,39 @@
"resolved": "https://registry.npmjs.org/@types/base16/-/base16-1.0.2.tgz",
"integrity": "sha512-oYO/U4VD1DavwrKuCSQWdLG+5K22SLPem2OQaHmFcQuwHoVeGC+JGVRji2MUqZUAIQZHEonOeVfAX09hYiLsdg=="
},
+ "@types/cheerio": {
+ "version": "0.22.23",
+ "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.23.tgz",
+ "integrity": "sha512-QfHLujVMlGqcS/ePSf3Oe5hK3H8wi/yN2JYuxSB1U10VvW1fO3K8C+mURQesFYS1Hn7lspOsTT75SKq/XtydQg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "14.14.22",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
+ "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==",
+ "dev": true
+ }
+ }
+ },
"@types/classnames": {
"version": "2.2.11",
"resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.2.11.tgz",
"integrity": "sha512-2koNhpWm3DgWRp5tpkiJ8JGc1xTn2q0l+jUNUE7oMKXUf5NpI9AIdC4kbjGNFBdHtcxBD18LAksoudAVhFKCjw==",
"dev": true
},
+ "@types/enzyme": {
+ "version": "3.10.8",
+ "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.8.tgz",
+ "integrity": "sha512-vlOuzqsTHxog6PV79+tvOHFb6hq4QZKMq1lLD9MaWD1oec2lHTKndn76XOpSwCA0oFTaIbKVPrgM3k78Jjd16g==",
+ "dev": true,
+ "requires": {
+ "@types/cheerio": "*",
+ "@types/react": "*"
+ }
+ },
"@types/eslint": {
"version": "7.2.6",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz",
@@ -3062,9 +2496,9 @@
}
},
"@types/estree": {
- "version": "0.0.45",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz",
- "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==",
+ "version": "0.0.46",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz",
+ "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==",
"dev": true
},
"@types/glob": {
@@ -3124,28 +2558,28 @@
}
},
"@types/istanbul-reports": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
- "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
+ "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
"dev": true,
"requires": {
- "@types/istanbul-lib-coverage": "*",
"@types/istanbul-lib-report": "*"
}
},
"@types/jest": {
- "version": "24.9.1",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.9.1.tgz",
- "integrity": "sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q==",
+ "version": "26.0.20",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.20.tgz",
+ "integrity": "sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==",
"dev": true,
"requires": {
- "jest-diff": "^24.3.0"
+ "jest-diff": "^26.0.0",
+ "pretty-format": "^26.0.0"
}
},
"@types/json-schema": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
- "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==",
+ "version": "7.0.7",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+ "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
"dev": true
},
"@types/json5": {
@@ -3154,9 +2588,9 @@
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
},
"@types/lodash": {
- "version": "4.14.165",
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.165.tgz",
- "integrity": "sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg=="
+ "version": "4.14.168",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz",
+ "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q=="
},
"@types/lodash.curry": {
"version": "4.1.6",
@@ -3173,9 +2607,9 @@
"dev": true
},
"@types/node": {
- "version": "12.19.8",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.8.tgz",
- "integrity": "sha512-D4k2kNi0URNBxIRCb1khTnkWNHv8KSL1owPmS/K5e5t8B2GzMReY7AsJIY1BnP5KdlgC4rj9jk2IkDMasIE7xg==",
+ "version": "12.19.15",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz",
+ "integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw==",
"dev": true
},
"@types/normalize-package-data": {
@@ -3191,9 +2625,9 @@
"dev": true
},
"@types/prettier": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.5.tgz",
- "integrity": "sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==",
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.6.tgz",
+ "integrity": "sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA==",
"dev": true
},
"@types/prop-types": {
@@ -3217,9 +2651,9 @@
}
},
"@types/react-datepicker": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-3.1.2.tgz",
- "integrity": "sha512-luMH1fUF3GRJwaNFh4cogHV7FSFCJLU8Ai2dZ60Xw0n+MrExvuwOHxcbNkaIkIztPwyuT0H0K8Q4g0RN88LoFQ==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-3.1.3.tgz",
+ "integrity": "sha512-Gca56Pa8hpy3eO2naRLdC63iflER7JXxgdHTGJ6yF5DjvhQoirRPqCJerWLq6TOWd+sEsZWwMm17Q17YRVLFtw==",
"requires": {
"@types/react": "*",
"date-fns": "^2.0.1",
@@ -3236,9 +2670,9 @@
}
},
"@types/react-redux": {
- "version": "7.1.11",
- "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.11.tgz",
- "integrity": "sha512-OjaFlmqy0CRbYKBoaWF84dub3impqnLJUrz4u8PRjDzaa4n1A2cVmjMV81shwXyAD5x767efhA8STFGJz/r1Zg==",
+ "version": "7.1.16",
+ "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.16.tgz",
+ "integrity": "sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw==",
"dev": true,
"requires": {
"@types/hoist-non-react-statics": "^3.3.0",
@@ -3248,9 +2682,9 @@
}
},
"@types/react-router": {
- "version": "5.1.8",
- "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.8.tgz",
- "integrity": "sha512-HzOyJb+wFmyEhyfp4D4NYrumi+LQgQL/68HvJO+q6XtuHSDvw6Aqov7sCAhjbNq3bUPgPqbdvjXC5HeB2oEAPg==",
+ "version": "5.1.11",
+ "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.11.tgz",
+ "integrity": "sha512-ofHbZMlp0Y2baOHgsWBQ4K3AttxY61bDMkwTiBOkPg7U6C/3UwwB5WaIx28JmSVi/eX3uFEMRo61BV22fDQIvg==",
"dev": true,
"requires": {
"@types/history": "*",
@@ -3258,9 +2692,9 @@
}
},
"@types/react-router-dom": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.6.tgz",
- "integrity": "sha512-gjrxYqxz37zWEdMVvQtWPFMFj1dRDb4TGOcgyOfSXTrEXdF92L00WE3C471O3TV/RF1oskcStkXsOU0Ete4s/g==",
+ "version": "5.1.7",
+ "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.7.tgz",
+ "integrity": "sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==",
"dev": true,
"requires": {
"@types/history": "*",
@@ -3320,6 +2754,95 @@
"dev": true,
"requires": {
"pretty-format": "^24.3.0"
+ },
+ "dependencies": {
+ "@jest/types": {
+ "version": "24.9.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz",
+ "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==",
+ "dev": true,
+ "requires": {
+ "@types/istanbul-lib-coverage": "^2.0.0",
+ "@types/istanbul-reports": "^1.1.1",
+ "@types/yargs": "^13.0.0"
+ }
+ },
+ "@types/istanbul-reports": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
+ "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
+ "dev": true,
+ "requires": {
+ "@types/istanbul-lib-coverage": "*",
+ "@types/istanbul-lib-report": "*"
+ }
+ },
+ "@types/yargs": {
+ "version": "13.0.11",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz",
+ "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==",
+ "dev": true,
+ "requires": {
+ "@types/yargs-parser": "*"
+ }
+ },
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "pretty-format": {
+ "version": "24.9.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz",
+ "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==",
+ "dev": true,
+ "requires": {
+ "@jest/types": "^24.9.0",
+ "ansi-regex": "^4.0.0",
+ "ansi-styles": "^3.2.0",
+ "react-is": "^16.8.4"
+ }
+ },
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
+ }
+ }
+ },
+ "@types/testing-library__jest-dom": {
+ "version": "5.9.5",
+ "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.9.5.tgz",
+ "integrity": "sha512-ggn3ws+yRbOHog9GxnXiEZ/35Mow6YtPZpd7Z5mKDeZS/o7zx3yAle0ov/wjhVB5QT4N2Dt+GNoGCdqkBGCajQ==",
+ "dev": true,
+ "requires": {
+ "@types/jest": "*"
}
},
"@types/testing-library__react": {
@@ -3345,28 +2868,14 @@
"chalk": "^3.0.0"
}
},
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "@types/istanbul-reports": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
+ "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
"dev": true,
"requires": {
- "color-convert": "^2.0.1"
+ "@types/istanbul-lib-coverage": "*",
+ "@types/istanbul-lib-report": "*"
}
},
"chalk": {
@@ -3379,27 +2888,6 @@
"supports-color": "^7.1.0"
}
},
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"pretty-format": {
"version": "25.5.0",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz",
@@ -3412,14 +2900,11 @@
"react-is": "^16.12.0"
}
},
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
}
}
},
@@ -3430,6 +2915,14 @@
"dev": true,
"requires": {
"source-map": "^0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"@types/uuid": {
@@ -3438,9 +2931,9 @@
"integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ=="
},
"@types/webpack": {
- "version": "4.41.25",
- "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz",
- "integrity": "sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==",
+ "version": "4.41.26",
+ "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.26.tgz",
+ "integrity": "sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA==",
"dev": true,
"requires": {
"@types/anymatch": "*",
@@ -3449,6 +2942,14 @@
"@types/uglify-js": "*",
"@types/webpack-sources": "*",
"source-map": "^0.6.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"@types/webpack-sources": {
@@ -3471,30 +2972,31 @@
}
},
"@types/yargs": {
- "version": "13.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz",
- "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==",
+ "version": "15.0.12",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.12.tgz",
+ "integrity": "sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw==",
"dev": true,
"requires": {
"@types/yargs-parser": "*"
}
},
"@types/yargs-parser": {
- "version": "15.0.0",
- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz",
- "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==",
+ "version": "20.2.0",
+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
+ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==",
"dev": true
},
"@typescript-eslint/eslint-plugin": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.9.1.tgz",
- "integrity": "sha512-QRLDSvIPeI1pz5tVuurD+cStNR4sle4avtHhxA+2uyixWGFjKzJ+EaFVRW6dA/jOgjV5DTAjOxboQkRDE8cRlQ==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.1.tgz",
+ "integrity": "sha512-5JriGbYhtqMS1kRcZTQxndz1lKMwwEXKbwZbkUZNnp6MJX0+OVXnG0kOlBZP4LUAxEyzu3cs+EXd/97MJXsGfw==",
"dev": true,
"requires": {
- "@typescript-eslint/experimental-utils": "4.9.1",
- "@typescript-eslint/scope-manager": "4.9.1",
+ "@typescript-eslint/experimental-utils": "4.14.1",
+ "@typescript-eslint/scope-manager": "4.14.1",
"debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1",
+ "lodash": "^4.17.15",
"regexpp": "^3.0.0",
"semver": "^7.3.2",
"tsutils": "^3.17.1"
@@ -3518,28 +3020,28 @@
}
},
"@typescript-eslint/experimental-utils": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.9.1.tgz",
- "integrity": "sha512-c3k/xJqk0exLFs+cWSJxIjqLYwdHCuLWhnpnikmPQD2+NGAx9KjLYlBDcSI81EArh9FDYSL6dslAUSwILeWOxg==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.1.tgz",
+ "integrity": "sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
- "@typescript-eslint/scope-manager": "4.9.1",
- "@typescript-eslint/types": "4.9.1",
- "@typescript-eslint/typescript-estree": "4.9.1",
+ "@typescript-eslint/scope-manager": "4.14.1",
+ "@typescript-eslint/types": "4.14.1",
+ "@typescript-eslint/typescript-estree": "4.14.1",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.9.1.tgz",
- "integrity": "sha512-Gv2VpqiomvQ2v4UL+dXlQcZ8zCX4eTkoIW+1aGVWT6yTO+6jbxsw7yQl2z2pPl/4B9qa5JXeIbhJpONKjXIy3g==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.14.1.tgz",
+ "integrity": "sha512-mL3+gU18g9JPsHZuKMZ8Z0Ss9YP1S5xYZ7n68Z98GnPq02pYNQuRXL85b9GYhl6jpdvUc45Km7hAl71vybjUmw==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "4.9.1",
- "@typescript-eslint/types": "4.9.1",
- "@typescript-eslint/typescript-estree": "4.9.1",
+ "@typescript-eslint/scope-manager": "4.14.1",
+ "@typescript-eslint/types": "4.14.1",
+ "@typescript-eslint/typescript-estree": "4.14.1",
"debug": "^4.1.1"
},
"dependencies": {
@@ -3561,29 +3063,29 @@
}
},
"@typescript-eslint/scope-manager": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.9.1.tgz",
- "integrity": "sha512-sa4L9yUfD/1sg9Kl8OxPxvpUcqxKXRjBeZxBuZSSV1v13hjfEJkn84n0An2hN8oLQ1PmEl2uA6FkI07idXeFgQ==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.14.1.tgz",
+ "integrity": "sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "4.9.1",
- "@typescript-eslint/visitor-keys": "4.9.1"
+ "@typescript-eslint/types": "4.14.1",
+ "@typescript-eslint/visitor-keys": "4.14.1"
}
},
"@typescript-eslint/types": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.9.1.tgz",
- "integrity": "sha512-fjkT+tXR13ks6Le7JiEdagnwEFc49IkOyys7ueWQ4O8k4quKPwPJudrwlVOJCUQhXo45PrfIvIarcrEjFTNwUA==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.14.1.tgz",
+ "integrity": "sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.9.1.tgz",
- "integrity": "sha512-bzP8vqwX6Vgmvs81bPtCkLtM/Skh36NE6unu6tsDeU/ZFoYthlTXbBmpIrvosgiDKlWTfb2ZpPELHH89aQjeQw==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.1.tgz",
+ "integrity": "sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "4.9.1",
- "@typescript-eslint/visitor-keys": "4.9.1",
+ "@typescript-eslint/types": "4.14.1",
+ "@typescript-eslint/visitor-keys": "4.14.1",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
@@ -3610,12 +3112,12 @@
}
},
"@typescript-eslint/visitor-keys": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.9.1.tgz",
- "integrity": "sha512-9gspzc6UqLQHd7lXQS7oWs+hrYggspv/rk6zzEMhCbYwPE/sF7oxo7GAjkS35Tdlt7wguIG+ViWCPtVZHz/ybQ==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.1.tgz",
+ "integrity": "sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "4.9.1",
+ "@typescript-eslint/types": "4.14.1",
"eslint-visitor-keys": "^2.0.0"
}
},
@@ -3794,6 +3296,31 @@
"@xtuc/long": "4.2.2"
}
},
+ "@wojtekmaj/enzyme-adapter-react-17": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@wojtekmaj/enzyme-adapter-react-17/-/enzyme-adapter-react-17-0.4.1.tgz",
+ "integrity": "sha512-WZr8i4C6WVDV7Mb8sbm7GdlEPmk1f+xOMjUKThqrkWgwsfvu90zJyyX54wyAvsS91sjtKZ0JipGj2cJnEDaxPA==",
+ "dev": true,
+ "requires": {
+ "enzyme-adapter-utils": "^1.14.0",
+ "enzyme-shallow-equal": "^1.0.4",
+ "has": "^1.0.3",
+ "object.assign": "^4.1.0",
+ "object.values": "^1.1.1",
+ "prop-types": "^15.7.2",
+ "react-is": "^17.0.0",
+ "react-test-renderer": "^17.0.0",
+ "semver": "^5.7.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@@ -3882,6 +3409,31 @@
"indent-string": "^4.0.0"
}
},
+ "airbnb-prop-types": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz",
+ "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==",
+ "dev": true,
+ "requires": {
+ "array.prototype.find": "^2.1.1",
+ "function.prototype.name": "^1.1.2",
+ "is-regex": "^1.1.0",
+ "object-is": "^1.1.2",
+ "object.assign": "^4.1.0",
+ "object.entries": "^1.1.2",
+ "prop-types": "^15.7.2",
+ "prop-types-exact": "^1.2.0",
+ "react-is": "^16.13.1"
+ },
+ "dependencies": {
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
+ }
+ }
+ },
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -3948,18 +3500,18 @@
"dev": true
},
"ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
- "color-convert": "^1.9.0"
+ "color-convert": "^2.0.1"
}
},
"anymatch": {
@@ -4136,6 +3688,12 @@
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
"dev": true
},
+ "array-filter": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
+ "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=",
+ "dev": true
+ },
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
@@ -4143,9 +3701,9 @@
"dev": true
},
"array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
"dev": true
},
"array-includes": {
@@ -4162,23 +3720,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -4201,6 +3761,16 @@
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
"dev": true
},
+ "array.prototype.find": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.1.tgz",
+ "integrity": "sha512-mi+MYNJYLTx2eNYy+Yh6raoQacCsNeeMUaspFPh9Y141lFSsWxxB8V9mM2ye+eqiRs917J6/pJ4M9ZPzenWckA==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.4"
+ }
+ },
"array.prototype.flat": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz",
@@ -4213,23 +3783,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -4247,23 +3819,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -4355,9 +3929,9 @@
"dev": true
},
"astral-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
- "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
+ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"async": {
@@ -4489,88 +4063,6 @@
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"slash": "^3.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"babel-loader": {
@@ -4597,6 +4089,15 @@
"json5": "^1.0.1"
}
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
@@ -4664,9 +4165,9 @@
}
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -4706,9 +4207,9 @@
"dev": true
},
"babel-preset-current-node-syntax": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz",
- "integrity": "sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
+ "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==",
"dev": true,
"requires": {
"@babel/plugin-syntax-async-generators": "^7.8.4",
@@ -5020,9 +4521,9 @@
"dev": true
},
"binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true,
"optional": true
},
@@ -5073,6 +4574,20 @@
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
+ "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
+ "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
+ "dev": true
+ }
}
},
"bonjour": {
@@ -5087,14 +4602,6 @@
"dns-txt": "^2.0.2",
"multicast-dns": "^6.0.1",
"multicast-dns-service-types": "^1.1.0"
- },
- "dependencies": {
- "array-flatten": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
- "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
- "dev": true
- }
}
},
"boolbase": {
@@ -5226,16 +4733,25 @@
}
},
"browserslist": {
- "version": "4.16.0",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.0.tgz",
- "integrity": "sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ==",
+ "version": "4.16.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.1.tgz",
+ "integrity": "sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30001165",
+ "caniuse-lite": "^1.0.30001173",
"colorette": "^1.2.1",
- "electron-to-chromium": "^1.3.621",
+ "electron-to-chromium": "^1.3.634",
"escalade": "^3.1.1",
- "node-releases": "^1.1.67"
+ "node-releases": "^1.1.69"
+ }
+ },
+ "bs-logger": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
+ "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
+ "dev": true,
+ "requires": {
+ "fast-json-stable-stringify": "2.x"
}
},
"bser": {
@@ -5285,9 +4801,9 @@
"dev": true
},
"builtin-modules": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
- "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz",
+ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==",
"dev": true
},
"builtin-status-codes": {
@@ -5307,9 +4823,9 @@
"integrity": "sha512-myD38zeUfjmdduq+pXabhJEe3x2hQP48l/OI+Y0fO3HdDynZUY/VJygucvEAJKRjr4HxD5DnEm4yx+oDOBXpAA=="
},
"bytes": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
- "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
"dev": true
},
"cacache": {
@@ -5337,16 +4853,10 @@
"unique-filename": "^1.1.1"
},
"dependencies": {
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true
- },
"tar": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz",
- "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
+ "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
@@ -5377,12 +4887,12 @@
}
},
"call-bind": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
- "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"requires": {
"function-bind": "^1.1.1",
- "get-intrinsic": "^1.0.0"
+ "get-intrinsic": "^1.0.2"
}
},
"caller-callsite": {
@@ -5428,9 +4938,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"dev": true
}
}
@@ -5472,9 +4982,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30001165",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001165.tgz",
- "integrity": "sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA==",
+ "version": "1.0.30001180",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001180.tgz",
+ "integrity": "sha512-n8JVqXuZMVSPKiPiypjFtDTXc4jWIdjxull0f92WLo7e1MSi3uJ3NvveakSh/aCl1QKFAvIz3vIj0v+0K+FrXw==",
"dev": true
},
"capture-exit": {
@@ -5499,14 +5009,13 @@
"dev": true
},
"chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
}
},
"char-regex": {
@@ -5521,16 +5030,44 @@
"integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==",
"dev": true
},
+ "cheerio": {
+ "version": "1.0.0-rc.5",
+ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.5.tgz",
+ "integrity": "sha512-yoqps/VCaZgN4pfXtenwHROTp8NG6/Hlt4Jpz2FEP0ZJQ+ZUkVDd0hAPDNKhj3nakpfPt/CNs57yEtxD1bXQiw==",
+ "dev": true,
+ "requires": {
+ "cheerio-select-tmp": "^0.1.0",
+ "dom-serializer": "~1.2.0",
+ "domhandler": "^4.0.0",
+ "entities": "~2.1.0",
+ "htmlparser2": "^6.0.0",
+ "parse5": "^6.0.0",
+ "parse5-htmlparser2-tree-adapter": "^6.0.0"
+ }
+ },
+ "cheerio-select-tmp": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/cheerio-select-tmp/-/cheerio-select-tmp-0.1.1.tgz",
+ "integrity": "sha512-YYs5JvbpU19VYJyj+F7oYrIE2BOll1/hRU7rEy/5+v9BzkSo3bK81iAeeQEMI92vRIxz677m72UmJUiVwwgjfQ==",
+ "dev": true,
+ "requires": {
+ "css-select": "^3.1.2",
+ "css-what": "^4.0.0",
+ "domelementtype": "^2.1.0",
+ "domhandler": "^4.0.0",
+ "domutils": "^2.4.4"
+ }
+ },
"chokidar": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
- "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
+ "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
"dev": true,
"optional": true,
"requires": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
- "fsevents": "~2.1.2",
+ "fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@@ -5549,13 +5086,6 @@
"picomatch": "^2.0.4"
}
},
- "fsevents": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
- "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
- "dev": true,
- "optional": true
- },
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -5637,6 +5167,14 @@
"dev": true,
"requires": {
"source-map": "~0.6.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"clean-stack": {
@@ -5664,48 +5202,6 @@
"string-width": "^4.2.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "astral-regex": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
- "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
- "dev": true
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
"slice-ansi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
@@ -5716,17 +5212,6 @@
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
}
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
}
}
},
@@ -5741,6 +5226,35 @@
"wrap-ansi": "^5.1.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -5778,6 +5292,58 @@
"@types/q": "^1.5.1",
"chalk": "^2.4.1",
"q": "^1.1.2"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
}
},
"code-point-at": {
@@ -5809,20 +5375,36 @@
"requires": {
"color-convert": "^1.9.1",
"color-string": "^1.5.4"
- }
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "requires": {
- "color-name": "1.1.3"
- }
- },
+ },
+ "dependencies": {
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ }
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
"color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"color-string": {
"version": "1.5.4",
@@ -5849,9 +5431,9 @@
}
},
"commander": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
- "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==",
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"common-tags": {
@@ -5909,14 +5491,6 @@
"on-headers": "~1.0.2",
"safe-buffer": "5.1.2",
"vary": "~1.1.2"
- },
- "dependencies": {
- "bytes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
- "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
- "dev": true
- }
}
},
"concat-map": {
@@ -6022,6 +5596,15 @@
"run-queue": "^1.0.0"
},
"dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -6040,18 +5623,18 @@
"dev": true
},
"core-js": {
- "version": "3.8.1",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz",
- "integrity": "sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg==",
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz",
+ "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==",
"dev": true
},
"core-js-compat": {
- "version": "3.8.1",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.1.tgz",
- "integrity": "sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ==",
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz",
+ "integrity": "sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog==",
"dev": true,
"requires": {
- "browserslist": "^4.15.0",
+ "browserslist": "^4.16.1",
"semver": "7.0.0"
},
"dependencies": {
@@ -6064,9 +5647,9 @@
}
},
"core-js-pure": {
- "version": "3.8.1",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.1.tgz",
- "integrity": "sha512-Se+LaxqXlVXGvmexKGPvnUIYC1jwXu1H6Pkyb3uBM5d8/NELMYCHs/4/roD7721NxrTLyv7e5nXd5/QLBO+10g==",
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.3.tgz",
+ "integrity": "sha512-V5qQZVAr9K0xu7jXg1M7qTEwuxUgqr7dUOezGaNa7i+Xn9oXAU/d1fzqD9ObuwpVQOaorO5s70ckyi1woP9lVA==",
"dev": true
},
"core-util-is": {
@@ -6089,9 +5672,9 @@
},
"dependencies": {
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -6202,6 +5785,14 @@
"source-map": "^0.6.1",
"source-map-resolve": "^0.5.2",
"urix": "^0.1.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"css-blank-pseudo": {
@@ -6296,15 +5887,16 @@
}
},
"css-select": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
- "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-3.1.2.tgz",
+ "integrity": "sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA==",
"dev": true,
"requires": {
"boolbase": "^1.0.0",
- "css-what": "^3.2.1",
- "domutils": "^1.7.0",
- "nth-check": "^1.0.2"
+ "css-what": "^4.0.0",
+ "domhandler": "^4.0.0",
+ "domutils": "^2.4.3",
+ "nth-check": "^2.0.0"
}
},
"css-select-base-adapter": {
@@ -6321,12 +5913,20 @@
"requires": {
"mdn-data": "2.0.4",
"source-map": "^0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"css-what": {
- "version": "3.4.2",
- "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
- "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-4.0.0.tgz",
+ "integrity": "sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A==",
"dev": true
},
"css.escape": {
@@ -6488,6 +6088,12 @@
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
}
}
},
@@ -6515,9 +6121,9 @@
}
},
"csstype": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.5.tgz",
- "integrity": "sha512-uVDi8LpBUKQj6sdxNaTetL6FpeCqTjOvAQuQUa/qAqq8oOd4ivkbhgnqayl0dnPal8Tb/yB1tF+gOvCBiicaiQ=="
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.6.tgz",
+ "integrity": "sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw=="
},
"currently-unhandled": {
"version": "0.4.1",
@@ -6816,9 +6422,9 @@
}
},
"diff-sequences": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz",
- "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
+ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
"dev": true
},
"diffie-hellman": {
@@ -6849,6 +6455,12 @@
"path-type": "^4.0.0"
}
},
+ "discontinuous-range": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz",
+ "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=",
+ "dev": true
+ },
"dnode": {
"version": "git+https://github.com/christianvuerings/dnode.git#e08e620b18c9086d47fe68e08328b19465c62fb7",
"from": "git+https://github.com/christianvuerings/dnode.git#e08e620b18c9086d47fe68e08328b19465c62fb7",
@@ -6919,21 +6531,14 @@
}
},
"dom-serializer": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
- "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz",
+ "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==",
"dev": true,
"requires": {
"domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
"entities": "^2.0.0"
- },
- "dependencies": {
- "domelementtype": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
- "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
- "dev": true
- }
}
},
"domain-browser": {
@@ -6943,9 +6548,9 @@
"dev": true
},
"domelementtype": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
- "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
"dev": true
},
"domexception": {
@@ -6966,22 +6571,23 @@
}
},
"domhandler": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
- "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz",
+ "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==",
"dev": true,
"requires": {
- "domelementtype": "1"
+ "domelementtype": "^2.1.0"
}
},
"domutils": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
- "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz",
+ "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==",
"dev": true,
"requires": {
- "dom-serializer": "0",
- "domelementtype": "1"
+ "dom-serializer": "^1.0.1",
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0"
}
},
"dot-case": {
@@ -6995,9 +6601,26 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
+ "dev": true
+ }
+ }
+ },
+ "dot-prop": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+ "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+ "dev": true,
+ "requires": {
+ "is-obj": "^2.0.0"
+ },
+ "dependencies": {
+ "is-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"dev": true
}
}
@@ -7055,9 +6678,9 @@
"dev": true
},
"electron-to-chromium": {
- "version": "1.3.621",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.621.tgz",
- "integrity": "sha512-FeIuBzArONbAmKmZIsZIFGu/Gc9AVGlVeVbhCq+G2YIl6QkT0TDn2HKN/FMf1btXEB9kEmIuQf3/lBTVAbmFOg==",
+ "version": "1.3.646",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.646.tgz",
+ "integrity": "sha512-P+3q8ugIPezulqoBYaLoUsF0fT4YNpe+zEDmdDUDnHZUAeSbBjMbis+JjJp9duU8BdfWV3VXf27NTBcwhRTsAQ==",
"dev": true
},
"elliptic": {
@@ -7090,9 +6713,9 @@
"dev": true
},
"emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"emojis-list": {
@@ -7117,9 +6740,9 @@
}
},
"enhanced-resolve": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz",
- "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==",
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz",
+ "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
@@ -7154,10 +6777,73 @@
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
"dev": true
},
+ "enzyme": {
+ "version": "3.11.0",
+ "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz",
+ "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==",
+ "dev": true,
+ "requires": {
+ "array.prototype.flat": "^1.2.3",
+ "cheerio": "^1.0.0-rc.3",
+ "enzyme-shallow-equal": "^1.0.1",
+ "function.prototype.name": "^1.1.2",
+ "has": "^1.0.3",
+ "html-element-map": "^1.2.0",
+ "is-boolean-object": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-number-object": "^1.0.4",
+ "is-regex": "^1.0.5",
+ "is-string": "^1.0.5",
+ "is-subset": "^0.1.1",
+ "lodash.escape": "^4.0.1",
+ "lodash.isequal": "^4.5.0",
+ "object-inspect": "^1.7.0",
+ "object-is": "^1.0.2",
+ "object.assign": "^4.1.0",
+ "object.entries": "^1.1.1",
+ "object.values": "^1.1.1",
+ "raf": "^3.4.1",
+ "rst-selector-parser": "^2.2.3",
+ "string.prototype.trim": "^1.2.1"
+ }
+ },
+ "enzyme-adapter-utils": {
+ "version": "1.14.0",
+ "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz",
+ "integrity": "sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==",
+ "dev": true,
+ "requires": {
+ "airbnb-prop-types": "^2.16.0",
+ "function.prototype.name": "^1.1.3",
+ "has": "^1.0.3",
+ "object.assign": "^4.1.2",
+ "object.fromentries": "^2.0.3",
+ "prop-types": "^15.7.2",
+ "semver": "^5.7.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "enzyme-shallow-equal": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz",
+ "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3",
+ "object-is": "^1.1.2"
+ }
+ },
"errno": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
- "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+ "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"requires": {
"prr": "~1.0.1"
@@ -7193,6 +6879,7 @@
"version": "1.17.7",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
+ "dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
@@ -7211,6 +6898,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "dev": true,
"requires": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
@@ -7310,6 +6998,13 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "optional": true
+ },
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
@@ -7322,13 +7017,13 @@
}
},
"eslint": {
- "version": "7.15.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz",
- "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
+ "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@eslint/eslintrc": "^0.2.2",
+ "@eslint/eslintrc": "^0.3.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -7352,7 +7047,7 @@
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
- "lodash": "^4.17.19",
+ "lodash": "^4.17.20",
"minimatch": "^3.0.4",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
@@ -7361,45 +7056,11 @@
"semver": "^7.2.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.0",
- "table": "^5.2.3",
+ "table": "^6.0.4",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"debug": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
@@ -7409,12 +7070,6 @@
"ms": "2.1.2"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
@@ -7426,15 +7081,6 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -7714,18 +7360,18 @@
}
},
"eslint-plugin-prettier": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz",
- "integrity": "sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz",
+ "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
}
},
"eslint-plugin-react": {
- "version": "7.21.5",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz",
- "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==",
+ "version": "7.22.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz",
+ "integrity": "sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA==",
"dev": true,
"requires": {
"array-includes": "^3.1.1",
@@ -7868,9 +7514,9 @@
"dev": true
},
"eslint-webpack-plugin": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-2.4.1.tgz",
- "integrity": "sha512-cj8iPWZKuAiVD8MMgTSunyMCAvxQxp5mxoPHZl1UMGkApFXaXJHdCFcCR+oZEJbBNhReNa5SjESIn34uqUbBtg==",
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-2.4.3.tgz",
+ "integrity": "sha512-+15ifHFkGn0gB7lQBe+xgyKcjelxv9xlTutGHEPYBUUj+1Rjrjq3+1REJLJpyAHgpQTatpqkRY1z8gQuyn3Aww==",
"dev": true,
"requires": {
"@types/eslint": "^7.2.4",
@@ -8146,148 +7792,6 @@
"jest-matcher-utils": "^26.6.2",
"jest-message-util": "^26.6.2",
"jest-regex-util": "^26.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "diff-sequences": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
- "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-diff": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
- "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "diff-sequences": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "jest-matcher-utils": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
- "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "jest-diff": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"express": {
@@ -8328,13 +7832,25 @@
"vary": "~1.1.2"
},
"dependencies": {
+ "array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
+ "dev": true
+ },
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=",
"dev": true
- }
- }
+ },
+ "qs": {
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
+ "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
+ "dev": true
+ }
+ }
},
"ext": {
"version": "1.4.0",
@@ -8464,9 +7980,9 @@
"dev": true
},
"fast-glob": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
- "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
+ "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "^2.0.2",
@@ -8490,9 +8006,9 @@
"dev": true
},
"fastq": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz",
- "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==",
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.0.tgz",
+ "integrity": "sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA==",
"dev": true,
"requires": {
"reusify": "^1.0.4"
@@ -8630,16 +8146,6 @@
"path-exists": "^3.0.0"
}
},
- "make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "requires": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- }
- },
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -8664,12 +8170,6 @@
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- },
"pkg-dir": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
@@ -8678,12 +8178,6 @@
"requires": {
"find-up": "^3.0.0"
}
- },
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
}
}
},
@@ -8697,12 +8191,12 @@
}
},
"find-versions": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
- "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz",
+ "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==",
"dev": true,
"requires": {
- "semver-regex": "^2.0.0"
+ "semver-regex": "^3.1.2"
}
},
"flat-cache": {
@@ -8716,9 +8210,9 @@
}
},
"flatted": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
- "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
+ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
"dev": true
},
"flatten": {
@@ -8738,9 +8232,9 @@
}
},
"follow-redirects": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
- "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==",
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
+ "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
"dev": true
},
"for-in": {
@@ -8770,6 +8264,15 @@
"worker-rpc": "^0.1.0"
},
"dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
"braces": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
@@ -8799,6 +8302,32 @@
}
}
},
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
"fill-range": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
@@ -8822,6 +8351,12 @@
}
}
},
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
@@ -8869,6 +8404,15 @@
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
"to-regex-range": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
@@ -8924,15 +8468,15 @@
}
},
"fs-extra": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
- "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
- "universalify": "^1.0.0"
+ "universalify": "^2.0.0"
}
},
"fs-minipass": {
@@ -8962,9 +8506,9 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.2.1.tgz",
- "integrity": "sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz",
+ "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==",
"dev": true,
"optional": true
},
@@ -8980,6 +8524,15 @@
"rimraf": "2"
},
"dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -8996,12 +8549,54 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
+ "function.prototype.name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.3.tgz",
+ "integrity": "sha512-H51qkbNSp8mtkJt+nyW1gyStBiKZxfRqySNUR99ylq6BPXHKI4SEvIlTKp4odLfjRKJV04DFWMU3G/YRlQOsag==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.18.0-next.1",
+ "functions-have-names": "^1.2.1"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.2.2",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.1",
+ "object-inspect": "^1.9.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
+ }
+ }
+ }
+ },
"functional-red-black-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
+ "functions-have-names": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz",
+ "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==",
+ "dev": true
+ },
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
@@ -9077,9 +8672,9 @@
"dev": true
},
"get-intrinsic": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz",
- "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.0.tgz",
+ "integrity": "sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
@@ -9208,9 +8803,9 @@
}
},
"globby": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
- "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
+ "version": "11.0.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
+ "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
"dev": true,
"requires": {
"array-union": "^2.1.0",
@@ -9327,9 +8922,9 @@
}
},
"has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"has-symbols": {
@@ -9477,6 +9072,13 @@
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
+ },
+ "dependencies": {
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ }
}
},
"hoopy": {
@@ -9521,6 +9123,16 @@
"integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==",
"dev": true
},
+ "html-element-map": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.0.tgz",
+ "integrity": "sha512-AqCt/m9YaiMwaaAyOPdq4Ga0cM+jdDWWGueUMkdROZcTeClaGpN0AQeyGchZhTegQoABmc6+IqH7oCR/8vhQYg==",
+ "dev": true,
+ "requires": {
+ "array-filter": "^1.0.0",
+ "call-bind": "^1.0.2"
+ }
+ },
"html-encoding-sniffer": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
@@ -9531,9 +9143,9 @@
}
},
"html-entities": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz",
- "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz",
+ "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==",
"dev": true
},
"html-escaper": {
@@ -9606,36 +9218,15 @@
}
},
"htmlparser2": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
- "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.0.tgz",
+ "integrity": "sha512-numTQtDZMoh78zJpaNdJ9MXb2cv5G3jwUoe3dMQODubZvLoGvTE/Ofp6sHvH8OGKcN/8A47pGLi/k58xHP/Tfw==",
"dev": true,
"requires": {
- "domelementtype": "^1.3.1",
- "domhandler": "^2.3.0",
- "domutils": "^1.5.1",
- "entities": "^1.1.1",
- "inherits": "^2.0.1",
- "readable-stream": "^3.1.1"
- },
- "dependencies": {
- "entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
- "dev": true
- },
- "readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- }
- }
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
+ "domutils": "^2.4.4",
+ "entities": "^2.0.0"
}
},
"http-deceiver": {
@@ -9817,106 +9408,60 @@
"dev": true
},
"husky": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.5.tgz",
- "integrity": "sha512-E5S/1HMoDDaqsH8kDF5zeKEQbYqe3wL9zJDyqyYqc8I4vHBtAoxkDBGXox0lZ9RI+k5GyB728vZdmnM4bYap+g==",
+ "version": "4.3.8",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz",
+ "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"ci-info": "^2.0.0",
"compare-versions": "^3.6.0",
"cosmiconfig": "^7.0.0",
- "find-versions": "^3.2.0",
+ "find-versions": "^4.0.0",
"opencollective-postinstall": "^2.0.2",
- "pkg-dir": "^4.2.0",
+ "pkg-dir": "^5.0.0",
"please-upgrade-node": "^3.2.0",
"slash": "^3.0.0",
"which-pm-runs": "^1.0.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"requires": {
- "locate-path": "^5.0.0",
+ "locate-path": "^6.0.0",
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"requires": {
- "p-locate": "^4.1.0"
+ "p-locate": "^5.0.0"
}
},
"p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"requires": {
- "p-try": "^2.0.0"
+ "yocto-queue": "^0.1.0"
}
},
"p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"requires": {
- "p-limit": "^2.2.0"
+ "p-limit": "^3.0.2"
}
},
- "p-try": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
- "dev": true
- },
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -9924,21 +9469,12 @@
"dev": true
},
"pkg-dir": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
- "dev": true,
- "requires": {
- "find-up": "^4.0.0"
- }
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
+ "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
"dev": true,
"requires": {
- "has-flag": "^4.0.0"
+ "find-up": "^5.0.0"
}
}
}
@@ -10003,9 +9539,9 @@
}
},
"import-fresh": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
- "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
@@ -10144,9 +9680,9 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
- "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"dev": true
},
"internal-ip": {
@@ -10160,14 +9696,14 @@
}
},
"internal-slot": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz",
- "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
+ "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
"dev": true,
"requires": {
- "es-abstract": "^1.17.0-next.1",
+ "get-intrinsic": "^1.1.0",
"has": "^1.0.3",
- "side-channel": "^1.0.2"
+ "side-channel": "^1.0.4"
}
},
"ip": {
@@ -10237,6 +9773,15 @@
"binary-extensions": "^2.0.0"
}
},
+ "is-boolean-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
+ "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0"
+ }
+ },
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
@@ -10246,7 +9791,8 @@
"is-callable": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
- "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA=="
+ "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
+ "dev": true
},
"is-ci": {
"version": "2.0.0",
@@ -10353,9 +9899,9 @@
"dev": true
},
"is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"is-generator-fn": {
@@ -10390,6 +9936,12 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
+ "is-number-object": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
+ "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
+ "dev": true
+ },
"is-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
@@ -10409,17 +9961,15 @@
"dev": true,
"requires": {
"is-path-inside": "^2.1.0"
- },
- "dependencies": {
- "is-path-inside": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz",
- "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==",
- "dev": true,
- "requires": {
- "path-is-inside": "^1.0.2"
- }
- }
+ }
+ },
+ "is-path-inside": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz",
+ "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==",
+ "dev": true,
+ "requires": {
+ "path-is-inside": "^1.0.2"
}
},
"is-plain-obj": {
@@ -10481,6 +10031,12 @@
"integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
"dev": true
},
+ "is-subset": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz",
+ "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=",
+ "dev": true
+ },
"is-svg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
@@ -10494,6 +10050,7 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "dev": true,
"requires": {
"has-symbols": "^1.0.1"
}
@@ -10585,12 +10142,6 @@
"supports-color": "^7.1.0"
},
"dependencies": {
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -10605,15 +10156,6 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -10642,6 +10184,12 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
}
}
},
@@ -10666,88 +10214,17 @@
"jest-cli": "^26.6.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
+ "cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true,
"requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
}
},
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "cliui": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
- "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
- "dev": true,
- "requires": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^6.2.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -10758,18 +10235,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
"jest-cli": {
"version": "26.6.3",
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz",
@@ -10830,26 +10295,6 @@
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- },
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
@@ -10903,71 +10348,6 @@
"throat": "^5.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"execa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
@@ -10994,12 +10374,6 @@
"pump": "^3.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"is-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
@@ -11014,15 +10388,6 @@
"requires": {
"path-key": "^3.0.0"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -11053,148 +10418,6 @@
"pretty-format": "^26.6.0",
"stack-utils": "^2.0.2",
"throat": "^5.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "diff-sequences": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
- "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-diff": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
- "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "diff-sequences": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "jest-matcher-utils": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
- "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "jest-diff": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-config": {
@@ -11223,137 +10446,54 @@
"pretty-format": "^26.6.2"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
}
},
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
+ "jest-resolve": {
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
+ "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==",
"dev": true,
"requires": {
- "@types/istanbul-lib-report": "*"
+ "@jest/types": "^26.6.2",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.4",
+ "jest-pnp-resolver": "^1.2.2",
+ "jest-util": "^26.6.2",
+ "read-pkg-up": "^7.0.1",
+ "resolve": "^1.18.1",
+ "slash": "^3.0.0"
}
},
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"requires": {
- "@types/yargs-parser": "*"
+ "p-locate": "^4.1.0"
}
},
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"requires": {
- "color-convert": "^2.0.1"
+ "p-try": "^2.0.0"
}
},
- "chalk": {
+ "p-locate": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
- "requires": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- }
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "jest-resolve": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
- "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.4",
- "jest-pnp-resolver": "^1.2.2",
- "jest-util": "^26.6.2",
- "read-pkg-up": "^7.0.1",
- "resolve": "^1.18.1",
- "slash": "^3.0.0"
- }
- },
- "locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "requires": {
- "p-locate": "^4.1.0"
- }
- },
- "p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dev": true,
- "requires": {
- "p-try": "^2.0.0"
- }
- },
- "p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"requires": {
"p-limit": "^2.2.0"
@@ -11366,9 +10506,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -11383,24 +10523,6 @@
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
"read-pkg": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
@@ -11431,28 +10553,19 @@
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
"jest-diff": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz",
- "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
+ "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
"dev": true,
"requires": {
- "chalk": "^2.0.1",
- "diff-sequences": "^24.9.0",
- "jest-get-type": "^24.9.0",
- "pretty-format": "^24.9.0"
+ "chalk": "^4.0.0",
+ "diff-sequences": "^26.6.2",
+ "jest-get-type": "^26.3.0",
+ "pretty-format": "^26.6.2"
}
},
"jest-docblock": {
@@ -11475,118 +10588,6 @@
"jest-get-type": "^26.3.0",
"jest-util": "^26.6.2",
"pretty-format": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-environment-jsdom": {
@@ -11602,88 +10603,6 @@
"jest-mock": "^26.6.2",
"jest-util": "^26.6.2",
"jsdom": "^16.4.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-environment-node": {
@@ -11698,213 +10617,51 @@
"@types/node": "*",
"jest-mock": "^26.6.2",
"jest-util": "^26.6.2"
+ }
+ },
+ "jest-get-type": {
+ "version": "26.3.0",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
+ "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
+ "dev": true
+ },
+ "jest-haste-map": {
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz",
+ "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==",
+ "dev": true,
+ "requires": {
+ "@jest/types": "^26.6.2",
+ "@types/graceful-fs": "^4.1.2",
+ "@types/node": "*",
+ "anymatch": "^3.0.3",
+ "fb-watchman": "^2.0.0",
+ "fsevents": "^2.1.2",
+ "graceful-fs": "^4.2.4",
+ "jest-regex-util": "^26.0.0",
+ "jest-serializer": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-worker": "^26.6.2",
+ "micromatch": "^4.0.2",
+ "sane": "^4.0.3",
+ "walker": "^1.0.7"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
+ "anymatch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"dev": true,
"requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
}
},
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
- "jest-get-type": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz",
- "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==",
- "dev": true
- },
- "jest-haste-map": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz",
- "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "@types/graceful-fs": "^4.1.2",
- "@types/node": "*",
- "anymatch": "^3.0.3",
- "fb-watchman": "^2.0.0",
- "fsevents": "^2.1.2",
- "graceful-fs": "^4.2.4",
- "jest-regex-util": "^26.0.0",
- "jest-serializer": "^26.6.2",
- "jest-util": "^26.6.2",
- "jest-worker": "^26.6.2",
- "micromatch": "^4.0.2",
- "sane": "^4.0.3",
- "walker": "^1.0.7"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
- "dev": true,
- "requires": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "normalize-path": {
+ "normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -11932,148 +10689,6 @@
"jest-util": "^26.6.2",
"pretty-format": "^26.6.2",
"throat": "^5.0.0"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "diff-sequences": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
- "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-diff": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
- "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "diff-sequences": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "jest-matcher-utils": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
- "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "jest-diff": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-leak-detector": {
@@ -12084,130 +10699,18 @@
"requires": {
"jest-get-type": "^26.3.0",
"pretty-format": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-matcher-utils": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz",
- "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
+ "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
"dev": true,
"requires": {
- "chalk": "^2.0.1",
- "jest-diff": "^24.9.0",
- "jest-get-type": "^24.9.0",
- "pretty-format": "^24.9.0"
+ "chalk": "^4.0.0",
+ "jest-diff": "^26.6.2",
+ "jest-get-type": "^26.3.0",
+ "pretty-format": "^26.6.2"
}
},
"jest-message-util": {
@@ -12216,213 +10719,25 @@
"integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
- "@jest/types": "^26.6.2",
- "@types/stack-utils": "^2.0.0",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.4",
- "micromatch": "^4.0.2",
- "pretty-format": "^26.6.2",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
- "jest-mock": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz",
- "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "@types/node": "*"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
+ "@babel/code-frame": "^7.0.0",
+ "@jest/types": "^26.6.2",
+ "@types/stack-utils": "^2.0.0",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.4",
+ "micromatch": "^4.0.2",
+ "pretty-format": "^26.6.2",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.2"
+ }
+ },
+ "jest-mock": {
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz",
+ "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==",
+ "dev": true,
+ "requires": {
+ "@jest/types": "^26.6.2",
+ "@types/node": "*"
}
},
"jest-pnp-resolver": {
@@ -12453,71 +10768,6 @@
"slash": "^3.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -12528,12 +10778,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@@ -12568,9 +10812,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -12615,15 +10859,6 @@
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -12636,88 +10871,6 @@
"@jest/types": "^26.6.2",
"jest-regex-util": "^26.0.0",
"jest-snapshot": "^26.6.2"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-runner": {
@@ -12748,71 +10901,6 @@
"throat": "^5.0.0"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -12823,12 +10911,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"jest-resolve": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
@@ -12879,9 +10961,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -12926,15 +11008,6 @@
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -12973,56 +11046,6 @@
"yargs": "^15.4.1"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@@ -13034,27 +11057,6 @@
"wrap-ansi": "^6.2.0"
}
},
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -13065,18 +11067,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
"jest-resolve": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
@@ -13127,9 +11117,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -13175,31 +11165,11 @@
"type-fest": "^0.8.1"
}
},
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
"strip-bom": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
- "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
+ "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
+ "dev": true
},
"wrap-ansi": {
"version": "6.2.0",
@@ -13277,83 +11247,6 @@
"semver": "^7.3.2"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "diff-sequences": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
- "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
- "dev": true
- },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -13364,42 +11257,6 @@
"path-exists": "^4.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-diff": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
- "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "diff-sequences": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "jest-matcher-utils": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
- "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
- "dev": true,
- "requires": {
- "chalk": "^4.0.0",
- "jest-diff": "^26.6.2",
- "jest-get-type": "^26.3.0",
- "pretty-format": "^26.6.2"
- }
- },
"jest-resolve": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
@@ -13450,9 +11307,9 @@
"dev": true
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -13467,24 +11324,6 @@
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
"read-pkg": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
@@ -13515,15 +11354,6 @@
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -13541,85 +11371,11 @@
"micromatch": "^4.0.2"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "@types/node": {
+ "version": "14.14.22",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
+ "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==",
"dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -13637,121 +11393,11 @@
"pretty-format": "^26.6.2"
},
"dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
"camelcase": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
"integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
"dev": true
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "jest-get-type": {
- "version": "26.3.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
- "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==",
- "dev": true
- },
- "pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dev": true,
- "requires": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
- }
- },
- "react-is": {
- "version": "17.0.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
- "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
@@ -13759,66 +11405,15 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.6.1.tgz",
"integrity": "sha512-ITVnHhj3Jd/QkqQcTqZfRgjfyRhDFM/auzgVo2RKvSwi18YMvh0WvXDJFoFED6c7jd/5jxtu4kSOb9PTu2cPVg==",
- "dev": true,
- "requires": {
- "ansi-escapes": "^4.3.1",
- "chalk": "^4.0.0",
- "jest-regex-util": "^26.0.0",
- "jest-watcher": "^26.3.0",
- "slash": "^3.0.0",
- "string-length": "^4.0.1",
- "strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^4.3.1",
+ "chalk": "^4.0.0",
+ "jest-regex-util": "^26.0.0",
+ "jest-watcher": "^26.3.0",
+ "slash": "^3.0.0",
+ "string-length": "^4.0.1",
+ "strip-ansi": "^6.0.0"
}
},
"jest-watcher": {
@@ -13834,88 +11429,6 @@
"chalk": "^4.0.0",
"jest-util": "^26.6.2",
"string-length": "^4.0.1"
- },
- "dependencies": {
- "@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- }
- },
- "@types/istanbul-reports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
- "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "@types/yargs": {
- "version": "15.0.11",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.11.tgz",
- "integrity": "sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==",
- "dev": true,
- "requires": {
- "@types/yargs-parser": "*"
- }
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"jest-worker": {
@@ -13927,23 +11440,6 @@
"@types/node": "*",
"merge-stream": "^2.0.0",
"supports-color": "^7.0.0"
- },
- "dependencies": {
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"js-base64": {
@@ -14007,6 +11503,12 @@
"xml-name-validator": "^3.0.0"
},
"dependencies": {
+ "parse5": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
+ "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "dev": true
+ },
"tough-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
@@ -14084,14 +11586,6 @@
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
- },
- "dependencies": {
- "universalify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
- "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
- "dev": true
- }
}
},
"jsonify": {
@@ -14113,13 +11607,13 @@
}
},
"jsx-ast-utils": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.1.0.tgz",
- "integrity": "sha512-d4/UOjg+mxAWxCiF0c5UTSwyqbchkbqCvK87aBovhnh8GtysTjWmgC63tY0cJx/HzGgm9qnA147jVBdpOiQ2RA==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz",
+ "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==",
"dev": true,
"requires": {
- "array-includes": "^3.1.1",
- "object.assign": "^4.1.1"
+ "array-includes": "^3.1.2",
+ "object.assign": "^4.1.2"
}
},
"killable": {
@@ -14210,38 +11704,10 @@
"stringify-object": "^3.3.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "commander": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
+ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
"dev": true
},
"debug": {
@@ -14279,12 +11745,6 @@
"pump": "^3.0.0"
}
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"is-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
@@ -14311,22 +11771,13 @@
"requires": {
"path-key": "^3.0.0"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
"listr2": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.3.tgz",
- "integrity": "sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.3.0.tgz",
+ "integrity": "sha512-G9IFI/m65icgVlifS0wMQnvn35/8VJGzEb3crpE4NnaegQYQOn/wP7yqi9TTJQ/eoxme4UaPbffBK1XqKP/DOg==",
"dev": true,
"requires": {
"chalk": "^4.1.0",
@@ -14336,56 +11787,19 @@
"log-update": "^4.0.0",
"p-map": "^4.0.0",
"rxjs": "^6.6.3",
- "through": "^2.3.8"
+ "through": "^2.3.8",
+ "wrap-ansi": "^7.0.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"requires": {
- "has-flag": "^4.0.0"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
}
}
}
@@ -14456,6 +11870,24 @@
"resolved": "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz",
"integrity": "sha1-JI42By7ekGUB11lmIAqG2riyMXA="
},
+ "lodash.escape": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz",
+ "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=",
+ "dev": true
+ },
+ "lodash.flattendeep": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
+ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
+ "dev": true
+ },
+ "lodash.isequal": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
+ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=",
+ "dev": true
+ },
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@@ -14500,57 +11932,6 @@
"dev": true,
"requires": {
"chalk": "^4.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"log-update": {
@@ -14565,70 +11946,6 @@
"wrap-ansi": "^6.2.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "astral-regex": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
- "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
- "dev": true
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "slice-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
- "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.0.0",
- "astral-regex": "^2.0.0",
- "is-fullwidth-code-point": "^3.0.0"
- }
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
@@ -14676,9 +11993,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"dev": true
}
}
@@ -14701,6 +12018,36 @@
"sourcemap-codec": "^1.4.4"
}
},
+ "make-dir": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "dev": true,
+ "requires": {
+ "pify": "^4.0.1",
+ "semver": "^5.6.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
"makeerror": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz",
@@ -14792,21 +12139,6 @@
"pinkie-promise": "^2.0.0"
}
},
- "get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
- "dev": true
- },
- "indent-string": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
- "dev": true,
- "requires": {
- "repeating": "^2.0.0"
- }
- },
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@@ -14861,16 +12193,6 @@
"read-pkg": "^1.0.0"
}
},
- "redent": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
- "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
- "dev": true,
- "requires": {
- "indent-string": "^2.1.0",
- "strip-indent": "^1.0.1"
- }
- },
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
@@ -14879,15 +12201,6 @@
"requires": {
"is-utf8": "^0.2.0"
}
- },
- "strip-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
- "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
- "dev": true,
- "requires": {
- "get-stdin": "^4.0.1"
- }
}
}
},
@@ -14956,18 +12269,18 @@
"dev": true
},
"mime-db": {
- "version": "1.44.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
+ "version": "1.45.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
+ "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
"dev": true
},
"mime-types": {
- "version": "2.1.27",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
- "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
+ "version": "2.1.28",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
+ "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
"dev": true,
"requires": {
- "mime-db": "1.44.0"
+ "mime-db": "1.45.0"
}
},
"mimic-fn": {
@@ -15014,24 +12327,6 @@
"json5": "^1.0.1"
}
},
- "normalize-url": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
- "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
- "dev": true,
- "requires": {
- "object-assign": "^4.0.1",
- "prepend-http": "^1.0.0",
- "query-string": "^4.1.0",
- "sort-keys": "^1.0.0"
- }
- },
- "prepend-http": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
- "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
- "dev": true
- },
"schema-utils": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
@@ -15156,13 +12451,16 @@
}
},
"mkdirp": {
- "version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5"
- }
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "moo": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz",
+ "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==",
+ "dev": true
},
"move-concurrently": {
"version": "1.0.1",
@@ -15178,6 +12476,15 @@
"run-queue": "^1.0.3"
},
"dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -15216,6 +12523,12 @@
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
"dev": true
},
+ "nanoid": {
+ "version": "3.1.20",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz",
+ "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==",
+ "dev": true
+ },
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -15250,6 +12563,18 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "nearley": {
+ "version": "2.20.1",
+ "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz",
+ "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==",
+ "dev": true,
+ "requires": {
+ "commander": "^2.19.0",
+ "moo": "^0.5.0",
+ "railroad-diagrams": "^1.0.0",
+ "randexp": "0.4.6"
+ }
+ },
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
@@ -15285,9 +12610,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"dev": true
}
}
@@ -15325,6 +12650,15 @@
"which": "1"
},
"dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -15403,9 +12737,9 @@
"dev": true
},
"node-notifier": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.0.tgz",
- "integrity": "sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.1.tgz",
+ "integrity": "sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==",
"dev": true,
"optional": true,
"requires": {
@@ -15418,9 +12752,9 @@
}
},
"node-releases": {
- "version": "1.1.67",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz",
- "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==",
+ "version": "1.1.70",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz",
+ "integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==",
"dev": true
},
"node-sass": {
@@ -15499,6 +12833,15 @@
"yallist": "^2.1.2"
}
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@@ -15575,6 +12918,18 @@
"integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
"dev": true
},
+ "normalize-url": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
+ "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.0.1",
+ "prepend-http": "^1.0.0",
+ "query-string": "^4.1.0",
+ "sort-keys": "^1.0.0"
+ }
+ },
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -15605,12 +12960,12 @@
}
},
"nth-check": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
- "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz",
+ "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==",
"dev": true,
"requires": {
- "boolbase": "~1.0.0"
+ "boolbase": "^1.0.0"
}
},
"num2fraction": {
@@ -15676,7 +13031,8 @@
"object-inspect": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
- "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
+ "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
+ "dev": true
},
"object-is": {
"version": "1.1.4",
@@ -15705,6 +13061,7 @@
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
"integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "dev": true,
"requires": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3",
@@ -15725,23 +13082,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -15759,23 +13118,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -15792,23 +13153,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -15835,23 +13198,25 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -15895,9 +13260,9 @@
}
},
"open": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/open/-/open-7.3.0.tgz",
- "integrity": "sha512-mgLwQIx2F/ye9SmbrUkurZCnkoXyXyu9EbHtJZrICjVAJfyMArdHp3KkixGdZx1ZHFPNIwl0DDM1dFFqXbTLZw==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/open/-/open-7.3.1.tgz",
+ "integrity": "sha512-f2wt9DCBKKjlFbjzGb8MOAW8LH8F0mrs1zc7KTjAJ9PZNQbfenzWbNP1VZJvw6ICMG9r14Ah6yfwPn7T7i646A==",
"dev": true,
"requires": {
"is-docker": "^2.0.0",
@@ -16070,9 +13435,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"dev": true
}
}
@@ -16114,11 +13479,20 @@
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA=="
},
"parse5": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
- "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
+ "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
"dev": true
},
+ "parse5-htmlparser2-tree-adapter": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz",
+ "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==",
+ "dev": true,
+ "requires": {
+ "parse5": "^6.0.1"
+ }
+ },
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -16136,9 +13510,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
- "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"dev": true
}
}
@@ -16364,6 +13738,15 @@
"ms": "^2.1.1"
}
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -16389,6 +13772,64 @@
"supports-color": "^6.1.0"
},
"dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
@@ -16868,21 +14309,6 @@
"vendors": "^1.0.0"
},
"dependencies": {
- "dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true
- },
"postcss-selector-parser": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
@@ -16968,21 +14394,6 @@
"postcss-selector-parser": "^3.0.0"
},
"dependencies": {
- "dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true
- },
"postcss-selector-parser": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
@@ -17399,22 +14810,22 @@
"postcss": "^8.1.0"
},
"dependencies": {
- "nanoid": {
- "version": "3.1.20",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz",
- "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==",
- "dev": true
- },
"postcss": {
- "version": "8.2.1",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.1.tgz",
- "integrity": "sha512-RhsqOOAQzTgh1UB/IZdca7F9WDb7SUCR2Vnv1x7DbvuuggQIpoDwjK+q0rzoPffhYvWNKX5JSwS4so4K3UC6vA==",
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz",
+ "integrity": "sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg==",
"dev": true,
"requires": {
"colorette": "^1.2.1",
"nanoid": "^3.1.20",
"source-map": "^0.6.1"
}
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
}
}
},
@@ -17429,9 +14840,9 @@
}
},
"postcss-selector-not": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-4.0.0.tgz",
- "integrity": "sha512-W+bkBZRhqJaYN8XAnbbZPLWMvZD1wKTu0UxtFKdhtGjWYmxhkUneoeOhRJKdAE5V7ZTlnbHfCR+6bNwK9e1dTQ==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-4.0.1.tgz",
+ "integrity": "sha512-YolvBgInEK5/79C+bdFMyzqTg6pkYqDbzZIST/PDMqa/o3qtXenD05apBG2jLgT0/BQ77d4U2UK12jWpilqMAQ==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
@@ -17504,6 +14915,12 @@
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true
},
+ "prepend-http": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
+ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
+ "dev": true
+ },
"prettier": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
@@ -17520,9 +14937,9 @@
}
},
"pretty-bytes": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.4.1.tgz",
- "integrity": "sha512-s1Iam6Gwz3JI5Hweaz4GoCD1WUNUIyzePFy5+Js2hjwGVt2Z79wNN+ZKOZ2vB6C+Xs6njyB84Z1IthQg8d9LxA==",
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.5.0.tgz",
+ "integrity": "sha512-p+T744ZyjjiaFlMUZZv6YPC5JrkNj8maRmPaQCWFJFplUAzpIUTRaTcS+7wmZtUoFXHtESJb23ISliaWyz3SHA==",
"dev": true
},
"pretty-error": {
@@ -17536,15 +14953,15 @@
}
},
"pretty-format": {
- "version": "24.9.0",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz",
- "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^24.9.0",
- "ansi-regex": "^4.0.0",
- "ansi-styles": "^3.2.0",
- "react-is": "^16.8.4"
+ "@jest/types": "^26.6.2",
+ "ansi-regex": "^5.0.0",
+ "ansi-styles": "^4.0.0",
+ "react-is": "^17.0.1"
}
},
"pretty-ms": {
@@ -17606,6 +15023,24 @@
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
+ },
+ "dependencies": {
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ }
+ }
+ },
+ "prop-types-exact": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz",
+ "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3",
+ "object.assign": "^4.1.0",
+ "reflect.ownkeys": "^0.2.0"
}
},
"proxy-addr": {
@@ -17704,9 +15139,9 @@
"dev": true
},
"qs": {
- "version": "6.7.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
- "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true
},
"query-string": {
@@ -17746,6 +15181,22 @@
"performance-now": "^2.1.0"
}
},
+ "railroad-diagrams": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz",
+ "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=",
+ "dev": true
+ },
+ "randexp": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz",
+ "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==",
+ "dev": true,
+ "requires": {
+ "discontinuous-range": "1.0.0",
+ "ret": "~0.1.10"
+ }
+ },
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -17781,6 +15232,14 @@
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
+ "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
+ "dev": true
+ }
}
},
"react": {
@@ -17820,9 +15279,9 @@
}
},
"react-datepicker": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-3.3.0.tgz",
- "integrity": "sha512-QnIlBxDSWEGBi2X5P1BqWzvfnPFRKhtrsgAcujUVwyWeID/VatFaAOEjEjfD1bXR9FuSYVLlLR3j/vbG19hWOA==",
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-3.4.1.tgz",
+ "integrity": "sha512-ASyVb7UmVx1vzeITidD7Cr/EXRXhKyjjbSkBndPc1MipYq4rqQ3eMFgvRQzpsXc3JmIMFgICm7nmN6Otc1GE/Q==",
"requires": {
"classnames": "^2.2.6",
"date-fns": "^2.0.1",
@@ -17863,6 +15322,24 @@
"text-table": "0.2.0"
},
"dependencies": {
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
"browserslist": {
"version": "4.14.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz",
@@ -17875,6 +15352,40 @@
"node-releases": "^1.1.61"
}
},
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
@@ -17891,6 +15402,26 @@
"path-exists": "^4.0.0"
}
},
+ "globby": {
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
+ "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
+ "dev": true,
+ "requires": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.1.1",
+ "ignore": "^5.1.4",
+ "merge2": "^1.3.0",
+ "slash": "^3.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"immer": {
"version": "7.0.9",
"resolved": "https://registry.npmjs.org/immer/-/immer-7.0.9.tgz",
@@ -17935,6 +15466,15 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
}
}
},
@@ -17960,9 +15500,10 @@
"integrity": "sha512-Ule/KqHBwUvuubqGC4WDvOARS6VjlULSS+WHspgQ5FhFKR4ytHDc4AMpjVfnv+Wbz2TEbMp9/ZHmuZsUksPCiA=="
},
"react-is": {
- "version": "16.13.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ "version": "17.0.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
+ "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==",
+ "dev": true
},
"react-json-tree": {
"version": "0.13.0",
@@ -17984,9 +15525,9 @@
}
},
"react-onclickoutside": {
- "version": "6.9.0",
- "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.9.0.tgz",
- "integrity": "sha512-8ltIY3bC7oGhj2nPAvWOGi+xGFybPNhJM0V1H8hY/whNcXgmDeaeoCMPPd8VatrpTsUWjb/vGzrmu6SrXVty3A=="
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.10.0.tgz",
+ "integrity": "sha512-7i2L3ef+0ILXpL6P+Hg304eCQswh4jl3ynwR71BSlMU49PE2uk31k8B2GkP6yE9s2D4jTGKnzuSpzWxu4YxfQQ=="
},
"react-popper": {
"version": "1.3.7",
@@ -18012,6 +15553,13 @@
"loose-envify": "^1.4.0",
"prop-types": "^15.7.2",
"react-is": "^16.13.1"
+ },
+ "dependencies": {
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ }
}
},
"react-refresh": {
@@ -18035,6 +15583,13 @@
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
+ },
+ "dependencies": {
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ }
}
},
"react-router-dom": {
@@ -18148,6 +15703,28 @@
}
}
},
+ "react-shallow-renderer": {
+ "version": "16.14.1",
+ "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz",
+ "integrity": "sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.1",
+ "react-is": "^16.12.0 || ^17.0.0"
+ }
+ },
+ "react-test-renderer": {
+ "version": "17.0.1",
+ "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-17.0.1.tgz",
+ "integrity": "sha512-/dRae3mj6aObwkjCcxZPlxDFh73XZLgvwhhyON2haZGUEhiaY5EjfAdw+d/rQmlcFwdTpMXCSGVk374QbCTlrA==",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.1",
+ "react-is": "^17.0.1",
+ "react-shallow-renderer": "^16.13.1",
+ "scheduler": "^0.20.1"
+ }
+ },
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
@@ -18223,13 +15800,24 @@
}
},
"redent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
- "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
"dev": true,
"requires": {
- "indent-string": "^4.0.0",
- "strip-indent": "^3.0.0"
+ "indent-string": "^2.1.0",
+ "strip-indent": "^1.0.1"
+ },
+ "dependencies": {
+ "indent-string": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "dev": true,
+ "requires": {
+ "repeating": "^2.0.0"
+ }
+ }
}
},
"redux": {
@@ -18246,6 +15834,12 @@
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz",
"integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw=="
},
+ "reflect.ownkeys": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz",
+ "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=",
+ "dev": true
+ },
"regenerate": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
@@ -18292,12 +15886,12 @@
"dev": true
},
"regexp.prototype.flags": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz",
- "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz",
+ "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==",
"requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
}
},
"regexpp": {
@@ -18327,9 +15921,9 @@
"dev": true
},
"regjsparser": {
- "version": "0.6.4",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
- "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
+ "version": "0.6.6",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.6.tgz",
+ "integrity": "sha512-jjyuCp+IEMIm3N1H1LLTJW1EISEJV9+5oHdEyrt43Pg9cDSb6rrLZei2cVWpl0xTjmmlpec/lEQGYgM7xfpGCQ==",
"dev": true,
"requires": {
"jsesc": "~0.5.0"
@@ -18356,14 +15950,14 @@
"dev": true
},
"renderkid": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.4.tgz",
- "integrity": "sha512-K2eXrSOJdq+HuKzlcjOlGoOarUu5SDguDEhE7+Ah4zuOWL40j8A/oHvLlLob9PSTNvVnBd+/q0Er1QfpEuem5g==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.5.tgz",
+ "integrity": "sha512-ccqoLg+HLOHq1vdfYNm4TBeaCDIi1FLt3wGojTDSvdewUv65oTmI3cnT2E4hRjl1gzKZIPK+KZrXzlUYKnR+vQ==",
"dev": true,
"requires": {
- "css-select": "^1.1.0",
+ "css-select": "^2.0.2",
"dom-converter": "^0.2",
- "htmlparser2": "^3.3.0",
+ "htmlparser2": "^3.10.1",
"lodash": "^4.17.20",
"strip-ansi": "^3.0.0"
},
@@ -18375,33 +15969,108 @@
"dev": true
},
"css-select": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
- "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
+ "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
"dev": true,
"requires": {
- "boolbase": "~1.0.0",
- "css-what": "2.1",
- "domutils": "1.5.1",
- "nth-check": "~1.0.1"
+ "boolbase": "^1.0.0",
+ "css-what": "^3.2.1",
+ "domutils": "^1.7.0",
+ "nth-check": "^1.0.2"
}
},
"css-what": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz",
- "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
+ "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
+ "dev": true
+ },
+ "dom-serializer": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
+ "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "entities": "^2.0.0"
+ },
+ "dependencies": {
+ "domelementtype": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
+ "dev": true
+ }
+ }
+ },
+ "domelementtype": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
+ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
"dev": true
},
+ "domhandler": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
+ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "1"
+ }
+ },
"domutils": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
- "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
+ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
"dev": true,
"requires": {
"dom-serializer": "0",
"domelementtype": "1"
}
},
+ "htmlparser2": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
+ "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^1.3.1",
+ "domhandler": "^2.3.0",
+ "domutils": "^1.5.1",
+ "entities": "^1.1.1",
+ "inherits": "^2.0.1",
+ "readable-stream": "^3.1.1"
+ },
+ "dependencies": {
+ "entities": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+ "dev": true
+ }
+ }
+ },
+ "nth-check": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
+ "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
+ "dev": true,
+ "requires": {
+ "boolbase": "~1.0.0"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@@ -18462,12 +16131,6 @@
"uuid": "^3.3.2"
},
"dependencies": {
- "qs": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
- "dev": true
- },
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
@@ -18502,6 +16165,12 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
@@ -18580,12 +16249,64 @@
"source-map": "0.6.1"
},
"dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
"emojis-list": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
"dev": true
},
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"loader-utils": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
@@ -18608,6 +16329,12 @@
"supports-color": "^6.1.0"
}
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
@@ -18736,6 +16463,12 @@
"terser": "^4.6.2"
},
"dependencies": {
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"jest-worker": {
"version": "24.9.0",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz",
@@ -18783,6 +16516,16 @@
}
}
},
+ "rst-selector-parser": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz",
+ "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=",
+ "dev": true,
+ "requires": {
+ "lodash.flattendeep": "^4.4.0",
+ "nearley": "^2.7.10"
+ }
+ },
"rsvp": {
"version": "4.8.5",
"resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz",
@@ -18974,6 +16717,18 @@
"yargs": "^13.3.2"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -18983,6 +16738,12 @@
"locate-path": "^3.0.0"
}
},
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@@ -19017,6 +16778,26 @@
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ },
"yargs": {
"version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
@@ -19166,9 +16947,9 @@
"dev": true
},
"semver-regex": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
- "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.2.tgz",
+ "integrity": "sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==",
"dev": true
},
"send": {
@@ -19362,35 +17143,14 @@
"optional": true
},
"side-channel": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.3.tgz",
- "integrity": "sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dev": true,
"requires": {
- "es-abstract": "^1.18.0-next.0",
- "object-inspect": "^1.8.0"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
}
},
"signal-exit": {
@@ -19420,14 +17180,14 @@
"dev": true
},
"slice-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
- "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.0",
- "astral-regex": "^1.0.0",
- "is-fullwidth-code-point": "^2.0.0"
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
}
},
"snapdragon": {
@@ -19463,12 +17223,6 @@
"requires": {
"is-extendable": "^0.1.0"
}
- },
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
}
}
},
@@ -19618,9 +17372,9 @@
"dev": true
},
"source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
},
"source-map-resolve": {
@@ -19644,6 +17398,14 @@
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"source-map-url": {
@@ -19795,9 +17557,9 @@
}
},
"ssri": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz",
- "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
+ "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",
"dev": true,
"requires": {
"minipass": "^3.1.1"
@@ -19942,25 +17704,14 @@
"dev": true
},
"string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- },
- "dependencies": {
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
}
},
"string.prototype.matchall": {
@@ -19979,23 +17730,60 @@
},
"dependencies": {
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.2.2",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.1",
+ "object-inspect": "^1.9.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
+ }
+ }
+ }
+ },
+ "string.prototype.trim": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz",
+ "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.18.0-next.1"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0-next.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+ "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
+ "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.3",
+ "string.prototype.trimstart": "^1.0.3"
}
}
}
@@ -20004,6 +17792,7 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
"integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
+ "dev": true,
"requires": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3"
@@ -20013,6 +17802,7 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
"integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
+ "dev": true,
"requires": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3"
@@ -20045,14 +17835,6 @@
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
- }
}
},
"strip-bom": {
@@ -20083,12 +17865,20 @@
"dev": true
},
"strip-indent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
- "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"dev": true,
"requires": {
- "min-indent": "^1.0.0"
+ "get-stdin": "^4.0.1"
+ },
+ "dependencies": {
+ "get-stdin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "dev": true
+ }
}
},
"strip-json-comments": {
@@ -20118,21 +17908,6 @@
"postcss-selector-parser": "^3.0.0"
},
"dependencies": {
- "dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true
- },
"postcss-selector-parser": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
@@ -20147,12 +17922,12 @@
}
},
"supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
- "has-flag": "^3.0.0"
+ "has-flag": "^4.0.0"
}
},
"supports-hyperlinks": {
@@ -20163,23 +17938,6 @@
"requires": {
"has-flag": "^4.0.0",
"supports-color": "^7.0.0"
- },
- "dependencies": {
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
}
},
"svg-parser": {
@@ -20207,6 +17965,128 @@
"stable": "^0.1.8",
"unquote": "~1.1.1",
"util.promisify": "~1.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "css-select": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
+ "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
+ "dev": true,
+ "requires": {
+ "boolbase": "^1.0.0",
+ "css-what": "^3.2.1",
+ "domutils": "^1.7.0",
+ "nth-check": "^1.0.2"
+ }
+ },
+ "css-what": {
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
+ "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
+ "dev": true
+ },
+ "dom-serializer": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
+ "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "entities": "^2.0.0"
+ },
+ "dependencies": {
+ "domelementtype": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
+ "dev": true
+ }
+ }
+ },
+ "domelementtype": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
+ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
+ "dev": true
+ },
+ "domutils": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
+ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
+ "dev": true,
+ "requires": {
+ "dom-serializer": "0",
+ "domelementtype": "1"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
+ "nth-check": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
+ "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
+ "dev": true,
+ "requires": {
+ "boolbase": "~1.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
}
},
"symbol-observable": {
@@ -20221,15 +18101,35 @@
"dev": true
},
"table": {
- "version": "5.4.6",
- "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
- "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "version": "6.0.7",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
+ "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
"dev": true,
"requires": {
- "ajv": "^6.10.2",
- "lodash": "^4.17.14",
- "slice-ansi": "^2.1.0",
- "string-width": "^3.0.0"
+ "ajv": "^7.0.2",
+ "lodash": "^4.17.20",
+ "slice-ansi": "^4.0.0",
+ "string-width": "^4.2.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz",
+ "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ }
}
},
"tapable": {
@@ -20295,10 +18195,10 @@
"source-map-support": "~0.5.12"
},
"dependencies": {
- "commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
@@ -20320,12 +18220,6 @@
"webpack-sources": "^1.4.3"
},
"dependencies": {
- "commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
- "dev": true
- },
"find-cache-dir": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
@@ -20432,6 +18326,12 @@
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
"terser": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
@@ -20634,6 +18534,36 @@
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
"dev": true
},
+ "ts-jest": {
+ "version": "26.4.4",
+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.4.4.tgz",
+ "integrity": "sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==",
+ "dev": true,
+ "requires": {
+ "@types/jest": "26.x",
+ "bs-logger": "0.x",
+ "buffer-from": "1.x",
+ "fast-json-stable-stringify": "2.x",
+ "jest-util": "^26.1.0",
+ "json5": "2.x",
+ "lodash.memoize": "4.x",
+ "make-error": "1.x",
+ "mkdirp": "1.x",
+ "semver": "7.x",
+ "yargs-parser": "20.x"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+ "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ }
+ }
+ },
"ts-pnp": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz",
@@ -20658,9 +18588,9 @@
"dev": true
},
"tsutils": {
- "version": "3.17.1",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz",
- "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==",
+ "version": "3.20.0",
+ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz",
+ "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
@@ -20750,9 +18680,9 @@
"integrity": "sha512-bna6Yi1pRznoo6Bz1cE6btB/Yy8Xywytyfrzu/wc+NFW3ZF0I+2iCGImhBsoYYCOWuICtRO4yHcnDlzgo1AdNg=="
},
"typescript": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz",
- "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
+ "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
},
"unicode-canonical-property-names-ecmascript": {
@@ -20835,9 +18765,9 @@
}
},
"universalify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
- "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
},
"unpipe": {
@@ -20905,9 +18835,9 @@
"dev": true
},
"uri-js": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
- "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
@@ -21041,9 +18971,9 @@
"dev": true
},
"v8-to-istanbul": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz",
- "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz",
+ "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.1",
@@ -21606,6 +19536,15 @@
"to-regex": "^3.0.2"
}
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -21635,6 +19574,12 @@
"randombytes": "^2.1.0"
}
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
"ssri": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
@@ -21680,9 +19625,9 @@
}
},
"webpack-dev-middleware": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz",
- "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==",
+ "version": "3.7.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz",
+ "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==",
"dev": true,
"requires": {
"memory-fs": "^0.4.1",
@@ -21693,10 +19638,19 @@
},
"dependencies": {
"mime": {
- "version": "2.4.6",
- "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
- "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz",
+ "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==",
"dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
}
}
},
@@ -21800,6 +19754,12 @@
"ms": "2.1.2"
}
},
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -21862,6 +19822,12 @@
}
}
},
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"import-local": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz",
@@ -21887,6 +19853,12 @@
"binary-extensions": "^1.0.0"
}
},
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
@@ -22051,6 +20023,34 @@
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
},
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
+ }
+ },
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@@ -22190,6 +20190,14 @@
"requires": {
"source-list-map": "^2.0.0",
"source-map": "~0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"websocket-driver": {
@@ -22275,6 +20283,12 @@
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@@ -22548,6 +20562,59 @@
"strip-ansi": "^5.0.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -22564,10 +20631,22 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
+ "write-file-atomic": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "is-typedarray": "^1.0.0",
+ "signal-exit": "^3.0.2",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
"ws": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.1.tgz",
- "integrity": "sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ==",
+ "version": "7.4.2",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz",
+ "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==",
"dev": true
},
"xml-name-validator": {
@@ -22625,6 +20704,18 @@
"yargs-parser": "^15.0.1"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -22634,6 +20725,12 @@
"locate-path": "^3.0.0"
}
},
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@@ -22667,18 +20764,44 @@
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ },
+ "yargs-parser": {
+ "version": "15.0.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
+ "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
}
}
},
"yargs-parser": {
- "version": "15.0.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
- "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
- "dev": true,
- "requires": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- }
+ "version": "20.2.4",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
+ "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
+ "dev": true
},
"yocto-queue": {
"version": "0.1.0",
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index 8954bc221f8..58385ade3e1 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -32,7 +32,8 @@
"lint-staged": {
"*.{js,ts,jsx,tsx}": [
"eslint -c .eslintrc.json --fix",
- "git add"
+ "git add",
+ "jest --bail --findRelatedTests"
]
},
"scripts": {
@@ -65,11 +66,12 @@
]
},
"devDependencies": {
- "@testing-library/jest-dom": "^4.2.4",
+ "@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.1.2",
"@types/classnames": "^2.2.11",
- "@types/jest": "^24.9.1",
+ "@types/enzyme": "^3.10.8",
+ "@types/jest": "^26.0.20",
"@types/lodash": "^4.14.165",
"@types/node": "^12.19.8",
"@types/react": "^17.0.0",
@@ -80,7 +82,9 @@
"@types/redux-thunk": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
+ "@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
"dotenv": "^8.2.0",
+ "enzyme": "^3.11.0",
"eslint": "^7.14.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^12.0.0",
@@ -96,6 +100,7 @@
"node-sass": "^4.14.1",
"prettier": "^2.2.1",
"react-scripts": "4.0.1",
+ "ts-jest": "^26.4.4",
"typescript": "~4.1.2"
},
"engines": {
diff --git a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
index f9ef65f18e4..5a6f639f691 100644
--- a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
@@ -20,7 +20,7 @@ import * as _ from 'lodash';
import { useDebouncedCallback } from 'use-debounce';
import { Option } from 'react-multi-select-component/dist/lib/interfaces';
-interface Props {
+export interface Props {
clusterName: ClusterName;
topicName: TopicName;
isFetched: boolean;
@@ -309,7 +309,6 @@ const Messages: React.FC<Props> = ({
id="selectSeekType"
name="selectSeekType"
onChange={handleSeekTypeChange}
- defaultValue={SeekType.OFFSET}
value={selectedSeekType}
>
<option value={SeekType.OFFSET}>Offset</option>
diff --git a/kafka-ui-react-app/src/setupTests.ts b/kafka-ui-react-app/src/setupTests.ts
index 4b4bbc59749..331db20fe8b 100644
--- a/kafka-ui-react-app/src/setupTests.ts
+++ b/kafka-ui-react-app/src/setupTests.ts
@@ -1,6 +1,6 @@
-// jest-dom adds custom jest matchers for asserting on DOM nodes.
-// allows you to do things like:
-// expect(element).toHaveTextContent(/react/i)
-// learn more: https://github.com/testing-library/jest-dom
-// eslint-disable-next-line import/no-extraneous-dependencies
+/* eslint-disable */
+import * as Enzyme from 'enzyme';
+import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import '@testing-library/jest-dom/extend-expect';
+
+Enzyme.configure({ adapter: new Adapter() });
| diff --git a/kafka-ui-react-app/src/tests/Topics/Details/Messages/Messages.spec.tsx b/kafka-ui-react-app/src/tests/Topics/Details/Messages/Messages.spec.tsx
new file mode 100644
index 00000000000..76c09cc51d8
--- /dev/null
+++ b/kafka-ui-react-app/src/tests/Topics/Details/Messages/Messages.spec.tsx
@@ -0,0 +1,156 @@
+import React from 'react';
+import { mount, shallow } from 'enzyme';
+import JSONTree from 'react-json-tree';
+import * as useDebounce from 'use-debounce';
+import DatePicker from 'react-datepicker';
+import Messages, { Props } from 'components/Topics/Details/Messages/Messages';
+import PageLoader from 'components/common/PageLoader/PageLoader';
+
+describe('Messages component', () => {
+ beforeEach(() => {
+ jest.restoreAllMocks();
+ });
+
+ const setupWrapper = (props: Partial<Props> = {}) => (
+ <Messages
+ clusterName="Test cluster"
+ topicName="Cluster topic"
+ isFetched
+ fetchTopicMessages={jest.fn()}
+ messages={[]}
+ partitions={[]}
+ {...props}
+ />
+ );
+
+ describe('Initial state', () => {
+ it('renders PageLoader', () => {
+ expect(
+ shallow(setupWrapper({ isFetched: false })).exists(PageLoader)
+ ).toBeTruthy();
+ });
+ });
+
+ describe('Messages table', () => {
+ describe('With messages', () => {
+ const messagesWrapper = mount(
+ setupWrapper({
+ messages: [
+ {
+ partition: 1,
+ offset: 2,
+ timestamp: new Date('05-05-1994'),
+ content: [1, 2, 3],
+ },
+ ],
+ })
+ );
+ it('renders table', () => {
+ expect(
+ messagesWrapper.exists('[className="table is-striped is-fullwidth"]')
+ ).toBeTruthy();
+ });
+ it('renders JSONTree', () => {
+ expect(messagesWrapper.find(JSONTree).length).toEqual(1);
+ });
+ it('parses message content correctly', () => {
+ const messages = [
+ {
+ partition: 1,
+ offset: 2,
+ timestamp: new Date('05-05-1994'),
+ content: [1, 2, 3],
+ },
+ ];
+ const content = JSON.stringify(messages[0].content);
+ expect(JSON.parse(content)).toEqual(messages[0].content);
+ });
+ });
+ describe('Without messages', () => {
+ it('renders string', () => {
+ const wrapper = mount(setupWrapper());
+ expect(wrapper.text()).toContain('No messages at selected topic');
+ });
+ });
+ });
+
+ describe('Offset field', () => {
+ describe('Seek Type dependency', () => {
+ const wrapper = mount(setupWrapper());
+
+ it('renders DatePicker', () => {
+ wrapper
+ .find('[id="selectSeekType"]')
+ .simulate('change', { target: { value: 'TIMESTAMP' } });
+
+ expect(
+ wrapper.find('[id="selectSeekType"]').first().props().value
+ ).toEqual('TIMESTAMP');
+
+ expect(wrapper.exists(DatePicker)).toBeTruthy();
+ });
+ });
+
+ describe('With defined offset value', () => {
+ const wrapper = shallow(setupWrapper());
+
+ it('shows offset value in input', () => {
+ const offset = '10';
+
+ wrapper
+ .find('#searchOffset')
+ .simulate('change', { target: { value: offset } });
+
+ expect(wrapper.find('#searchOffset').first().props().value).toEqual(
+ offset
+ );
+ });
+ });
+ describe('With invalid offset value', () => {
+ const wrapper = shallow(setupWrapper());
+
+ it('shows 0 in input', () => {
+ wrapper
+ .find('#searchOffset')
+ .simulate('change', { target: { value: null } });
+
+ expect(wrapper.find('#searchOffset').first().props().value).toBe('0');
+ });
+ });
+ });
+
+ describe('Search field', () => {
+ it('renders input correctly', () => {
+ const query = 20;
+ const mockedUseDebouncedCallback = jest.fn();
+ jest
+ .spyOn(useDebounce, 'useDebouncedCallback')
+ .mockImplementationOnce(() => [
+ mockedUseDebouncedCallback,
+ jest.fn(),
+ jest.fn(),
+ ]);
+
+ const wrapper = shallow(setupWrapper());
+
+ wrapper
+ .find('#searchText')
+ .simulate('change', { target: { value: query } });
+
+ expect(wrapper.find('#searchText').first().props().value).toEqual(query);
+ expect(mockedUseDebouncedCallback).toHaveBeenCalledWith({ q: query });
+ });
+ });
+
+ describe('Submit button', () => {
+ it('fetches topic messages', () => {
+ const mockedfetchTopicMessages = jest.fn();
+ const wrapper = mount(
+ setupWrapper({ fetchTopicMessages: mockedfetchTopicMessages })
+ );
+
+ wrapper.find('[type="submit"]').simulate('click');
+ expect(mockedfetchTopicMessages).toHaveBeenCalled();
+ });
+ });
+});
| val | train | 2021-01-29T13:24:59 | "2021-01-13T09:09:43Z" | whotake | train |
provectus/kafka-ui/141_174 | provectus/kafka-ui | provectus/kafka-ui/141 | provectus/kafka-ui/174 | [
"timestamp(timedelta=0.0, similarity=0.8420617960466731)",
"connected"
] | cc097e9327c8253699c31dd47cdf2ae5ff3fcada | 10a27ba60eb4c2c9569eaec253bb219869bd0ba5 | [] | [
"1. Use {}\r\n2. This condition looks wrong. It was\r\n```\r\n{message.content && getMessageContentBody(message.content as Record<string, unknown>)}\r\n```\r\nyou did it \r\n```\r\n{content ? <> : content}\r\n```",
"I would suggest moving it out of the component. It could be a separate `util` file in case it could be used in other places in advance or this file outside of the component. After that, you could use `useMemo` to calculate it once.",
"In case you do decomposition I would suggest describing a new component for content.",
"What about use [uuid](https://github.com/uuidjs/uuid#readme) lib instead of `Math.random`?",
"Do we plan to start using something for styles (`scss`, `Styled Components`, etc) instead of inline style?",
"I would suggest do not do spreading`TopicMessage` outside and just provide it to `MessageItem` as a single prop like `topic` or `topicMessage`.",
"Can we have a `uuid` here too?",
"@aMoRRoMa @whotake I think it is a wrong choise. uuid assigns new key for tag every time/every render. it is useless.",
"I agree that we should get rid of Math.random. But disagree of using uuid here",
"The key must be unique and **stable**!",
"From my point of view, just a `timestamp` is enough",
"We will update it in the separate ticket",
"Ok, make sense",
"Or get rid of this function and use \r\n```\r\n<td style={{ width: 200 }}>\r\n {date ? format(date, 'yyyy-MM-dd HH:mm:ss') : null}\r\n</td>\r\n```",
"> In case you do decomposition I would suggest describing a new component for content.\r\n\r\n@aMoRRoMa do you mean move the body of `getMessageContentBody` function to the new component, e.g, MessageContent?\r\n",
"yes"
] | "2021-02-02T09:22:26Z" | [
"good first issue",
"scope/frontend"
] | Topic messages: Decompose component | Messages component is too big, overcomplicated and is hard to read, so it should be decomposed and refactored.
`kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx` | [
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/redux/reducers/topics/reducer.ts"
] | [
"kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx",
"kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx",
"kafka-ui-react-app/src/components/Topics/Details/Messages/MessagesTable.tsx",
"kafka-ui-react-app/src/redux/reducers/topics/reducer.ts"
] | [] | diff --git a/kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx b/kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx
new file mode 100644
index 00000000000..e168ef042a4
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx
@@ -0,0 +1,52 @@
+import React from 'react';
+import { format } from 'date-fns';
+import JSONTree from 'react-json-tree';
+import { TopicMessage } from 'generated-sources';
+
+interface MessageItemProp {
+ partition: TopicMessage['partition'];
+ offset: TopicMessage['offset'];
+ timestamp: TopicMessage['timestamp'];
+ content: TopicMessage['content'];
+}
+
+const MessageItem: React.FC<MessageItemProp> = ({
+ partition,
+ offset,
+ timestamp,
+ content,
+}) => (
+ <tr key="{timestamp}">
+ <td style={{ width: 200 }}>
+ {timestamp ? format(timestamp, 'yyyy-MM-dd HH:mm:ss') : null}
+ </td>
+ <td style={{ width: 150 }}>{offset}</td>
+ <td style={{ width: 100 }}>{partition}</td>
+ <td key="{content}" style={{ wordBreak: 'break-word' }}>
+ {content && (
+ <JSONTree
+ data={content}
+ hideRoot
+ invertTheme={false}
+ theme={{
+ tree: ({ style }) => ({
+ style: {
+ ...style,
+ backgroundColor: undefined,
+ marginLeft: 0,
+ marginTop: 0,
+ },
+ }),
+ value: ({ style }) => ({
+ style: { ...style, marginLeft: 0 },
+ }),
+ base0D: '#3273dc',
+ base0B: '#363636',
+ }}
+ />
+ )}
+ </td>
+ </tr>
+);
+
+export default MessageItem;
diff --git a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
index 5a6f639f691..59e8b721120 100644
--- a/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Details/Messages/Messages.tsx
@@ -6,19 +6,15 @@ import {
} from 'redux/interfaces';
import { TopicMessage, Partition, SeekType } from 'generated-sources';
import PageLoader from 'components/common/PageLoader/PageLoader';
-import { format } from 'date-fns';
import DatePicker from 'react-datepicker';
-import JSONTree from 'react-json-tree';
import 'react-datepicker/dist/react-datepicker.css';
-import CustomParamButton, {
- CustomParamButtonType,
-} from 'components/Topics/shared/Form/CustomParams/CustomParamButton';
import MultiSelect from 'react-multi-select-component';
import * as _ from 'lodash';
import { useDebouncedCallback } from 'use-debounce';
import { Option } from 'react-multi-select-component/dist/lib/interfaces';
+import MessagesTable from './MessagesTable';
export interface Props {
clusterName: ClusterName;
@@ -174,42 +170,6 @@ const Messages: React.FC<Props> = ({
fetchTopicMessages(clusterName, topicName, queryParams);
}, [clusterName, topicName, queryParams]);
- const getFormattedDate = (date: Date) => {
- if (!date) return null;
- return format(date, 'yyyy-MM-dd HH:mm:ss');
- };
-
- const getMessageContentBody = (content: Record<string, unknown>) => {
- try {
- const contentObj =
- typeof content !== 'object' ? JSON.parse(content) : content;
- return (
- <JSONTree
- data={contentObj}
- hideRoot
- invertTheme={false}
- theme={{
- tree: ({ style }) => ({
- style: {
- ...style,
- backgroundColor: undefined,
- marginLeft: 0,
- marginTop: 0,
- },
- }),
- value: ({ style }) => ({
- style: { ...style, marginLeft: 0 },
- }),
- base0D: '#3273dc',
- base0B: '#363636',
- }}
- />
- );
- } catch (e) {
- return content;
- }
- };
-
const onNext = (event: React.MouseEvent<HTMLButtonElement>) => {
event.preventDefault();
@@ -236,52 +196,6 @@ const Messages: React.FC<Props> = ({
);
};
- const getTopicMessagesTable = () => {
- return messages.length > 0 ? (
- <div>
- <table className="table is-striped is-fullwidth">
- <thead>
- <tr>
- <th>Timestamp</th>
- <th>Offset</th>
- <th>Partition</th>
- <th>Content</th>
- </tr>
- </thead>
- <tbody>
- {messages.map((message) => (
- <tr key={`${message.timestamp}${Math.random()}`}>
- <td style={{ width: 200 }}>
- {getFormattedDate(message.timestamp)}
- </td>
- <td style={{ width: 150 }}>{message.offset}</td>
- <td style={{ width: 100 }}>{message.partition}</td>
- <td key={Math.random()} style={{ wordBreak: 'break-word' }}>
- {message.content &&
- getMessageContentBody(
- message.content as Record<string, unknown>
- )}
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- <div className="columns">
- <div className="column is-full">
- <CustomParamButton
- className="is-link is-pulled-right"
- type={CustomParamButtonType.chevronRight}
- onClick={onNext}
- btnText="Next"
- />
- </div>
- </div>
- </div>
- ) : (
- <div>No messages at selected topic</div>
- );
- };
-
if (!isFetched) {
return <PageLoader isFullHeight={false} />;
}
@@ -366,7 +280,7 @@ const Messages: React.FC<Props> = ({
/>
</div>
</div>
- {getTopicMessagesTable()}
+ <MessagesTable messages={messages} onNext={onNext} />
</div>
);
};
diff --git a/kafka-ui-react-app/src/components/Topics/Details/Messages/MessagesTable.tsx b/kafka-ui-react-app/src/components/Topics/Details/Messages/MessagesTable.tsx
new file mode 100644
index 00000000000..5073673f86d
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Topics/Details/Messages/MessagesTable.tsx
@@ -0,0 +1,57 @@
+import React from 'react';
+import { TopicMessage } from 'generated-sources';
+import CustomParamButton, {
+ CustomParamButtonType,
+} from '../../shared/Form/CustomParams/CustomParamButton';
+import MessageItem from './MessageItem';
+
+interface MessagesTableProp {
+ messages: TopicMessage[];
+ onNext(event: React.MouseEvent<HTMLButtonElement>): void;
+}
+
+const MessagesTable: React.FC<MessagesTableProp> = ({ messages, onNext }) => {
+ if (!messages.length) {
+ return <div>No messages at selected topic</div>;
+ }
+
+ return (
+ <div>
+ <table className="table is-striped is-fullwidth">
+ <thead>
+ <tr>
+ <th>Timestamp</th>
+ <th>Offset</th>
+ <th>Partition</th>
+ <th>Content</th>
+ </tr>
+ </thead>
+ <tbody>
+ {messages.map(
+ ({ partition, offset, timestamp, content }: TopicMessage) => (
+ <MessageItem
+ key={timestamp.toString()}
+ partition={partition}
+ offset={offset}
+ timestamp={timestamp}
+ content={content as Record<string, unknown>}
+ />
+ )
+ )}
+ </tbody>
+ </table>
+ <div className="columns">
+ <div className="column is-full">
+ <CustomParamButton
+ className="is-link is-pulled-right"
+ type={CustomParamButtonType.chevronRight}
+ onClick={onNext}
+ btnText="Next"
+ />
+ </div>
+ </div>
+ </div>
+ );
+};
+
+export default MessagesTable;
diff --git a/kafka-ui-react-app/src/redux/reducers/topics/reducer.ts b/kafka-ui-react-app/src/redux/reducers/topics/reducer.ts
index f4d2e1b8568..6a114851724 100644
--- a/kafka-ui-react-app/src/redux/reducers/topics/reducer.ts
+++ b/kafka-ui-react-app/src/redux/reducers/topics/reducer.ts
@@ -1,5 +1,5 @@
import { v4 } from 'uuid';
-import { Topic } from 'generated-sources';
+import { Topic, TopicMessage } from 'generated-sources';
import { Action, TopicsState } from 'redux/interfaces';
import ActionType from 'redux/actionType';
@@ -41,6 +41,31 @@ const addToTopicList = (state: TopicsState, payload: Topic): TopicsState => {
return newState;
};
+const transformTopicMessages = (
+ state: TopicsState,
+ messages: TopicMessage[]
+): TopicsState => ({
+ ...state,
+ messages: messages.map((mes) => {
+ const { content } = mes;
+ let parsedContent = content;
+
+ if (content) {
+ try {
+ parsedContent =
+ typeof content !== 'object' ? JSON.parse(content) : content;
+ } catch (_) {
+ // do nothing
+ }
+ }
+
+ return {
+ ...mes,
+ content: parsedContent,
+ };
+ }),
+});
+
const reducer = (state = initialState, action: Action): TopicsState => {
switch (action.type) {
case ActionType.GET_TOPICS__SUCCESS:
@@ -57,10 +82,7 @@ const reducer = (state = initialState, action: Action): TopicsState => {
},
};
case ActionType.GET_TOPIC_MESSAGES__SUCCESS:
- return {
- ...state,
- messages: action.payload,
- };
+ return transformTopicMessages(state, action.payload);
case ActionType.GET_TOPIC_CONFIG__SUCCESS:
return {
...state,
| null | train | train | 2021-02-04T09:04:21 | "2020-12-15T12:32:16Z" | soffest | train |
provectus/kafka-ui/166_178 | provectus/kafka-ui | provectus/kafka-ui/166 | provectus/kafka-ui/178 | [
"connected"
] | c49006d2c1cf25bc4680abf9b824156ffb139ab8 | ba4e1748ee092d31a4596131dcd2f16bffbb8e93 | [
"Thank your for your issue, We'll try to fix it soon."
] | [] | "2021-02-10T08:05:10Z" | [
"type/bug",
"scope/backend"
] | Protobuf not working | Hi,
Really interesting project :wink:
#116 seems to add protobuf supports but when I try to read message serialized with protobuf I get this error message:
```
ERROR io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient - Invalid schema type PROTOBUF
```
Full stacktrace:
```
11:38:45.932 [boundedElastic-2] INFO org.apache.kafka.clients.consumer.ConsumerConfig - ConsumerConfig values:
allow.auto.create.topics = true
auto.commit.interval.ms = 5000
auto.offset.reset = earliest
bootstrap.servers = [kafka:9092]
check.crcs = true
client.dns.lookup = default
client.id = kafka-ui
client.rack =
connections.max.idle.ms = 540000
default.api.timeout.ms = 60000
enable.auto.commit = true
exclude.internal.topics = true
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
group.id = null
group.instance.id = null
heartbeat.interval.ms = 3000
interceptor.classes = []
internal.leave.group.on.close = true
isolation.level = read_uncommitted
key.deserializer = class org.apache.kafka.common.serialization.BytesDeserializer
max.partition.fetch.bytes = 1048576
max.poll.interval.ms = 300000
max.poll.records = 500
metadata.max.age.ms = 300000
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor]
receive.buffer.bytes = 65536
reconnect.backoff.max.ms = 1000
reconnect.backoff.ms = 50
request.timeout.ms = 30000
retry.backoff.ms = 100
sasl.client.callback.handler.class = null
sasl.jaas.config = null
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.login.callback.handler.class = null
sasl.login.class = null
sasl.login.refresh.buffer.seconds = 300
sasl.login.refresh.min.period.seconds = 60
sasl.login.refresh.window.factor = 0.8
sasl.login.refresh.window.jitter = 0.05
sasl.mechanism = GSSAPI
security.protocol = PLAINTEXT
security.providers = null
send.buffer.bytes = 131072
session.timeout.ms = 10000
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = https
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
value.deserializer = class org.apache.kafka.common.serialization.BytesDeserializer
11:38:45.937 [boundedElastic-2] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version: 2.4.0
11:38:45.937 [boundedElastic-2] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId: 77a89fcf8d7fa018
11:38:45.937 [boundedElastic-2] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka startTimeMs: 1611920325937
11:38:45.938 [boundedElastic-2] INFO org.apache.kafka.clients.consumer.KafkaConsumer - [Consumer clientId=kafka-ui, groupId=null] Subscribed to partition(s): local-states-0
11:38:45.940 [boundedElastic-2] INFO org.apache.kafka.clients.consumer.internals.SubscriptionState - [Consumer clientId=kafka-ui, groupId=null] Seeking to EARLIEST offset of partition local-states-0
11:38:45.940 [boundedElastic-2] INFO com.provectus.kafka.ui.cluster.service.ConsumingService - assignment: [local-states-0]
11:38:45.946 [boundedElastic-2] INFO org.apache.kafka.clients.Metadata - [Consumer clientId=kafka-ui, groupId=null] Cluster ID: nrHf2NLFSV6lTctErdFmCQ
11:38:45.950 [boundedElastic-2] INFO org.apache.kafka.clients.consumer.internals.SubscriptionState - [Consumer clientId=kafka-ui, groupId=null] Resetting offset for partition local-states-0 to offset 3074.
11:38:45.975 [boundedElastic-2] INFO com.provectus.kafka.ui.cluster.service.ConsumingService - 500 records polled
11:38:46.037 [boundedElastic-2] ERROR io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient - Invalid schema type PROTOBUF
11:38:46.037 [boundedElastic-2] INFO com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer - Failed to get Protobuf schema for topic local-states
org.apache.kafka.common.errors.SerializationException: Error deserializing Protobuf message for id 6
Caused by: java.io.IOException: Invalid schema syntax = "proto3";
package io.spoud.sdm.hooks.domain.v1;
import "google/protobuf/timestamp.proto";
import "logistics/domain/v1/domain.proto";
import "global/domain/v1/domain.proto";
option java_package = "io.spoud.sdm.hooks.domain.v1";
option java_multiple_files = true;
message LogRecord {
string entity_uuid = 1;
.google.protobuf.Timestamp timestamp = 2;
.io.spoud.sdm.hooks.domain.v1.StateChangeAction.Type action = 3;
.io.spoud.sdm.global.domain.v1.ResourceEntity.Type entity_type = 4;
string path = 5;
string cursor = 6;
oneof entity {
.io.spoud.sdm.logistics.domain.v1.DataOffer data_offer = 10;
.io.spoud.sdm.logistics.domain.v1.DataPort data_port = 12;
.io.spoud.sdm.logistics.domain.v1.DataSubscriptionState data_subscription_state = 14;
.io.spoud.sdm.logistics.domain.v1.ResourceGroup resource_group = 15;
.io.spoud.sdm.logistics.domain.v1.Transport transport = 16;
.io.spoud.sdm.logistics.domain.v1.DataItem data_item = 17;
}
}
message StreamInfo {
.google.protobuf.Timestamp timestamp = 2;
}
message StateChangeAction {
enum Type {
UNKNOWN = 0;
UPDATED = 1;
DELETED = 2;
}
}
with refs [{name='google/protobuf/timestamp.proto', subject='google/protobuf/timestamp.proto', version=1}, {name='logistics/domain/v1/domain.proto', subject='logistics/domain/v1/domain.proto', version=1}, {name='global/domain/v1/domain.proto', subject='global/domain/v1/domain.proto', version=1}] of type PROTOBUF
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.lambda$getSchemaByIdFromRegistry$4(CachedSchemaRegistryClient.java:222) ~[kafka-schema-registry-client-5.5.1.jar!/:?]
at java.util.Optional.orElseThrow(Optional.java:401) ~[?:?]
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaByIdFromRegistry(CachedSchemaRegistryClient.java:220) ~[kafka-schema-registry-client-5.5.1.jar!/:?]
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaBySubjectAndId(CachedSchemaRegistryClient.java:291) ~[kafka-schema-registry-client-5.5.1.jar!/:?]
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaById(CachedSchemaRegistryClient.java:276) ~[kafka-schema-registry-client-5.5.1.jar!/:?]
at io.confluent.kafka.serializers.protobuf.AbstractKafkaProtobufDeserializer.deserialize(AbstractKafkaProtobufDeserializer.java:105) ~[kafka-protobuf-serializer-5.5.1.jar!/:?]
at io.confluent.kafka.serializers.protobuf.AbstractKafkaProtobufDeserializer.deserialize(AbstractKafkaProtobufDeserializer.java:86) ~[kafka-protobuf-serializer-5.5.1.jar!/:?]
at io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer.deserialize(KafkaProtobufDeserializer.java:75) ~[kafka-protobuf-serializer-5.5.1.jar!/:?]
at com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer.detectFormat(SchemaRegistryRecordDeserializer.java:104) ~[classes!/:?]
at com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer.lambda$getMessageFormat$1(SchemaRegistryRecordDeserializer.java:90) ~[classes!/:?]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[?:?]
at com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer.getMessageFormat(SchemaRegistryRecordDeserializer.java:90) ~[classes!/:?]
at com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer.deserialize(SchemaRegistryRecordDeserializer.java:63) ~[classes!/:?]
at com.provectus.kafka.ui.cluster.util.ClusterUtil.mapToTopicMessage(ClusterUtil.java:171) ~[classes!/:?]
at com.provectus.kafka.ui.cluster.service.ConsumingService.lambda$loadMessages$1(ConsumingService.java:53) ~[classes!/:?]
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:199) ~[reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onNext(FluxSubscribeOn.java:151) ~[reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.publisher.FluxCreate$BufferAsyncSink.drain(FluxCreate.java:793) ~[reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.publisher.FluxCreate$BufferAsyncSink.next(FluxCreate.java:718) ~[reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.publisher.FluxCreate$SerializedSink.next(FluxCreate.java:153) ~[reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
at com.provectus.kafka.ui.cluster.service.ConsumingService$RecordEmitter.emit(ConsumingService.java:113) ~[classes!/:?]
at reactor.core.publisher.FluxCreate.subscribe(FluxCreate.java:94) [reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) [reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) [reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) [reactor-core-3.3.2.RELEASE.jar!/:3.3.2.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:830) [?:?]
11:38:46.044 [boundedElastic-2] INFO com.provectus.kafka.ui.cluster.deserialization.SchemaRegistryRecordDeserializer - Failed to parse json from topic local-states
11:38:46.056 [boundedElastic-2] DEBUG org.springframework.http.codec.json.Jackson2JsonEncoder - [c3c611fb] Encoding [[class TopicMessage {
partition: 0
offset: 3074
timestamp: 2021-01-25T07:42:24.057Z
(truncated)...]
``` | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java"
] | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java"
] | [] | diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
index a64aded30a7..00544a109dc 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
@@ -4,12 +4,14 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.protobuf.Message;
import com.provectus.kafka.ui.cluster.model.KafkaCluster;
+import io.confluent.kafka.schemaregistry.SchemaProvider;
import io.confluent.kafka.schemaregistry.avro.AvroSchemaProvider;
import io.confluent.kafka.schemaregistry.avro.AvroSchemaUtils;
import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient;
import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
import io.confluent.kafka.schemaregistry.client.rest.entities.Schema;
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
+import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider;
import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaUtils;
import io.confluent.kafka.serializers.KafkaAvroDeserializer;
import io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer;
@@ -41,14 +43,17 @@ public SchemaRegistryRecordDeserializer(KafkaCluster cluster, ObjectMapper objec
this.cluster = cluster;
this.objectMapper = objectMapper;
- this.schemaRegistryClient = Optional.ofNullable(cluster.getSchemaRegistry()).map(e ->
- new CachedSchemaRegistryClient(
- Collections.singletonList(e),
- CLIENT_IDENTITY_MAP_CAPACITY,
- Collections.singletonList(new AvroSchemaProvider()),
- Collections.emptyMap()
- )
- ).orElse(null);
+ this.schemaRegistryClient = Optional.ofNullable(cluster.getSchemaRegistry())
+ .map(schemaRegistryUrl -> {
+ List<SchemaProvider> schemaProviders = List.of(new AvroSchemaProvider(), new ProtobufSchemaProvider());
+ return new CachedSchemaRegistryClient(
+ Collections.singletonList(schemaRegistryUrl),
+ CLIENT_IDENTITY_MAP_CAPACITY,
+ schemaProviders,
+ Collections.emptyMap()
+ );
+ }
+ ).orElse(null);
this.avroDeserializer = Optional.ofNullable(this.schemaRegistryClient)
.map(KafkaAvroDeserializer::new)
| null | train | train | 2021-02-09T09:30:30 | "2021-01-29T11:45:08Z" | gaetancollaud | train |
provectus/kafka-ui/180_185 | provectus/kafka-ui | provectus/kafka-ui/180 | provectus/kafka-ui/185 | [
"timestamp(timedelta=0.0, similarity=0.8949657276459652)",
"connected"
] | 40d85643bb1a5ec69cd364ac30aee58cef04c289 | b9e92114e603c77874a41037c94b2f4e86d6fad5 | [
"@imoisey thank you for your issue. This bug will be fixed soon by https://github.com/provectus/kafka-ui/pull/185",
"Thanks"
] | [
"Let's pass a zookeeper connection timeout from the Java class/app properties\r\n"
] | "2021-02-10T19:25:58Z" | [
"type/bug",
"scope/backend"
] | Too many connections to Zookeeper | I have a problem with many connections to Zookeeper from kafka-ui.
Zookeeper logs:

docker-compose.yml
Kafka UI:

Zookeeper:

What am I doing wrong?
| [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java",
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java"
] | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java",
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java"
] | [] | diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java
index 609edb27634..b67ce348d36 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/service/SchemaRegistryService.java
@@ -9,6 +9,7 @@
import com.provectus.kafka.ui.model.CompatibilityLevel;
import com.provectus.kafka.ui.model.NewSchemaSubject;
import com.provectus.kafka.ui.model.SchemaSubject;
+import java.util.Formatter;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.http.HttpStatus;
@@ -51,9 +52,12 @@ public Flux<Integer> getSchemaSubjectVersions(String clusterName, String schemaN
.map(cluster -> webClient.get()
.uri(cluster.getSchemaRegistry() + URL_SUBJECT_VERSIONS, schemaName)
.retrieve()
- .onStatus(HttpStatus.NOT_FOUND::equals, resp -> Mono.error(new NotFoundException("No such schema %s".formatted(schemaName))))
- .bodyToFlux(Integer.class))
- .orElse(Flux.error(new NotFoundException("No such cluster")));
+ .onStatus(HttpStatus.NOT_FOUND::equals,
+ resp -> Mono.error(
+ new NotFoundException(formatted("No such schema %s"))
+ )
+ ).bodyToFlux(Integer.class)
+ ).orElse(Flux.error(new NotFoundException("No such cluster")));
}
public Mono<SchemaSubject> getSchemaSubjectByVersion(String clusterName, String schemaName, Integer version) {
@@ -70,8 +74,12 @@ private Mono<SchemaSubject> getSchemaSubject(String clusterName, String schemaNa
.uri(cluster.getSchemaRegistry() + URL_SUBJECT_BY_VERSION, schemaName, version)
.retrieve()
.onStatus(HttpStatus.NOT_FOUND::equals,
- resp -> Mono.error(new NotFoundException("No such schema %s with version %s".formatted(schemaName, version))))
- .bodyToMono(SchemaSubject.class)
+ resp -> Mono.error(
+ new NotFoundException(
+ formatted("No such schema %s with version %s", schemaName, version)
+ )
+ )
+ ).bodyToMono(SchemaSubject.class)
.zipWith(getSchemaCompatibilityInfoOrGlobal(clusterName, schemaName))
.map(tuple -> {
SchemaSubject schema = tuple.getT1();
@@ -97,9 +105,13 @@ private Mono<ResponseEntity<Void>> deleteSchemaSubject(String clusterName, Strin
.uri(cluster.getSchemaRegistry() + URL_SUBJECT_BY_VERSION, schemaName, version)
.retrieve()
.onStatus(HttpStatus.NOT_FOUND::equals,
- resp -> Mono.error(new NotFoundException("No such schema %s with version %s".formatted(schemaName, version))))
- .toBodilessEntity())
- .orElse(Mono.error(new NotFoundException("No such cluster")));
+ resp -> Mono.error(
+ new NotFoundException(
+ formatted("No such schema %s with version %s", schemaName, version)
+ )
+ )
+ ).toBodilessEntity()
+ ).orElse(Mono.error(new NotFoundException("No such cluster")));
}
public Mono<ResponseEntity<Void>> deleteSchemaSubject(String clusterName, String schemaName) {
@@ -107,7 +119,13 @@ public Mono<ResponseEntity<Void>> deleteSchemaSubject(String clusterName, String
.map(cluster -> webClient.delete()
.uri(cluster.getSchemaRegistry() + URL_SUBJECT, schemaName)
.retrieve()
- .onStatus(HttpStatus.NOT_FOUND::equals, resp -> Mono.error(new NotFoundException("No such schema %s".formatted(schemaName))))
+ .onStatus(HttpStatus.NOT_FOUND::equals,
+ resp -> Mono.error(
+ new NotFoundException(
+ formatted("No such schema %s", schemaName)
+ )
+ )
+ )
.toBodilessEntity())
.orElse(Mono.error(new NotFoundException("No such cluster")));
}
@@ -120,7 +138,9 @@ public Mono<ResponseEntity<SchemaSubject>> createNewSubject(String clusterName,
.body(BodyInserters.fromPublisher(newSchemaSubject, NewSchemaSubject.class))
.retrieve()
.onStatus(HttpStatus.NOT_FOUND::equals,
- resp -> Mono.error(new NotFoundException("No such schema %s".formatted(schemaName))))
+ resp -> Mono.error(
+ new NotFoundException(formatted("No such schema %s", schemaName)))
+ )
.toEntity(SchemaSubject.class)
.log())
.orElse(Mono.error(new NotFoundException("No such cluster")));
@@ -142,7 +162,7 @@ public Mono<Void> updateSchemaCompatibility(String clusterName, String schemaNam
.body(BodyInserters.fromPublisher(compatibilityLevel, CompatibilityLevel.class))
.retrieve()
.onStatus(HttpStatus.NOT_FOUND::equals,
- resp -> Mono.error(new NotFoundException("No such schema %s".formatted(schemaName))))
+ resp -> Mono.error(new NotFoundException(formatted("No such schema %s", schemaName))))
.bodyToMono(Void.class);
}).orElse(Mono.error(new NotFoundException("No such cluster")));
}
@@ -181,10 +201,14 @@ public Mono<CompatibilityCheckResponse> checksSchemaCompatibility(String cluster
.body(BodyInserters.fromPublisher(newSchemaSubject, NewSchemaSubject.class))
.retrieve()
.onStatus(HttpStatus.NOT_FOUND::equals,
- resp -> Mono.error(new NotFoundException("No such schema %s".formatted(schemaName))))
+ resp -> Mono.error(new NotFoundException(formatted("No such schema %s", schemaName))))
.bodyToMono(InternalCompatibilityCheck.class)
.map(mapper::toCompatibilityCheckResponse)
.log()
).orElse(Mono.error(new NotFoundException("No such cluster")));
}
+
+ public String formatted(String str, Object... args) {
+ return new Formatter().format(str, args).toString();
+ }
}
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java
index 26b6f300b2a..855ea62c46f 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/zookeeper/ZookeeperService.java
@@ -1,6 +1,7 @@
package com.provectus.kafka.ui.zookeeper;
import com.provectus.kafka.ui.cluster.model.KafkaCluster;
+import java.util.concurrent.ConcurrentHashMap;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.I0Itec.zkclient.ZkClient;
@@ -14,7 +15,7 @@
@Log4j2
public class ZookeeperService {
- private final Map<String, ZkClient> cachedZkClient = new HashMap<>();
+ private final Map<String, ZkClient> cachedZkClient = new ConcurrentHashMap<>();
public boolean isZookeeperOnline(KafkaCluster kafkaCluster) {
var isConnected = false;
@@ -33,7 +34,10 @@ private boolean isZkClientConnected(ZkClient zkClient) {
private ZkClient getOrCreateZkClient (KafkaCluster cluster) {
try {
- return cachedZkClient.getOrDefault(cluster.getName(), new ZkClient(cluster.getZookeeper(), 1000));
+ return cachedZkClient.computeIfAbsent(
+ cluster.getName(),
+ (n) -> new ZkClient(cluster.getZookeeper(), 1000)
+ );
} catch (Exception e) {
log.error("Error while creating zookeeper client for cluster {}", cluster.getName());
return null;
| null | test | train | 2021-02-10T10:12:59 | "2021-02-10T09:29:40Z" | imoisey | train |
provectus/kafka-ui/191_201 | provectus/kafka-ui | provectus/kafka-ui/191 | provectus/kafka-ui/201 | [
"connected"
] | 78a971193b8804fda050c932a8e289b3ba2a9138 | b4a243f47000463f664b5ee1f7c0291f5241541a | [] | [] | "2021-02-17T15:01:59Z" | [
"type/bug",
"scope/frontend"
] | UI : wrong links | On the dashboard view
When clicking on a cluster property (like brokers, topics...), this will always redirect to "brokers" page of this cluster
It could be better to redirect to the proper page when available.
Version used: 0.0.9

| [
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx",
"kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx",
"kafka-ui-react-app/src/lib/utils/formatBytes.ts",
"kafka-ui-react-app/src/theme/bulma_overrides.scss",
"kafka-ui-react-app/src/theme/index.scss"
] | [
"kafka-ui-react-app/package-lock.json",
"kafka-ui-react-app/package.json",
"kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx",
"kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/ClusterWidget.spec.tsx",
"kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/__snapshots__/ClusterWidget.spec.tsx.snap",
"kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/fixtures.ts",
"kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx",
"kafka-ui-react-app/src/theme/bulma_overrides.scss",
"kafka-ui-react-app/src/theme/index.scss"
] | [] | diff --git a/kafka-ui-react-app/package-lock.json b/kafka-ui-react-app/package-lock.json
index 06510c1fe53..8f40ba383be 100644
--- a/kafka-ui-react-app/package-lock.json
+++ b/kafka-ui-react-app/package-lock.json
@@ -4962,9 +4962,9 @@
"dev": true
},
"bulma": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.8.2.tgz",
- "integrity": "sha512-vMM/ijYSxX+Sm+nD7Lmc1UgWDy2JcL2nTKqwgEqXuOMU+IGALbXd5MLt/BcjBAPLIx36TtzhzBcSnOP974gcqA=="
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.2.tgz",
+ "integrity": "sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A=="
},
"bulma-switch": {
"version": "2.0.0",
diff --git a/kafka-ui-react-app/package.json b/kafka-ui-react-app/package.json
index 24c355c4bab..c70429557f6 100644
--- a/kafka-ui-react-app/package.json
+++ b/kafka-ui-react-app/package.json
@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
- "bulma": "^0.8.2",
+ "bulma": "^0.9.2",
"bulma-switch": "^2.0.0",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
@@ -112,6 +112,8 @@
},
"proxy": "http://localhost:8080",
"jest": {
- "snapshotSerializers": ["enzyme-to-json/serializer"]
+ "snapshotSerializers": [
+ "enzyme-to-json/serializer"
+ ]
}
}
diff --git a/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx
index 0800cf3fb29..0ce67d986cf 100644
--- a/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx
+++ b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/ClusterWidget.tsx
@@ -1,8 +1,8 @@
import React from 'react';
-import formatBytes from 'lib/utils/formatBytes';
import { NavLink } from 'react-router-dom';
-import { clusterBrokersPath } from 'lib/paths';
+import { clusterBrokersPath, clusterTopicsPath } from 'lib/paths';
import { Cluster, ServerStatus } from 'generated-sources';
+import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
interface ClusterWidgetProps {
cluster: Cluster;
@@ -19,9 +19,9 @@ const ClusterWidget: React.FC<ClusterWidgetProps> = ({
onlinePartitionCount,
},
}) => (
- <NavLink to={clusterBrokersPath(name)} className="column is-full-modile is-6">
- <div className="box is-hoverable">
- <div className="title is-6 has-text-overflow-ellipsis" title={name}>
+ <div className="column is-full-modile is-6">
+ <div className="box">
+ <div className="title is-6 has-text-overflow-ellipsis">
<div
className={`tag has-margin-right ${
status === ServerStatus.Online ? 'is-primary' : 'is-danger'
@@ -36,7 +36,9 @@ const ClusterWidget: React.FC<ClusterWidgetProps> = ({
<tbody>
<tr>
<th>Brokers</th>
- <td>{brokerCount}</td>
+ <td>
+ <NavLink to={clusterBrokersPath(name)}>{brokerCount}</NavLink>
+ </td>
</tr>
<tr>
<th>Partitions</th>
@@ -44,20 +46,26 @@ const ClusterWidget: React.FC<ClusterWidgetProps> = ({
</tr>
<tr>
<th>Topics</th>
- <td>{topicCount}</td>
+ <td>
+ <NavLink to={clusterTopicsPath(name)}>{topicCount}</NavLink>
+ </td>
</tr>
<tr>
<th>Production</th>
- <td>{formatBytes(bytesInPerSec || 0)}</td>
+ <td>
+ <BytesFormatted value={bytesInPerSec} />
+ </td>
</tr>
<tr>
<th>Consumption</th>
- <td>{formatBytes(bytesOutPerSec || 0)}</td>
+ <td>
+ <BytesFormatted value={bytesOutPerSec} />
+ </td>
</tr>
</tbody>
</table>
</div>
- </NavLink>
+ </div>
);
export default ClusterWidget;
diff --git a/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/ClusterWidget.spec.tsx b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/ClusterWidget.spec.tsx
new file mode 100644
index 00000000000..8ab88e5b2b8
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/ClusterWidget.spec.tsx
@@ -0,0 +1,73 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+import { ServerStatus } from 'generated-sources';
+import { clusterBrokersPath, clusterTopicsPath } from 'lib/paths';
+import ClusterWidget from '../ClusterWidget';
+import { offlineCluster, onlineCluster } from './fixtures';
+
+describe('ClusterWidget', () => {
+ describe('when cluster is online', () => {
+ it('renders with correct tag', () => {
+ const tag = shallow(<ClusterWidget cluster={onlineCluster} />).find(
+ '.tag'
+ );
+ expect(tag.hasClass('is-primary')).toBeTruthy();
+ expect(tag.text()).toEqual(ServerStatus.Online);
+ });
+
+ it('renders table', () => {
+ const table = shallow(<ClusterWidget cluster={onlineCluster} />).find(
+ 'table'
+ );
+ expect(table.hasClass('is-fullwidth')).toBeTruthy();
+
+ expect(
+ table.find(`NavLink[to="${clusterBrokersPath(onlineCluster.name)}"]`)
+ .exists
+ ).toBeTruthy();
+ expect(
+ table.find(`NavLink[to="${clusterTopicsPath(onlineCluster.name)}"]`)
+ .exists
+ ).toBeTruthy();
+ });
+
+ it('matches snapshot', () => {
+ expect(
+ shallow(<ClusterWidget cluster={onlineCluster} />)
+ ).toMatchSnapshot();
+ });
+ });
+
+ describe('when cluster is offline', () => {
+ it('renders with correct tag', () => {
+ const tag = shallow(<ClusterWidget cluster={offlineCluster} />).find(
+ '.tag'
+ );
+
+ expect(tag.hasClass('is-danger')).toBeTruthy();
+ expect(tag.text()).toEqual(ServerStatus.Offline);
+ });
+
+ it('renders table', () => {
+ const table = shallow(<ClusterWidget cluster={offlineCluster} />).find(
+ 'table'
+ );
+ expect(table.hasClass('is-fullwidth')).toBeTruthy();
+
+ expect(
+ table.find(`NavLink[to="${clusterBrokersPath(onlineCluster.name)}"]`)
+ .exists
+ ).toBeTruthy();
+ expect(
+ table.find(`NavLink[to="${clusterTopicsPath(onlineCluster.name)}"]`)
+ .exists
+ ).toBeTruthy();
+ });
+
+ it('matches snapshot', () => {
+ expect(
+ shallow(<ClusterWidget cluster={offlineCluster} />)
+ ).toMatchSnapshot();
+ });
+ });
+});
diff --git a/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/__snapshots__/ClusterWidget.spec.tsx.snap b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/__snapshots__/ClusterWidget.spec.tsx.snap
new file mode 100644
index 00000000000..eb805eb1119
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/__snapshots__/ClusterWidget.spec.tsx.snap
@@ -0,0 +1,159 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ClusterWidget when cluster is offline matches snapshot 1`] = `
+<div
+ className="column is-full-modile is-6"
+>
+ <div
+ className="box"
+ >
+ <div
+ className="title is-6 has-text-overflow-ellipsis"
+ >
+ <div
+ className="tag has-margin-right is-danger"
+ >
+ offline
+ </div>
+ local
+ </div>
+ <table
+ className="table is-fullwidth"
+ >
+ <tbody>
+ <tr>
+ <th>
+ Brokers
+ </th>
+ <td>
+ <NavLink
+ to="/ui/clusters/local/brokers"
+ >
+ 1
+ </NavLink>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Partitions
+ </th>
+ <td>
+ 2
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Topics
+ </th>
+ <td>
+ <NavLink
+ to="/ui/clusters/local/topics"
+ >
+ 2
+ </NavLink>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Production
+ </th>
+ <td>
+ <BytesFormatted
+ value={8000.00000673768}
+ />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Consumption
+ </th>
+ <td>
+ <BytesFormatted
+ value={0.815306356729712}
+ />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+`;
+
+exports[`ClusterWidget when cluster is online matches snapshot 1`] = `
+<div
+ className="column is-full-modile is-6"
+>
+ <div
+ className="box"
+ >
+ <div
+ className="title is-6 has-text-overflow-ellipsis"
+ >
+ <div
+ className="tag has-margin-right is-primary"
+ >
+ online
+ </div>
+ secondLocal
+ </div>
+ <table
+ className="table is-fullwidth"
+ >
+ <tbody>
+ <tr>
+ <th>
+ Brokers
+ </th>
+ <td>
+ <NavLink
+ to="/ui/clusters/secondLocal/brokers"
+ >
+ 1
+ </NavLink>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Partitions
+ </th>
+ <td>
+ 6
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Topics
+ </th>
+ <td>
+ <NavLink
+ to="/ui/clusters/secondLocal/topics"
+ >
+ 3
+ </NavLink>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Production
+ </th>
+ <td>
+ <BytesFormatted
+ value={0.00003061819685376472}
+ />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Consumption
+ </th>
+ <td>
+ <BytesFormatted
+ value={5.737800890036267}
+ />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+`;
diff --git a/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/fixtures.ts b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/fixtures.ts
new file mode 100644
index 00000000000..2257b6045e0
--- /dev/null
+++ b/kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/fixtures.ts
@@ -0,0 +1,25 @@
+import { Cluster, ServerStatus } from 'generated-sources';
+
+export const onlineCluster: Cluster = {
+ name: 'secondLocal',
+ defaultCluster: false,
+ status: ServerStatus.Online,
+ brokerCount: 1,
+ onlinePartitionCount: 6,
+ topicCount: 3,
+ bytesInPerSec: 0.000030618196853764715,
+ bytesOutPerSec: 5.737800890036267075817,
+};
+
+export const offlineCluster: Cluster = {
+ name: 'local',
+ defaultCluster: true,
+ status: ServerStatus.Offline,
+ brokerCount: 1,
+ onlinePartitionCount: 2,
+ topicCount: 2,
+ bytesInPerSec: 8000.0000067376808542600021,
+ bytesOutPerSec: 0.8153063567297119490871,
+};
+
+export const clusters: Cluster[] = [onlineCluster, offlineCluster];
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
index a4c24bae672..2334c8067ab 100644
--- a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
@@ -5,18 +5,23 @@ interface Props {
precision?: number;
}
-const BytesFormatted: React.FC<Props> = ({ value, precision }) => {
- const formatBytes = React.useCallback(() => {
- const numVal = typeof value === 'string' ? parseInt(value, 10) : value;
- if (!numVal) return 0;
- const pow = Math.floor(Math.log2(numVal) / 10);
+const BytesFormatted: React.FC<Props> = ({ value, precision = 0 }) => {
+ const formatedValue = React.useMemo(() => {
+ const bytes = typeof value === 'string' ? parseInt(value, 10) : value;
+
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+ if (!bytes || bytes === 0) return [0, sizes[0]];
+
+ if (bytes < 1024) return [Math.ceil(bytes), sizes[0]];
+
+ const pow = Math.floor(Math.log2(bytes) / 10);
const multiplier = 10 ** (precision || 2);
return (
- Math.round((numVal * multiplier) / 1024 ** pow) / multiplier +
- ['Bytes', 'KB', 'MB', 'GB', 'TB'][pow]
+ Math.round((bytes * multiplier) / 1024 ** pow) / multiplier + sizes[pow]
);
}, [value]);
- return <span>{formatBytes()}</span>;
+
+ return <span>{formatedValue}</span>;
};
export default BytesFormatted;
diff --git a/kafka-ui-react-app/src/lib/utils/formatBytes.ts b/kafka-ui-react-app/src/lib/utils/formatBytes.ts
deleted file mode 100644
index e8aab227bb2..00000000000
--- a/kafka-ui-react-app/src/lib/utils/formatBytes.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function formatBytes(bytes: number, decimals = 0) {
- const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
- if (bytes === 0) return [0, sizes[0]];
-
- const k = 1024;
- const dm = decimals < 0 ? 0 : decimals;
-
- const i = Math.floor(Math.log(bytes) / Math.log(k));
-
- return [parseFloat((bytes / k ** i).toFixed(dm)), sizes[i]];
-}
-
-export default formatBytes;
diff --git a/kafka-ui-react-app/src/theme/bulma_overrides.scss b/kafka-ui-react-app/src/theme/bulma_overrides.scss
index 047d9d822b1..cbdb0797dd1 100644
--- a/kafka-ui-react-app/src/theme/bulma_overrides.scss
+++ b/kafka-ui-react-app/src/theme/bulma_overrides.scss
@@ -1,12 +1,3 @@
-@import "../../node_modules/bulma/sass/utilities/_all.sass";
-@import "../../node_modules/bulma/sass/base/_all.sass";
-@import "../../node_modules/bulma/sass/elements/_all.sass";
-@import "../../node_modules/bulma/sass/form/_all.sass";
-@import "../../node_modules/bulma/sass/components/_all.sass";
-@import "../../node_modules/bulma/sass/grid/_all.sass";
-@import "../../node_modules/bulma/sass/layout/_all.sass";
-@import "../../node_modules/bulma-switch/src/sass/index.sass";
-
.has {
&-text-overflow-ellipsis {
flex: 1;
@@ -54,16 +45,6 @@
}
}
-.box {
- &.is-hoverable {
- cursor: pointer;
-
- &:hover {
- box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.2), 0 0px 0 1px rgba(10, 10, 10, 0.02);
- }
- }
-}
-
@keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
diff --git a/kafka-ui-react-app/src/theme/index.scss b/kafka-ui-react-app/src/theme/index.scss
index a4811b1264c..0cd8e4978be 100644
--- a/kafka-ui-react-app/src/theme/index.scss
+++ b/kafka-ui-react-app/src/theme/index.scss
@@ -1,3 +1,5 @@
+@import 'bulma';
+@import '~bulma-switch';
@import 'src/theme/bulma_overrides';
#root, body, html {
| null | train | train | 2021-02-17T10:03:18 | "2021-02-10T22:15:35Z" | giom-l | train |
provectus/kafka-ui/222_223 | provectus/kafka-ui | provectus/kafka-ui/222 | provectus/kafka-ui/223 | [
"keyword_pr_to_issue"
] | be96bbc3813977ef6f6e20628b92c3a33c748c15 | 58df6c1a7ee5eda3dacc69832395445fd9c9a26f | [] | [] | "2021-03-03T11:10:11Z" | [
"type/bug",
"scope/backend"
] | Error while trying to read messages from _schemas topic | Kafka UI seems to be unable to read messages from SchemaRegistry's _schemas topic.
### How to recreate the issue
1) Run docker-compose file (with kafka-ui) from master branch (current commit is 73f8991)
2) Go to the cluster "local" -> Topics -> _schemas -> Messages
### Expected behaviour:
Messages' content and metadata appear
### Actual behaviour:
API crushes with `java.lang.NullPointerException` and the loading spinner never goes away
### Logs:
[kafka_ui_bug.log](https://github.com/provectus/kafka-ui/files/6064186/kafka_ui_bug.log)
I'm not sure if it is a real bug or is it just because SchemaRegistry operations are in WIP, but it'd be great to add some sort of error message on the frontend side nevertheless. | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java"
] | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java"
] | [
"kafka-ui-api/src/test/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializerTest.java"
] | diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
index 00544a109dc..a9e3887dbbf 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializer.java
@@ -150,7 +150,7 @@ private Object parseAvroRecord(ConsumerRecord<Bytes, Bytes> record) throws IOExc
byte[] bytes = AvroSchemaUtils.toJson(avroRecord);
return parseJson(bytes);
} else {
- return new HashMap<String,Object>();
+ return Map.of();
}
}
@@ -162,12 +162,16 @@ private Object parseProtobufRecord(ConsumerRecord<Bytes, Bytes> record) throws I
byte[] bytes = ProtobufSchemaUtils.toJson(message);
return parseJson(bytes);
} else {
- return new HashMap<String,Object>();
+ return Map.of();
}
}
private Object parseJsonRecord(ConsumerRecord<Bytes, Bytes> record) throws IOException {
- byte[] valueBytes = record.value().get();
+ var value = record.value();
+ if (value == null) {
+ return Map.of();
+ }
+ byte[] valueBytes = value.get();
return parseJson(valueBytes);
}
@@ -178,6 +182,9 @@ private Object parseJson(byte[] bytes) throws IOException {
private Object parseStringRecord(ConsumerRecord<Bytes, Bytes> record) {
String topic = record.topic();
+ if (record.value() == null) {
+ return Map.of();
+ }
byte[] valueBytes = record.value().get();
return stringDeserializer.deserialize(topic, valueBytes);
}
| diff --git a/kafka-ui-api/src/test/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializerTest.java b/kafka-ui-api/src/test/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializerTest.java
new file mode 100644
index 00000000000..3dbc716b21c
--- /dev/null
+++ b/kafka-ui-api/src/test/java/com/provectus/kafka/ui/cluster/deserialization/SchemaRegistryRecordDeserializerTest.java
@@ -0,0 +1,34 @@
+package com.provectus.kafka.ui.cluster.deserialization;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.provectus.kafka.ui.cluster.model.KafkaCluster;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.apache.kafka.common.utils.Bytes;
+import org.junit.jupiter.api.Test;
+
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class SchemaRegistryRecordDeserializerTest {
+
+ private final SchemaRegistryRecordDeserializer deserializer = new SchemaRegistryRecordDeserializer(
+ KafkaCluster.builder()
+ .schemaNameTemplate("%s-value")
+ .build(),
+ new ObjectMapper()
+ );
+
+ @Test
+ public void shouldDeserializeStringValue() {
+ var value = "test";
+ var deserializedRecord = deserializer.deserialize(new ConsumerRecord<>("topic", 1, 0, Bytes.wrap("key".getBytes()), Bytes.wrap(value.getBytes())));
+ assertEquals(value, deserializedRecord);
+ }
+
+ @Test
+ public void shouldDeserializeNullValueRecordToEmptyMap() {
+ var deserializedRecord = deserializer.deserialize(new ConsumerRecord<>("topic", 1, 0, Bytes.wrap("key".getBytes()), null));
+ assertEquals(Map.of(), deserializedRecord);
+ }
+}
\ No newline at end of file
| train | train | 2021-03-03T11:08:51 | "2021-03-01T20:15:20Z" | DementevNikita | train |
provectus/kafka-ui/212_225 | provectus/kafka-ui | provectus/kafka-ui/212 | provectus/kafka-ui/225 | [
"timestamp(timedelta=0.0, similarity=0.9108878573288014)",
"connected"
] | a9cb9567d6a7b3599512605cac709f1495cba0a2 | 1a215865ef3b4332a4594decc959e579b4096ace | [] | [
"I would suggest to just check that last Li contains `child`",
"Please add specs to test updated code",
"I would also suggest to wrap all this code into `try catch`",
"Please add examples with incorrect input props",
"I think that adding a snapshot will allow you to cover the part of the code that you are testing here ",
"👍 ",
"It should return value not an error. Lets return \"-\"",
"I prefer to avoid random data in tests. Lets use const value like 533. and check it like\r\n```\r\nexpect(component.text()).toEqual('533 Bytes');\r\n```\r\nFrom the interface `value: string | number | undefined`. Please add specs for all available cases",
"please use \r\n```suggestion\r\n expect(component.text()).toEqual('10Blah');\r\n```"
] | "2021-03-03T18:16:09Z" | [
"good first issue",
"scope/frontend"
] | Cover common components with tests | As an engineer using kafka-ui in production, I would like to have 100% test coverage.
Please add specs to all common components (src/components/common) | [
"kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx",
"kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx"
] | [
"kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx",
"kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/Breadcrumb.spec.tsx",
"kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/__snapshots__/Breadcrumb.spec.tsx.snap",
"kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx",
"kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/__tests__/Indicator.spec.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/__tests__/MetricsWrapper.spec.tsx",
"kafka-ui-react-app/src/components/common/Dashboard/__tests__/__snapshots__/Indicator.spec.tsx.snap",
"kafka-ui-react-app/src/components/common/PageLoader/__tests__/PageLoader.spec.tsx",
"kafka-ui-react-app/src/components/common/PageLoader/__tests__/__snapshots__/PageLoader.spec.tsx.snap"
] | [] | diff --git a/kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx b/kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx
index b3b7a2c5c08..2e93e2a6855 100644
--- a/kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx
+++ b/kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import { NavLink } from 'react-router-dom';
-interface Link {
+export interface Link {
label: string;
href: string;
}
diff --git a/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/Breadcrumb.spec.tsx b/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/Breadcrumb.spec.tsx
new file mode 100644
index 00000000000..c8b3a581568
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/Breadcrumb.spec.tsx
@@ -0,0 +1,48 @@
+import { mount, shallow } from 'enzyme';
+import React from 'react';
+import { StaticRouter } from 'react-router-dom';
+import Breadcrumb, { Link } from '../Breadcrumb';
+
+describe('Breadcrumb component', () => {
+ const links: Link[] = [
+ {
+ label: 'link1',
+ href: 'link1href',
+ },
+ {
+ label: 'link2',
+ href: 'link2href',
+ },
+ {
+ label: 'link3',
+ href: 'link3href',
+ },
+ ];
+
+ const child = <div className="child" />;
+
+ const component = mount(
+ <StaticRouter>
+ <Breadcrumb links={links}>{child}</Breadcrumb>
+ </StaticRouter>
+ );
+
+ it('renders the list of links', () => {
+ component.find(`NavLink`).forEach((link, idx) => {
+ expect(link.prop('to')).toEqual(links[idx].href);
+ expect(link.contains(links[idx].label)).toBeTruthy();
+ });
+ });
+ it('renders the children', () => {
+ const list = component.find('ul').children();
+ expect(list.last().containsMatchingElement(child)).toBeTruthy();
+ });
+ it('matches the snapshot', () => {
+ const shallowComponent = shallow(
+ <StaticRouter>
+ <Breadcrumb links={links}>{child}</Breadcrumb>
+ </StaticRouter>
+ );
+ expect(shallowComponent).toMatchSnapshot();
+ });
+});
diff --git a/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/__snapshots__/Breadcrumb.spec.tsx.snap b/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/__snapshots__/Breadcrumb.spec.tsx.snap
new file mode 100644
index 00000000000..b7696f3bb63
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/Breadcrumb/__tests__/__snapshots__/Breadcrumb.spec.tsx.snap
@@ -0,0 +1,49 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Breadcrumb component matches the snapshot 1`] = `
+<Router
+ history={
+ Object {
+ "action": "POP",
+ "block": [Function],
+ "createHref": [Function],
+ "go": [Function],
+ "goBack": [Function],
+ "goForward": [Function],
+ "listen": [Function],
+ "location": Object {
+ "hash": "",
+ "pathname": "/",
+ "search": "",
+ "state": undefined,
+ },
+ "push": [Function],
+ "replace": [Function],
+ }
+ }
+ staticContext={Object {}}
+>
+ <Breadcrumb
+ links={
+ Array [
+ Object {
+ "href": "link1href",
+ "label": "link1",
+ },
+ Object {
+ "href": "link2href",
+ "label": "link2",
+ },
+ Object {
+ "href": "link3href",
+ "label": "link3",
+ },
+ ]
+ }
+ >
+ <div
+ className="child"
+ />
+ </Breadcrumb>
+</Router>
+`;
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
index 2334c8067ab..9447f724025 100644
--- a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
@@ -5,20 +5,22 @@ interface Props {
precision?: number;
}
-const BytesFormatted: React.FC<Props> = ({ value, precision = 0 }) => {
- const formatedValue = React.useMemo(() => {
- const bytes = typeof value === 'string' ? parseInt(value, 10) : value;
-
- const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
- if (!bytes || bytes === 0) return [0, sizes[0]];
+export const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
- if (bytes < 1024) return [Math.ceil(bytes), sizes[0]];
-
- const pow = Math.floor(Math.log2(bytes) / 10);
- const multiplier = 10 ** (precision || 2);
- return (
- Math.round((bytes * multiplier) / 1024 ** pow) / multiplier + sizes[pow]
- );
+const BytesFormatted: React.FC<Props> = ({ value, precision = 0 }) => {
+ const formatedValue = React.useMemo((): string => {
+ try {
+ const bytes = typeof value === 'string' ? parseInt(value, 10) : value;
+ if (Number.isNaN(bytes)) return `-Bytes`;
+ if (!bytes || bytes < 1024) return `${Math.ceil(bytes || 0)}${sizes[0]}`;
+ const pow = Math.floor(Math.log2(bytes) / 10);
+ const multiplier = 10 ** (precision < 0 ? 0 : precision);
+ return (
+ Math.round((bytes * multiplier) / 1024 ** pow) / multiplier + sizes[pow]
+ );
+ } catch (e) {
+ return `-Bytes`;
+ }
}, [value]);
return <span>{formatedValue}</span>;
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
new file mode 100644
index 00000000000..85ed10877b3
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
@@ -0,0 +1,38 @@
+import { shallow } from 'enzyme';
+import React from 'react';
+import BytesFormatted, { sizes } from '../BytesFormatted';
+
+describe('BytesFormatted', () => {
+ it('renders Bytes correctly', () => {
+ const component = shallow(<BytesFormatted value={666} />);
+ expect(component.text()).toEqual('666Bytes');
+ });
+
+ it('renders correct units', () => {
+ let value = 1;
+ sizes.forEach((unit) => {
+ const component = shallow(<BytesFormatted value={value} />);
+ expect(component.text()).toEqual(`1${unit}`);
+ value *= 1024;
+ });
+ });
+
+ it('renders correct precision', () => {
+ let component = shallow(<BytesFormatted value={2000} precision={100} />);
+ expect(component.text()).toEqual(`1.953125${sizes[1]}`);
+
+ component = shallow(<BytesFormatted value={10000} precision={5} />);
+ expect(component.text()).toEqual(`9.76563${sizes[1]}`);
+ });
+
+ it('correctly handles invalid props', () => {
+ let component = shallow(<BytesFormatted value={10000} precision={-1} />);
+ expect(component.text()).toEqual(`10${sizes[1]}`);
+
+ component = shallow(<BytesFormatted value="some string" />);
+ expect(component.text()).toEqual(`-${sizes[0]}`);
+
+ component = shallow(<BytesFormatted value={undefined} />);
+ expect(component.text()).toEqual(`0${sizes[0]}`);
+ });
+});
diff --git a/kafka-ui-react-app/src/components/common/Dashboard/__tests__/Indicator.spec.tsx b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/Indicator.spec.tsx
new file mode 100644
index 00000000000..3709f9add18
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/Indicator.spec.tsx
@@ -0,0 +1,15 @@
+import { mount } from 'enzyme';
+import React from 'react';
+import Indicator from '../Indicator';
+
+describe('Indicator', () => {
+ it('matches the snapshot', () => {
+ const child = 'Child';
+ const component = mount(
+ <Indicator title="title" label="label">
+ {child}
+ </Indicator>
+ );
+ expect(component).toMatchSnapshot();
+ });
+});
diff --git a/kafka-ui-react-app/src/components/common/Dashboard/__tests__/MetricsWrapper.spec.tsx b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/MetricsWrapper.spec.tsx
new file mode 100644
index 00000000000..73864385ffd
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/MetricsWrapper.spec.tsx
@@ -0,0 +1,24 @@
+import { shallow } from 'enzyme';
+import React from 'react';
+import MetricsWrapper from '../MetricsWrapper';
+
+describe('MetricsWrapper', () => {
+ it('correctly adds classes', () => {
+ const className = 'className';
+ const component = shallow(
+ <MetricsWrapper wrapperClassName={className} multiline />
+ );
+ expect(component.find(`.${className}`).exists()).toBeTruthy();
+ expect(component.find('.level-multiline').exists()).toBeTruthy();
+ });
+
+ it('correctly renders children', () => {
+ let component = shallow(<MetricsWrapper />);
+ expect(component.find('.subtitle').exists()).toBeFalsy();
+
+ const title = 'title';
+ component = shallow(<MetricsWrapper title={title} />);
+ expect(component.find('.subtitle').exists()).toBeTruthy();
+ expect(component.text()).toEqual(title);
+ });
+});
diff --git a/kafka-ui-react-app/src/components/common/Dashboard/__tests__/__snapshots__/Indicator.spec.tsx.snap b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/__snapshots__/Indicator.spec.tsx.snap
new file mode 100644
index 00000000000..7cabd55e4f5
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/Dashboard/__tests__/__snapshots__/Indicator.spec.tsx.snap
@@ -0,0 +1,27 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Indicator matches the snapshot 1`] = `
+<Indicator
+ label="label"
+ title="title"
+>
+ <div
+ className="level-item level-left"
+ >
+ <div
+ title="title"
+ >
+ <p
+ className="heading"
+ >
+ label
+ </p>
+ <p
+ className="title"
+ >
+ Child
+ </p>
+ </div>
+ </div>
+</Indicator>
+`;
diff --git a/kafka-ui-react-app/src/components/common/PageLoader/__tests__/PageLoader.spec.tsx b/kafka-ui-react-app/src/components/common/PageLoader/__tests__/PageLoader.spec.tsx
new file mode 100644
index 00000000000..ea34bb19420
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/PageLoader/__tests__/PageLoader.spec.tsx
@@ -0,0 +1,10 @@
+import { mount } from 'enzyme';
+import React from 'react';
+import PageLoader from '../PageLoader';
+
+describe('PageLoader', () => {
+ it('matches the snapshot', () => {
+ const component = mount(<PageLoader />);
+ expect(component).toMatchSnapshot();
+ });
+});
diff --git a/kafka-ui-react-app/src/components/common/PageLoader/__tests__/__snapshots__/PageLoader.spec.tsx.snap b/kafka-ui-react-app/src/components/common/PageLoader/__tests__/__snapshots__/PageLoader.spec.tsx.snap
new file mode 100644
index 00000000000..10a9cf06313
--- /dev/null
+++ b/kafka-ui-react-app/src/components/common/PageLoader/__tests__/__snapshots__/PageLoader.spec.tsx.snap
@@ -0,0 +1,36 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`PageLoader matches the snapshot 1`] = `
+<PageLoader>
+ <section
+ className="hero is-fullheight-with-navbar"
+ >
+ <div
+ className="hero-body has-text-centered"
+ style={
+ Object {
+ "justifyContent": "center",
+ }
+ }
+ >
+ <div
+ style={
+ Object {
+ "width": 300,
+ }
+ }
+ >
+ <div
+ className="subtitle"
+ >
+ Loading...
+ </div>
+ <progress
+ className="progress is-small is-primary is-inline-block"
+ max="100"
+ />
+ </div>
+ </div>
+ </section>
+</PageLoader>
+`;
| null | val | train | 2021-03-04T15:51:18 | "2021-02-28T20:27:18Z" | workshur | train |
provectus/kafka-ui/197_226 | provectus/kafka-ui | provectus/kafka-ui/197 | provectus/kafka-ui/226 | [
"keyword_pr_to_issue",
"timestamp(timedelta=0.0, similarity=0.856367744457547)"
] | 36a5bbf9b11058112e91cc352eb6e37aed8a38d6 | e29ea3599d952b682abc2c36fc7ce3468f6647b5 | [] | [] | "2021-03-04T06:20:38Z" | [] | Upgrade confluent platform from `5.1.0` to at least `5.2.x` | [
"docker/kafka-clusters-only.yaml",
"docker/kafka-ui.yaml",
"kafka-ui-api/src/main/resources/application-local.yml"
] | [
"docker/kafka-clusters-only.yaml",
"docker/kafka-ui.yaml",
"kafka-ui-api/src/main/resources/application-local.yml"
] | [] | diff --git a/docker/kafka-clusters-only.yaml b/docker/kafka-clusters-only.yaml
index 6911054ceb7..16cb50b6596 100644
--- a/docker/kafka-clusters-only.yaml
+++ b/docker/kafka-clusters-only.yaml
@@ -3,7 +3,7 @@ version: '2'
services:
zookeeper0:
- image: confluentinc/cp-zookeeper:5.1.0
+ image: confluentinc/cp-zookeeper:5.2.4
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
@@ -11,7 +11,7 @@ services:
- 2181:2181
kafka0:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
depends_on:
- zookeeper0
environment:
@@ -28,7 +28,7 @@ services:
- 9997:9997
kafka01:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
depends_on:
- zookeeper0
environment:
@@ -45,7 +45,7 @@ services:
- 9999:9999
zookeeper1:
- image: confluentinc/cp-zookeeper:5.1.0
+ image: confluentinc/cp-zookeeper:5.2.4
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
@@ -53,7 +53,7 @@ services:
- 2182:2181
kafka1:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
depends_on:
- zookeeper1
environment:
@@ -70,7 +70,7 @@ services:
- 9998:9998
schemaregistry0:
- image: confluentinc/cp-schema-registry:5.1.0
+ image: confluentinc/cp-schema-registry:5.2.4
depends_on:
- zookeeper0
- kafka0
@@ -89,7 +89,7 @@ services:
- 8081:8081
kafka-connect0:
- image: confluentinc/cp-kafka-connect:5.1.0
+ image: confluentinc/cp-kafka-connect:5.2.4
ports:
- 8083:8083
depends_on:
@@ -115,7 +115,7 @@ services:
kafka-init-topics:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
volumes:
- ./message.json:/data/message.json
depends_on:
diff --git a/docker/kafka-ui.yaml b/docker/kafka-ui.yaml
index 50a2e0697a8..8d8790b97e9 100644
--- a/docker/kafka-ui.yaml
+++ b/docker/kafka-ui.yaml
@@ -31,7 +31,7 @@ services:
KAFKA_CLUSTERS_1_KAFKACONNECT_0_ADDRESS: http://kafka-connect0:8083
zookeeper0:
- image: confluentinc/cp-zookeeper:5.1.0
+ image: confluentinc/cp-zookeeper:5.2.4
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
@@ -39,7 +39,7 @@ services:
- 2181:2181
kafka0:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
depends_on:
- zookeeper0
ports:
@@ -56,13 +56,13 @@ services:
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997
zookeeper1:
- image: confluentinc/cp-zookeeper:5.1.0
+ image: confluentinc/cp-zookeeper:5.2.4
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka1:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
depends_on:
- zookeeper1
ports:
@@ -79,7 +79,7 @@ services:
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka1 -Dcom.sun.management.jmxremote.rmi.port=9998
schemaregistry0:
- image: confluentinc/cp-schema-registry:5.1.0
+ image: confluentinc/cp-schema-registry:5.2.4
ports:
- 8085:8085
depends_on:
@@ -97,7 +97,7 @@ services:
SCHEMA_REGISTRY_KAFKASTORE_TOPIC: _schemas
kafka-connect0:
- image: confluentinc/cp-kafka-connect:5.1.0
+ image: confluentinc/cp-kafka-connect:5.2.4
ports:
- 8083:8083
depends_on:
@@ -122,7 +122,7 @@ services:
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
kafka-init-topics:
- image: confluentinc/cp-kafka:5.1.0
+ image: confluentinc/cp-kafka:5.2.4
volumes:
- ./message.json:/data/message.json
depends_on:
diff --git a/kafka-ui-api/src/main/resources/application-local.yml b/kafka-ui-api/src/main/resources/application-local.yml
index 8a72bdf4f9c..6ba839921da 100644
--- a/kafka-ui-api/src/main/resources/application-local.yml
+++ b/kafka-ui-api/src/main/resources/application-local.yml
@@ -2,7 +2,7 @@ kafka:
clusters:
-
name: local
- bootstrapServers: localhost:9093
+ bootstrapServers: localhost:9092
zookeeper: localhost:2181
schemaRegistry: http://localhost:8081
kafkaConnect:
| null | train | train | 2021-03-03T18:56:28 | "2021-02-12T11:32:01Z" | RamazanYapparov | train |
|
provectus/kafka-ui/168_227 | provectus/kafka-ui | provectus/kafka-ui/168 | provectus/kafka-ui/227 | [
"keyword_pr_to_issue"
] | 36a5bbf9b11058112e91cc352eb6e37aed8a38d6 | ae1acbce9b33dbb7bd25e72b924b14aebab2c77e | [
"Thank you for your issue. Will try to fix it soon. ",
"@andormarkus Kafka UI uses internal cache for rest requests. By default it updates once in a 30 seconds. I just checked that new topic created outside of Kafka UI successfully appeared in 30 seconds. Could you please verify that this was an issue for you? ",
"@germanosin We are running it inside a docker container and it might cause the issue. If we add or delete any topic it does not show up until docker restarted. I have waited 30 minutes and nothing, while on CLI I can see the new/deleted topics. Tried incognito window, delete browser cache etc.\r\n\r\nWe are running it on AWS t3a.micro (1gb ram, Amazon Linux 2) instance inside docker. This is the only container running on this instance and cloudwatch agent. Based on htop kafka-ui-api.jar consumes 600mb/1024mb memory. Without kafka ui the base memory usage in ~200mb\r\n<img width=\"1104\" alt=\"Screenshot 2021-02-03 at 12 04 04\" src=\"https://user-images.githubusercontent.com/51825189/106738288-055a8a00-6618-11eb-8426-4a1c3f83bea2.png\">\r\n\r\nThis is the user data how we are launching the kafka ui.\r\n```\r\n#!/bin/sh\r\nexport PATH=/usr/local/bin:$PATH\r\n\r\n##----------------------------------------------------------------------------------------\r\n# Install the necessary packages\r\n\r\nyum install jq htop -y\r\n\r\n# Install docker\r\nyum install docker -y\r\nservice docker start\r\n\r\ngroupadd docker\r\nusermod -a -G docker ec2-user\r\n\r\n# Install docker-compose\r\ncurl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\r\nchmod +x /usr/local/bin/docker-compose\r\nchown root:docker /usr/local/bin/docker-compose\r\n\r\n#----------------------------------------------------------------------------------------\r\n# Create Kafka UI docker\r\n\r\nKAFKA_UI=/home/ec2-user/kafka_ui\r\nmkdir $KAFKA_UI\r\n\r\ncd $KAFKA_UI\r\n\r\n# write out the docker-compose file\r\ncat <<EOF >docker-compose.yml\r\nversion: '2'\r\nservices:\r\n kafka-ui:\r\n image: provectuslabs/kafka-ui\r\n container_name: kafka-ui\r\n ports:\r\n - \"80:8080\"\r\n restart: always\r\n environment:\r\nEOF\r\n\r\n#----------------------------------------------------------------------------------------\r\n# Get Kafka information\r\n\r\nCLUSTER_ARNS=$(aws kafka list-clusters --region=eu-central-1 | jq \".ClusterInfoList | .[] | .ClusterArn\" | tr -d '\"')\r\nCLUSTER_ARNS=($CLUSTER_ARNS)\r\n\r\nINDEX=0\r\nfor ARN in ${CLUSTER_ARNS[@]}; do\r\n NAME_LONG=$(echo $ARN | grep -o \"cluster\\/.*\\/\")\r\n NAME=${NAME_LONG:8:-1}\r\n\r\n BROKER_URL=$(aws kafka get-bootstrap-brokers --cluster-arn=$ARN --region=eu-central-1 | jq \".BootstrapBrokerString\" | tr -d '\"')\r\n ZOOKEEPER_URL=$(aws kafka describe-cluster --cluster-arn=$ARN --region=eu-central-1 | jq \".ClusterInfo | .ZookeeperConnectString\" | tr -d '\"')\r\n\r\n echo \" - KAFKA_CLUSTERS_${INDEX}_NAME=${NAME}\" >>docker-compose.yml\r\n echo \" - KAFKA_CLUSTERS_${INDEX}_BOOTSTRAPSERVERS=${BROKER_URL}\" >>docker-compose.yml\r\n echo \" - KAFKA_CLUSTERS_${INDEX}_ZOOKEEPER=${ZOOKEEPER_URL}\" >>docker-compose.yml\r\n\r\n INDEX=$(expr $INDEX + 1)\r\ndone\r\n\r\n#Fix docker-compose ownership\r\nchown ec2-user:ec2-user docker-compose.yml\r\n\r\n# Start the container\r\ndocker-compose up -d\r\n\r\n```\r\n\r\nPlease let me know if you need more information\r\n",
"@germanosin \r\n\r\nI have done further testing. The topics automatically shows up after 30s and page reload. \r\n\r\nI have also noticed when the kafka-ui-api.jar runs out of system memory (1gb) which takes 5h while no one uses it and just idling. See screenshot in my previous comment. When the system out of memory than topic refresh stop and no new topic shows up and deleted disappears. Message can not be loaded in any topic as well, just buffers. I don't know what causes this out of memory issues.\r\n\r\n\r\n",
"@germanosin \r\n\r\nHello,\r\n\r\nI made further testing, this case Kafka UI is not connected to any Kafka cluster. Same t3a.micro (1gb ram, Amazon Linux 2) instance was used. With the bootstrap script you can recreate the same situation.\r\n\r\nPlease let me know if you need more information.\r\n\r\nBootstrap script on AWS\r\n```\r\n#!/bin/sh\r\nexport PATH=/usr/local/bin:$PATH\r\n\r\n# Install docker\r\nyum install docker -y\r\nservice docker start\r\n\r\ngroupadd docker\r\nusermod -a -G docker ec2-user\r\n\r\n# Install docker-compose\r\ncurl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\r\nchmod +x /usr/local/bin/docker-compose\r\nchown root:docker /usr/local/bin/docker-compose\r\n\r\n#----------------------------------------------------------------------------------------\r\n# Create Kafka UI docker\r\n\r\nKAFKA_UI=/home/ec2-user/kafka_ui\r\nmkdir $KAFKA_UI\r\n\r\ncd $KAFKA_UI\r\n\r\n# write out the docker-compose file\r\ncat <<EOF >docker-compose.yml\r\nversion: '2'\r\nservices:\r\n kafka-ui:\r\n image: provectuslabs/kafka-ui\r\n container_name: kafka-ui\r\n ports:\r\n - \"80:8080\"\r\n restart: always\r\nEOF\r\n\r\n#Fix docker-compose ownership\r\nchown ec2-user:ec2-user docker-compose.yml\r\n\r\n# Start the container\r\ndocker-compose up -d\r\n\r\n```\r\n\r\n\r\nHere is the memory and disk usage profile of the instance.\r\n\r\n",
"@andormarkus this issue should be fixed in 0.0.10. Could you please check it on your side?",
"Hi @germanosin \r\n\r\nPlease can you update docker hub tags?\r\nLatest tag belongs to 0.0.9\r\n\r\nThanks",
"Hi All,\r\n\r\nTo work around the memory issue on 0.0.9 we had a cron job which restarted the container in every 4 hours. This explains sawtooth wave. For 0.0.10 I have disabled the cron job. I will get back once more data collected.\r\n\r\n\r\n",
"Here is 7 days ram utilisation\r\n\r\n<img width=\"1332\" alt=\"Screenshot 2021-03-19 at 10 29 19\" src=\"https://user-images.githubusercontent.com/51825189/111759625-14cb2500-889e-11eb-89a1-dce0f1c126ba.png\">\r\n"
] | [] | "2021-03-04T07:59:28Z" | [
"type/bug",
"scope/backend"
] | bug: External topics not refreshed on page reload | Hi Team,
We are configuring our topic with Terraform or Kafka CLI therefore these topic are "External" topic.
I have deleted topic "navisioncompany" and created new topic "navision.Company".
This new topic show up in Kafka client without error. However these changes are not picked up by Kafka UI. To track these changes I have to restart the docker container.
Kafka CLI Client

Kafka UI

Thanks,
Andor | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java"
] | [
"kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java"
] | [] | diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java
index 82ff081ada0..d26afd07ebf 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/kafka/KafkaService.java
@@ -208,12 +208,13 @@ public Mono<ExtendedAdminClient> getOrCreateAdminClient(KafkaCluster cluster) {
}
public Mono<ExtendedAdminClient> createAdminClient(KafkaCluster kafkaCluster) {
- Properties properties = new Properties();
- properties.putAll(kafkaCluster.getProperties());
- properties.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaCluster.getBootstrapServers());
- properties.put(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, clientTimeout);
- AdminClient adminClient = AdminClient.create(properties);
- return ExtendedAdminClient.extendedAdminClient(adminClient);
+ return Mono.fromSupplier(() -> {
+ Properties properties = new Properties();
+ properties.putAll(kafkaCluster.getProperties());
+ properties.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaCluster.getBootstrapServers());
+ properties.put(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, clientTimeout);
+ return AdminClient.create(properties);
+ }).flatMap(ExtendedAdminClient::extendedAdminClient);
}
@SneakyThrows
| null | train | train | 2021-03-03T18:56:28 | "2021-02-01T10:12:27Z" | andormarkus | train |
provectus/kafka-ui/143_233 | provectus/kafka-ui | provectus/kafka-ui/143 | provectus/kafka-ui/233 | [
"keyword_pr_to_issue",
"timestamp(timedelta=0.0, similarity=0.8893082753952145)"
] | c00f21a3baef790f8b4272486269cee278e285eb | f3535d94ff840f00210a30550b4d0bd772330e0d | [] | [] | "2021-03-09T14:12:38Z" | [
"type/documentation",
"good first issue"
] | Add Contributing Guide | [] | [
"CODE-OF-CONDUCT.md",
"CONTRIBUTING.md"
] | [] | diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md
new file mode 100644
index 00000000000..3c2882277ce
--- /dev/null
+++ b/CODE-OF-CONDUCT.md
@@ -0,0 +1,132 @@
+
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, caste, color, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at email [email protected].
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
+
+Community Impact Guidelines were inspired by
+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
+
+For answers to common questions about this code of conduct, see the FAQ at
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
+at [https://www.contributor-covenant.org/translations][translations].
+
+[homepage]: https://www.contributor-covenant.org
+[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
+[Mozilla CoC]: https://github.com/mozilla/diversity
+[FAQ]: https://www.contributor-covenant.org/faq
+[translations]: https://www.contributor-covenant.org/translations
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..18437c90de0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,16 @@
+# Contributing
+
+When contributing to this repository, please first discuss the change you wish to make via issue,
+email, or any other method with the owners of this repository before making a change.
+
+Please note we have a code of conduct, please follow it in all your interactions with the project.
+
+## Pull Request Process
+
+1. Ensure any install or build dependencies are removed before the end of the layer when doing a
+ build.
+2. Update the README.md with details of changes to the interface, this includes new environment
+ variables, exposed ports, useful file locations and container parameters.
+3. Start Pull Request name with issue number (ex. #123)
+4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
+ do not have permission to do that, you may request the second reviewer to merge it for you.
| null | val | train | 2021-03-09T15:06:32 | "2020-12-17T10:17:30Z" | Evanto | train |
|
provectus/kafka-ui/142_233 | provectus/kafka-ui | provectus/kafka-ui/142 | provectus/kafka-ui/233 | [
"keyword_pr_to_issue"
] | c00f21a3baef790f8b4272486269cee278e285eb | f3535d94ff840f00210a30550b4d0bd772330e0d | [] | [] | "2021-03-09T14:12:38Z" | [
"type/documentation",
"good first issue"
] | Add CoC (Code of Conduct) | [] | [
"CODE-OF-CONDUCT.md",
"CONTRIBUTING.md"
] | [] | diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md
new file mode 100644
index 00000000000..3c2882277ce
--- /dev/null
+++ b/CODE-OF-CONDUCT.md
@@ -0,0 +1,132 @@
+
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, caste, color, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at email [email protected].
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
+
+Community Impact Guidelines were inspired by
+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
+
+For answers to common questions about this code of conduct, see the FAQ at
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
+at [https://www.contributor-covenant.org/translations][translations].
+
+[homepage]: https://www.contributor-covenant.org
+[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
+[Mozilla CoC]: https://github.com/mozilla/diversity
+[FAQ]: https://www.contributor-covenant.org/faq
+[translations]: https://www.contributor-covenant.org/translations
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..18437c90de0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,16 @@
+# Contributing
+
+When contributing to this repository, please first discuss the change you wish to make via issue,
+email, or any other method with the owners of this repository before making a change.
+
+Please note we have a code of conduct, please follow it in all your interactions with the project.
+
+## Pull Request Process
+
+1. Ensure any install or build dependencies are removed before the end of the layer when doing a
+ build.
+2. Update the README.md with details of changes to the interface, this includes new environment
+ variables, exposed ports, useful file locations and container parameters.
+3. Start Pull Request name with issue number (ex. #123)
+4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
+ do not have permission to do that, you may request the second reviewer to merge it for you.
| null | train | train | 2021-03-09T15:06:32 | "2020-12-17T10:16:47Z" | Evanto | train |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.