diff --git a/WORKSPACE b/WORKSPACE index 93574aba7..1553c454f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -33,8 +33,6 @@ bazel_skylib_workspace() # End Skylib dependencies -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - http_archive( name = "io_bazel_stardoc", sha256 = "4a355dccc713458071f441f3dafd7452b3111c53cde554d0847b9a82d657149e", @@ -118,16 +116,16 @@ maven_install( name = "exclusion_testing", artifacts = [ maven.artifact( - group = "com.google.guava", artifact = "guava", - version = "27.0-jre", exclusions = [ maven.exclusion( - group = "org.codehaus.mojo", artifact = "animal-sniffer-annotations", + group = "org.codehaus.mojo", ), "com.google.j2objc:j2objc-annotations", ], + group = "com.google.guava", + version = "27.0-jre", ), ], repositories = [ @@ -144,8 +142,8 @@ maven_install( ], excluded_artifacts = [ maven.exclusion( - group = "org.codehaus.mojo", artifact = "animal-sniffer-annotations", + group = "org.codehaus.mojo", ), "com.google.j2objc:j2objc-annotations", ], @@ -241,15 +239,15 @@ maven_install( name = "testonly_testing", artifacts = [ maven.artifact( - group = "com.google.guava", artifact = "guava", + group = "com.google.guava", version = "27.0-jre", ), maven.artifact( - group = "com.google.auto.value", + testonly = True, artifact = "auto-value-annotations", + group = "com.google.auto.value", version = "1.6.3", - testonly = True, ), ], repositories = [ @@ -294,10 +292,10 @@ maven_install( "org.apache.tomcat:tomcat-catalina:9.0.24", # https://github.com/bazelbuild/rules_jvm_external/issues/255 maven.artifact( - group = "org.eclipse.jetty", artifact = "jetty-http", - version = "9.4.20.v20190813", classifier = "tests", + group = "org.eclipse.jetty", + version = "9.4.20.v20190813", ), ], repositories = [ @@ -372,16 +370,16 @@ maven_install( "com.fasterxml.jackson.core:jackson-annotations:2.11.2", "com.github.jnr:jffi:1.3.4", maven.artifact( - group = "com.github.jnr", artifact = "jffi", - version = "1.3.3", classifier = "native", + group = "com.github.jnr", + version = "1.3.3", ), maven.artifact( - group = "com.github.jnr", artifact = "jffi", - version = "1.3.2", classifier = "native", + group = "com.github.jnr", + version = "1.3.2", ), ], repositories = [ @@ -396,16 +394,16 @@ maven_install( "com.fasterxml.jackson.core:jackson-annotations:2.10.1", "com.fasterxml.jackson.core:jackson-annotations:2.10.1", maven.artifact( - group = "com.github.jnr", artifact = "jffi", - version = "1.3.3", classifier = "native", + group = "com.github.jnr", + version = "1.3.3", ), maven.artifact( - group = "com.github.jnr", artifact = "jffi", - version = "1.3.3", classifier = "native", + group = "com.github.jnr", + version = "1.3.3", ), ], repositories = [ @@ -426,60 +424,60 @@ maven_install( maven_install( name = "starlark_aar_import_with_sources_test", + # Not actually necessary since this is the default value, but useful for + # testing. + aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", artifacts = [ "androidx.work:work-runtime:2.6.0", ], + fetch_sources = True, + jetify = False, repositories = [ "https://repo1.maven.org/maven2", "https://maven.google.com", ], - fetch_sources = True, - jetify = False, use_starlark_android_rules = True, - # Not actually necessary since this is the default value, but useful for - # testing. - aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", ) maven_install( name = "starlark_aar_import_test", + # Not actually necessary since this is the default value, but useful for + # testing. + aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", artifacts = [ "com.android.support:appcompat-v7:28.0.0", ], + fetch_sources = False, repositories = [ "https://repo1.maven.org/maven2", "https://maven.google.com", ], - fetch_sources = False, use_starlark_android_rules = True, - # Not actually necessary since this is the default value, but useful for - # testing. - aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", ) maven_install( name = "starlark_aar_import_with_jetify_test", + # Not actually necessary since this is the default value, but useful for + # testing. + aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", artifacts = [ "com.android.support:appcompat-v7:28.0.0", ], + jetify = True, repositories = [ "https://repo1.maven.org/maven2", "https://maven.google.com", ], use_starlark_android_rules = True, - # Not actually necessary since this is the default value, but useful for - # testing. - aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl", - jetify = True, ) # for the above "starlark_aar_import_test" maven_install with # use_starlark_android_rules = True http_archive( name = "build_bazel_rules_android", - urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", strip_prefix = "rules_android-0.1.1", + urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], ) # https://github.com/bazelbuild/rules_jvm_external/issues/351 diff --git a/coursier.bzl b/coursier.bzl index 4020b8b4b..1e7aed523 100644 --- a/coursier.bzl +++ b/coursier.bzl @@ -13,7 +13,7 @@ load("//third_party/bazel_json/lib:json_parser.bzl", _json_parse = "json_parse") load("//private/rules:jetifier.bzl", "jetify_artifact_dependencies", "jetify_maven_coord") -load("//:specs.bzl", "maven", "parse", "utils") +load("//:specs.bzl", "parse", "utils") load("//private:artifact_utilities.bzl", "deduplicate_and_sort_artifacts") load("//private:coursier_utilities.bzl", "SUPPORTED_PACKAGING_TYPES", "escape") load("//private:dependency_tree_parser.bzl", "JETIFY_INCLUDE_LIST_JETIFY_ALL", "parser") @@ -988,7 +988,7 @@ def _coursier_fetch_impl(repository_ctx): exec_result = _execute( repository_ctx, hasher_command + ["--argsfile", repository_ctx.path("hasher_argsfile")], - progress_message = "Calculating sha256 checksums.." + progress_message = "Calculating sha256 checksums..", ) if exec_result.return_code != 0: fail("Error while obtaining the sha256 checksums: " + exec_result.stderr) @@ -1083,8 +1083,8 @@ def _coursier_fetch_impl(repository_ctx): repository_ctx.file( "unsorted_deps.json", content = "{dependency_tree_json}".format( - dependency_tree_json = dependency_tree_json - ) + dependency_tree_json = dependency_tree_json, + ), ) repository_ctx.template( "pin.sh", diff --git a/examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export/BUILD b/examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export/BUILD index c16f6861c..3cd705d20 100644 --- a/examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export/BUILD +++ b/examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export/BUILD @@ -1,4 +1,4 @@ -load("@rules_jvm_external//:defs.bzl", "artifact", "java_export") +load("@rules_jvm_external//:defs.bzl", "artifact") java_library( name = "export", diff --git a/examples/protobuf-java/WORKSPACE b/examples/protobuf-java/WORKSPACE index 7e0ede81c..a662f0848 100644 --- a/examples/protobuf-java/WORKSPACE +++ b/examples/protobuf-java/WORKSPACE @@ -15,8 +15,6 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - http_archive( name = "rules_proto", sha256 = "73ebe9d15ba42401c785f9d0aeebccd73bd80bf6b8ac78f74996d31f2c0ad7a6", diff --git a/examples/simple/BUILD b/examples/simple/BUILD index 7682cc81d..666639674 100644 --- a/examples/simple/BUILD +++ b/examples/simple/BUILD @@ -1,5 +1,3 @@ -load("@rules_jvm_external//:defs.bzl", "artifact") - android_library( name = "my_lib", exports = [ diff --git a/examples/spring_boot/WORKSPACE b/examples/spring_boot/WORKSPACE index b7dabf860..ae9408ff0 100644 --- a/examples/spring_boot/WORKSPACE +++ b/examples/spring_boot/WORKSPACE @@ -22,11 +22,11 @@ maven_install( "org.springframework:spring-web:5.1.5.RELEASE", ], fetch_sources = True, - version_conflict_policy = "pinned", maven_install_json = "//:maven_install.json", repositories = [ "https://repo1.maven.org/maven2", ], + version_conflict_policy = "pinned", ) load("@maven//:defs.bzl", "pinned_maven_install") diff --git a/private/coursier_utilities.bzl b/private/coursier_utilities.bzl index 741558580..6c5745a86 100644 --- a/private/coursier_utilities.bzl +++ b/private/coursier_utilities.bzl @@ -47,6 +47,7 @@ def strip_packaging_and_classifier(coord): def strip_packaging_and_classifier_and_version(coord): coordinates = coord.split(":") + # Support for simplified versionless groupId:artifactId coordinate format if len(coordinates) == 2: return ":".join(coordinates) diff --git a/private/dependency_tree_parser.bzl b/private/dependency_tree_parser.bzl index fc85a5b12..57846ccb5 100644 --- a/private/dependency_tree_parser.bzl +++ b/private/dependency_tree_parser.bzl @@ -174,10 +174,10 @@ def _generate_imports(repository_ctx, dep_tree, explicit_artifacts, neverlink_ar if srcjar_paths != None and target_label in srcjar_paths: target_import_string.append("\tsrcjar = \"%s\"," % srcjar_paths[target_label]) if jetify and repository_ctx.attr.use_starlark_android_rules: - # Because jetifier.bzl cannot conditionally import the starlark rules - # (it's not a generated file), inject the aar_import rule from - # the load statement in the generated file. - target_import_string.append("\t_aar_import = aar_import,") + # Because jetifier.bzl cannot conditionally import the starlark rules + # (it's not a generated file), inject the aar_import rule from + # the load statement in the generated file. + target_import_string.append("\t_aar_import = aar_import,") # 4. Generate the deps attribute with references to other target labels. # @@ -232,7 +232,6 @@ def _generate_imports(repository_ctx, dep_tree, explicit_artifacts, neverlink_ar target_import_string.append("\t\t\"maven_url=%s\"," % artifact["url"]) target_import_string.append("\t],") - # 6. If `neverlink` is True in the artifact spec, add the neverlink attribute to make this artifact # available only as a compile time dependency. # diff --git a/private/rules/artifact.bzl b/private/rules/artifact.bzl index efd97f6b1..a80d58910 100644 --- a/private/rules/artifact.bzl +++ b/private/rules/artifact.bzl @@ -1,4 +1,3 @@ -load("//:specs.bzl", "parse") load("//private:constants.bzl", "DEFAULT_REPOSITORY_NAME") load("//private:coursier_utilities.bzl", "strip_packaging_and_classifier_and_version") @@ -18,8 +17,8 @@ def _make_artifact_str(artifact_obj): coord = [artifact_obj["group"], artifact_obj["artifact"]] if "version" in artifact_obj: if "packaging" in artifact_obj: - coord.extend([artifact_obj["packaging"]]) - if "classifier" in artifact_obj: - coord.extend([artifact_obj["classifier"]]) + coord.extend([artifact_obj["packaging"]]) + if "classifier" in artifact_obj: + coord.extend([artifact_obj["classifier"]]) coord.extend([artifact_obj["version"]]) return ":".join(coord) diff --git a/private/rules/has_maven_deps.bzl b/private/rules/has_maven_deps.bzl index 5943f9aa0..53765c8e8 100644 --- a/private/rules/has_maven_deps.bzl +++ b/private/rules/has_maven_deps.bzl @@ -152,11 +152,11 @@ def _has_maven_deps_impl(target, ctx): transitive_exports_from_exports = depset() if hasattr(ctx.rule.attr, "exports"): - transitive_exports_from_exports = depset( - [e.label for e in ctx.rule.attr.exports], - transitive = - [e[MavenInfo].transitive_exports for e in ctx.rule.attr.exports] - ) + transitive_exports_from_exports = depset( + [e.label for e in ctx.rule.attr.exports], + transitive = + [e[MavenInfo].transitive_exports for e in ctx.rule.attr.exports], + ) info = MavenInfo( coordinates = coordinates, @@ -165,7 +165,7 @@ def _has_maven_deps_impl(target, ctx): artifact_infos = depset(direct = artifact_infos), dep_infos = depset(direct = dep_infos, transitive = [i.dep_infos for i in all_infos]), label_to_javainfo = label_to_javainfo, - transitive_exports = depset(transitive = [transitive_exports_from_exports] + transitive_exports_from_deps) + transitive_exports = depset(transitive = [transitive_exports_from_exports] + transitive_exports_from_deps), ) return [ diff --git a/private/rules/jetifier.bzl b/private/rules/jetifier.bzl index 273b99477..f26470752 100644 --- a/private/rules/jetifier.bzl +++ b/private/rules/jetifier.bzl @@ -1,4 +1,4 @@ -load("//:specs.bzl", "maven", "parse") +load("//:specs.bzl", "parse") load(":jetifier_maven_map.bzl", "jetifier_maven_map") load(":jvm_import.bzl", "jvm_import") @@ -37,7 +37,7 @@ jetify = rule( implementation = _jetify_impl, ) -def jetify_aar_import(name, aar, _aar_import=None, visibility=None, **kwargs): +def jetify_aar_import(name, aar, _aar_import = None, visibility = None, **kwargs): jetify( name = "jetified_" + name, srcs = [aar], @@ -45,7 +45,7 @@ def jetify_aar_import(name, aar, _aar_import=None, visibility=None, **kwargs): ) if not _aar_import: - _aar_import = native.aar_import + _aar_import = native.aar_import _aar_import( name = name, @@ -54,7 +54,7 @@ def jetify_aar_import(name, aar, _aar_import=None, visibility=None, **kwargs): **kwargs ) -def jetify_jvm_import(name, jars, visibility=None, **kwargs): +def jetify_jvm_import(name, jars, visibility = None, **kwargs): jetify( name = "jetified_" + name, srcs = jars, diff --git a/private/rules/jvm_import.bzl b/private/rules/jvm_import.bzl index 934f4784f..f42d59a98 100644 --- a/private/rules/jvm_import.bzl +++ b/private/rules/jvm_import.bzl @@ -33,6 +33,7 @@ def _jvm_import_impl(ctx): compilejar = ctx.actions.declare_file("header_" + injar.basename, sibling = injar) args = ctx.actions.args() args.add_all(["--source", outjar, "--output", compilejar]) + # We need to remove the `Class-Path` entry since bazel 4.0.0 forces `javac` # to run `-Xlint:path` no matter what other flags are passed. Bazel # manages the classpath for us, so the `Class-Path` manifest entry isn't diff --git a/private/rules/maven_install.bzl b/private/rules/maven_install.bzl index 738e36309..b15746b79 100644 --- a/private/rules/maven_install.bzl +++ b/private/rules/maven_install.bzl @@ -1,4 +1,4 @@ -load("//:coursier.bzl", "coursier_fetch", "pinned_coursier_fetch", "DEFAULT_AAR_IMPORT_LABEL") +load("//:coursier.bzl", "DEFAULT_AAR_IMPORT_LABEL", "coursier_fetch", "pinned_coursier_fetch") load("//:specs.bzl", "json", "parse") load("//private:constants.bzl", "DEFAULT_REPOSITORY_NAME") load("//private:dependency_tree_parser.bzl", "JETIFY_INCLUDE_LIST_JETIFY_ALL") @@ -147,4 +147,3 @@ def maven_install( fail_if_repin_required = fail_if_repin_required, duplicate_version_warning = duplicate_version_warning, ) - diff --git a/private/rules/maven_project_jar.bzl b/private/rules/maven_project_jar.bzl index 5e3c1fb6a..42e1423b6 100644 --- a/private/rules/maven_project_jar.bzl +++ b/private/rules/maven_project_jar.bzl @@ -29,8 +29,8 @@ def _maven_project_jar_impl(ctx): ctx.executable._merge_jars, artifact_jars, depset(transitive = - [ji.transitive_runtime_jars for ji in info.dep_infos.to_list()] + - [jar[JavaInfo].transitive_runtime_jars for jar in ctx.attr.deploy_env]).to_list(), + [ji.transitive_runtime_jars for ji in info.dep_infos.to_list()] + + [jar[JavaInfo].transitive_runtime_jars for jar in ctx.attr.deploy_env]).to_list(), bin_jar, ) diff --git a/tests/integration/BUILD b/tests/integration/BUILD index 4eb678be0..9744d1945 100644 --- a/tests/integration/BUILD +++ b/tests/integration/BUILD @@ -30,10 +30,10 @@ genquery( genrule( name = "testonly-deps-sorted", + testonly = 1, srcs = [":testonly-deps"], outs = ["testonly-deps-sorted.txt"], cmd = "cat $< | sort > $@", - testonly = 1, ) diff_test( @@ -60,10 +60,10 @@ genquery( genrule( name = "version-interval-deps-sorted", + testonly = 1, srcs = [":version_interval_deps"], outs = ["version-interval-deps-sorted.txt"], cmd = "cat $< | sort > $@", - testonly = 1, ) diff_test( diff --git a/tests/integration/java_export/BUILD b/tests/integration/java_export/BUILD index 4bfae3bf2..0abb58930 100644 --- a/tests/integration/java_export/BUILD +++ b/tests/integration/java_export/BUILD @@ -67,7 +67,7 @@ java_export( ], javadocopts = [ "-windowtitle", - "My Deploy Env" + "My Deploy Env", ], maven_coordinates = "com.example:lib:1.0.0", deps = [ @@ -78,10 +78,10 @@ java_export( java_export( name = "without-docs", srcs = ["Main.java"], + maven_coordinates = "com.example:no-docs:1.0.0", tags = [ "no-javadocs", ], - maven_coordinates = "com.example:no-docs:1.0.0", deps = [ ":dep", ], diff --git a/tests/unit/artifact_utilities_test.bzl b/tests/unit/artifact_utilities_test.bzl index d574e12f1..67db34c73 100644 --- a/tests/unit/artifact_utilities_test.bzl +++ b/tests/unit/artifact_utilities_test.bzl @@ -1,7 +1,6 @@ load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") load("//private:artifact_utilities.bzl", "deduplicate_and_sort_artifacts") - def _empty_test_impl(ctx): env = unittest.begin(ctx) asserts.equals(env, {"dependencies": []}, deduplicate_and_sort_artifacts({"dependencies": []}, [], [], False)) @@ -21,7 +20,7 @@ def _one_artifact_no_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [], - } + }, ], "version": "0.1.0", } @@ -30,7 +29,7 @@ def _one_artifact_no_exclusions_test_impl(ctx): "group": "com.google.guava", "artifact": "guava", "version": "27.0-jre", - "exclusions": [] + "exclusions": [], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, [], False) @@ -71,7 +70,7 @@ def _one_artifact_no_exclusions_with_nulls_test_impl(ctx): "group": "com.google.guava", "artifact": "guava", "version": "27.0-jre", - "exclusions": [] + "exclusions": [], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, [], False) @@ -104,7 +103,7 @@ def _one_artifact_duplicate_no_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [], - } + }, ], "version": "0.1.0", } @@ -113,7 +112,7 @@ def _one_artifact_duplicate_no_exclusions_test_impl(ctx): "group": "com.google.guava", "artifact": "guava", "version": "27.0-jre", - "exclusions": [] + "exclusions": [], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, [], False) @@ -145,7 +144,7 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "*:*" + "*:*", ], }, { @@ -154,10 +153,10 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "org.codehaus.mojo:animal-sniffer-annotations", - "com.google.j2objc:j2objc-annotations", - ] - } + "org.codehaus.mojo:animal-sniffer-annotations", + "com.google.j2objc:j2objc-annotations", + ], + }, ], "version": "0.1.0", } @@ -167,8 +166,8 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "artifact": "guava", "version": "27.0-jre", "exclusions": [ - {"group": "*", "artifact": "*"} - ] + {"group": "*", "artifact": "*"}, + ], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, [], False) @@ -193,7 +192,7 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "*:*" + "*:*", ], }, { @@ -202,10 +201,10 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "org.codehaus.mojo:animal-sniffer-annotations", - "com.google.j2objc:j2objc-annotations", - ] - } + "org.codehaus.mojo:animal-sniffer-annotations", + "com.google.j2objc:j2objc-annotations", + ], + }, ], "version": "0.1.0", } @@ -217,7 +216,7 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): "exclusions": [ {"group": "org.codehaus.mojo", "artifact": "animal-sniffer-annotations"}, {"group": "com.google.j2objc", "artifact": "j2objc-annotations"}, - ] + ], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, [], False) @@ -227,7 +226,7 @@ def _one_artifact_duplicate_matches_exclusions_test_impl(ctx): asserts.equals( env, sorted_dep_tree["dependencies"][0]["exclusions"], - ["org.codehaus.mojo:animal-sniffer-annotations", "com.google.j2objc:j2objc-annotations"] + ["org.codehaus.mojo:animal-sniffer-annotations", "com.google.j2objc:j2objc-annotations"], ) return unittest.end(env) @@ -253,7 +252,7 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "*:*" + "*:*", ], }, { @@ -262,11 +261,11 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "org.codehaus.mojo:animal-sniffer-annotations", - "com.google.j2objc:j2objc-annotations", - "org.checkerframework:checker-qual", - ] - } + "org.codehaus.mojo:animal-sniffer-annotations", + "com.google.j2objc:j2objc-annotations", + "org.checkerframework:checker-qual", + ], + }, ], "version": "0.1.0", } @@ -276,8 +275,8 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "artifact": "guava", "version": "27.0-jre", "exclusions": [ - {"group": "*", "artifact": "*"} - ] + {"group": "*", "artifact": "*"}, + ], }] excluded_artifacts = [ @@ -307,7 +306,7 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "*:*" + "*:*", ], }, { @@ -316,11 +315,11 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "directDependencies": [], "dependencies": [], "exclusions": [ - "org.codehaus.mojo:animal-sniffer-annotations", - "com.google.j2objc:j2objc-annotations", - "org.checkerframework:checker-qual", - ] - } + "org.codehaus.mojo:animal-sniffer-annotations", + "com.google.j2objc:j2objc-annotations", + "org.checkerframework:checker-qual", + ], + }, ], "version": "0.1.0", } @@ -332,7 +331,7 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "exclusions": [ {"group": "org.codehaus.mojo", "artifact": "animal-sniffer-annotations"}, {"group": "com.google.j2objc", "artifact": "j2objc-annotations"}, - ] + ], }] sorted_dep_tree = deduplicate_and_sort_artifacts(dep_tree, artifacts, excluded_artifacts, False) @@ -346,7 +345,7 @@ def _one_artifact_duplicate_with_global_exclusions_test_impl(ctx): "org.codehaus.mojo:animal-sniffer-annotations", "com.google.j2objc:j2objc-annotations", "org.checkerframework:checker-qual", - ] + ], ) return unittest.end(env) diff --git a/tests/unit/coursier_test.bzl b/tests/unit/coursier_test.bzl index f7731bb3f..72da1978f 100644 --- a/tests/unit/coursier_test.bzl +++ b/tests/unit/coursier_test.bzl @@ -10,7 +10,6 @@ load( "split_url", infer = "infer_artifact_path_from_primary_and_repos", ) -load("//:specs.bzl", "maven") ALL_TESTS = [] diff --git a/tests/unit/coursier_utilities_test.bzl b/tests/unit/coursier_utilities_test.bzl index b98386251..aefac5aaf 100644 --- a/tests/unit/coursier_utilities_test.bzl +++ b/tests/unit/coursier_utilities_test.bzl @@ -80,6 +80,7 @@ def _strip_packaging_and_classifier_and_version_test_impl(ctx): "groupId:artifactId", strip_packaging_and_classifier_and_version("groupId:artifactId:pom:sources:version"), ) + # versionless coordinates aren't standard Maven coordinates but are useful for the artifact() macro asserts.equals( env, diff --git a/tests/unit/manifest_stamp/BUILD b/tests/unit/manifest_stamp/BUILD index 8b920a9ec..3b7b7eba9 100644 --- a/tests/unit/manifest_stamp/BUILD +++ b/tests/unit/manifest_stamp/BUILD @@ -1,6 +1,5 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@bazel_skylib//rules:diff_test.bzl", "diff_test") -load("@rules_jvm_external//settings:stamp_manifest.bzl", "stamp_manifest") build_test( name = "artifacts", diff --git a/third_party/bazel_json/lib/json_parser.bzl b/third_party/bazel_json/lib/json_parser.bzl index 503870bd8..e9141477f 100644 --- a/third_party/bazel_json/lib/json_parser.bzl +++ b/third_party/bazel_json/lib/json_parser.bzl @@ -1,4 +1,4 @@ -# This is a Skylark/Java adaptation of http://www.json.org/JSON_checker/ a +# This is a Starlark/Java adaptation of http://www.json.org/JSON_checker/ a # push-down automaton originally design to check JSON syntax, attempting to be # extended to a full JSON parser. # @@ -749,7 +749,7 @@ _MAX_INT = 2147483647 _MIN_INT = -2147483647 def _tokenize_int(collected_chars): - # Drops precision due to no decimals in Skylark. + # Drops precision due to no decimals in Starlark. # # https://tools.ietf.org/html/rfc8259#section-6 # "This specification allows implementations to set limits on the range diff --git a/third_party/bazel_json/lib/json_rules.bzl b/third_party/bazel_json/lib/json_rules.bzl index 32e98fa21..0aee0826c 100644 --- a/third_party/bazel_json/lib/json_rules.bzl +++ b/third_party/bazel_json/lib/json_rules.bzl @@ -1,6 +1,6 @@ # IGNORE THIS FILE... it was probably a bad idea.... -# Skylark reference: +# Starlark reference: # https://docs.bazel.build/versions/master/skylark/language.html # https://docs.bazel.build/versions/master/skylark/lib/globals.html # https://docs.bazel.build/versions/master/skylark/lib/attr.html diff --git a/third_party/bazel_json/test/BUILD b/third_party/bazel_json/test/BUILD index 157b49605..0360dc517 100644 --- a/third_party/bazel_json/test/BUILD +++ b/third_party/bazel_json/test/BUILD @@ -10,7 +10,6 @@ load( "json_type_string", ) load(":json_parse_tests.bzl", "json_parse_test_suite") -load("//lib:json_parser.bzl", "json_parse") json_parse_test_suite()