Closed vaibhavbhanawat01 closed 8 months ago
Have you tried upgrading the google_bazel_common
version? At the pinned commit https://github.com/google/bazel-common/blob/82a7dd0f4cd8593fdaa40d65a1fa820b14ff3493/workspace_defs.bzl it's on 31.0.1-jre.
Example: https://github.com/google/allocation-instrumenter/commit/2caee14eaf0a5a87c00a03ce296d0f99d7b302c1
@lauraharker We tried but we are getting below error. Should we use different version of closure-compiler ?
Building libcompiler_lib_no_runtime_libs-class.jar (786 source files) and running annotation processors (AutoAnnotationProcessor, AutoOneOfProcessor, AutoValueProcessor) failed: (Exit 1): java.exe failed: error executing command external/remotejdk11_win/bin/java.exe -XX:+UseParallelOldGC -XX:-CompactStrings --patch-module=java.compiler=external/remote_java_tools_windows/java_tools/java_compiler.jar ... (remaining 15 argument(s) skipped) src\com\google\javascript\rhino\jstype\NamedType.java:336: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue validator.apply(getReferencedType()); ^ (see https://errorprone.info/bugpattern/CheckReturnValue) Did you mean to remove this line? src\com\google\javascript\rhino\jstype\NamedType.java:365: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue validator.apply(type); ^ (see https://errorprone.info/bugpattern/CheckReturnValue) Did you mean to remove this line? src\com\google\javascript\rhino\jstype\NamedType.java:409: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue validator.apply(getReferencedType()); ^ (see https://errorprone.info/bugpattern/CheckReturnValue) Did you mean to remove this line? Target //:compiler_unshaded_deploy.jar failed to build
Yes, I'd recommend upgrading your version of Closure Compiler. The latest versions shouldn't have this issue.
@lauraharker thank you.
We are currently using closure-compiler-20220502. Because of google guava vulnerability we need to update com.google.guava version to 32.0.1-jre. We tried few of the approach but it still showing 31.0.1-jre version. Below is the workspace.bazel. can someone please help here
`workspace(name = "com_google_javascript_jscomp")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_JVM_EXTERNAL_TAG = "4.2" RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"
http_archive( name = "rules_jvm_external", strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, sha256 = RULES_JVM_EXTERNAL_SHA, url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, )
http_archive( name = "google_bazel_common",
output from
sha256sum
on the downloaded zip file)
load("@google_bazel_common//:workspace_defs.bzl", "google_common_workspace_rules", "maven_import")
google_common_workspace_rules()
maven_import(
http://args4j.kohsuke.org/index.html
)
maven_import(
https://github.com/java-diff-utils/java-diff-utils
)
maven_import(
https://github.com/google/gson
)
maven_import(
https://github.com/google/re2j
)
maven_import(
https://ant.apache.org/
)
maven_import(
https://github.com/google/gson
)
maven_import(
https://truth.dev/protobufs
)
maven_import(
https://truth.dev/protobufs
)
maven_import(
https://github.com/google/jimfs
)
http_archive( name = "protobuf_proto_rules",
output from
sha256sum
on the downloaded tar.gz file)
load("@protobuf_proto_rules//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") rules_proto_dependencies() rules_proto_toolchains()
http_archive( name = "protobuf_java_rules", url = "https://github.com/bazelbuild/rules_java/releases/download/4.0.0/rules_java-4.0.0.tar.gz",
output from
sha256sum
on the downloaded tar.gz file)
load("@protobuf_java_rules//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") rules_java_dependencies() rules_java_toolchains()
http_archive( name = "com_github_johnynek_bazel_jar_jar",
output from
sha256sum
on the downloaded zip file)
load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories")
jar_jar_repositories() `