Skip to content

Commit d8af221

Browse files
authored
Fix issue 1345 and allow artifacts with classifier=native again (#1346)
1 parent 8b3053b commit d8af221

File tree

7 files changed

+46
-20
lines changed

7 files changed

+46
-20
lines changed

MODULE.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,15 @@ dev_maven.artifact(
610610
version = "v1-rev235-1.25.0",
611611
)
612612

613+
# https://github.com/bazelbuild/rules_jvm_external/issues/1345
614+
dev_maven.artifact(
615+
name = "regression_testing_coursier",
616+
artifact = "jffi",
617+
classifier = "native",
618+
group = "com.github.jnr",
619+
version = "1.3.13",
620+
)
621+
613622
# These artifacts helped discover limitations in the Maven resolver. Each
614623
# artifact listed here *must have* an accompanying issue. We build_test these
615624
# targets to ensure that they remain supported by the rule.

WORKSPACE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ maven_install(
281281
"com.github.spotbugs:spotbugs:4.7.0",
282282
# https://github.com/bazelbuild/rules_jvm_external/issues/1267
283283
"org.mockito:mockito-core:pom:3.3.3",
284+
# https://github.com/bazelbuild/rules_jvm_external/issues/1345
285+
maven.artifact(
286+
artifact = "jffi",
287+
classifier = "native",
288+
group = "com.github.jnr",
289+
version = "1.3.13",
290+
),
284291
],
285292
fail_if_repin_required = True,
286293
generate_compat_repositories = True,

private/coursier_utilities.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def strip_packaging_and_classifier(coord):
4848
unpacked_struct = unpack_coordinates(coord)
4949
unpacked = {} | struct_to_dict(unpacked_struct)
5050

51-
if unpacked.get("classifier", None) in ["sources", "native"]:
51+
if unpacked.get("classifier", None) in ["sources", "natives"]:
5252
unpacked["classifier"] = None
5353

5454
# Note that although "pom" is not a packaging type that Coursier CLI accepts,

private/lib/coordinates.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ SUPPORTED_PACKAGING_TYPES = [
22
"aar",
33
"bundle",
44
"dll",
5+
"dylib",
56
"eclipse-plugin",
67
"exe",
7-
"dylib",
88
"hk2-jar",
99
"jar",
1010
"json",

tests/custom_maven_install/regression_testing_coursier_install.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": -1504192575,
4-
"__RESOLVED_ARTIFACTS_HASH": 2021711580,
3+
"__INPUT_ARTIFACTS_HASH": 1215293307,
4+
"__RESOLVED_ARTIFACTS_HASH": -1385682992,
55
"artifacts": {
66
"android.arch.core:common": {
77
"shasums": {
@@ -375,6 +375,12 @@
375375
},
376376
"version": "1.1"
377377
},
378+
"com.github.jnr:jffi": {
379+
"shasums": {
380+
"native": "a38dd049951a27f7a423389fecf0195a5bd414f418e90f5ac9992652c22a5b8e"
381+
},
382+
"version": "1.3.13"
383+
},
378384
"com.github.luben:zstd-jni": {
379385
"shasums": {
380386
"jar": "ebefe5b8698a57c55c64a297eaf8ba931c2cbc7df5b72de38ac1d034372b46e6"
@@ -618,9 +624,9 @@
618624
},
619625
"com.nimbusds:nimbus-jose-jwt": {
620626
"shasums": {
621-
"jar": "f28dbd9ab128324f05050d76b78469d3a9cd83e0319aabc68d1c276e3923e13a"
627+
"jar": "960b978a6cd6cbc3319648adc73959789f6742a2bf1e8dd0c843dbc91624218a"
622628
},
623-
"version": "10.0.1"
629+
"version": "10.0.2"
624630
},
625631
"com.nimbusds:oauth2-oidc-sdk": {
626632
"shasums": {
@@ -6174,6 +6180,7 @@
61746180
"com.github.fommil.netlib:netlib-native_system-win-i686:jar:natives",
61756181
"com.github.fommil.netlib:netlib-native_system-win-x86_64:jar:natives",
61766182
"com.github.fommil:jniloader",
6183+
"com.github.jnr:jffi:jar:native",
61776184
"com.github.luben:zstd-jni",
61786185
"com.github.oshi:oshi-core",
61796186
"com.github.oshi:oshi-parent:pom",
@@ -6459,6 +6466,7 @@
64596466
"com.github.fommil.netlib:netlib-native_system-win-i686:jar:natives",
64606467
"com.github.fommil.netlib:netlib-native_system-win-x86_64:jar:natives",
64616468
"com.github.fommil:jniloader",
6469+
"com.github.jnr:jffi:jar:native",
64626470
"com.github.luben:zstd-jni",
64636471
"com.github.oshi:oshi-core",
64646472
"com.github.oshi:oshi-parent:pom",
@@ -6744,6 +6752,7 @@
67446752
"com.github.fommil.netlib:netlib-native_system-win-i686:jar:natives",
67456753
"com.github.fommil.netlib:netlib-native_system-win-x86_64:jar:natives",
67466754
"com.github.fommil:jniloader",
6755+
"com.github.jnr:jffi:jar:native",
67476756
"com.github.luben:zstd-jni",
67486757
"com.github.oshi:oshi-core",
67496758
"com.github.oshi:oshi-parent:pom",

tests/unit/build_tests/BUILD

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
77
build_test(
88
name = "all_artifacts",
99
targets = [
10-
"@regression_testing_coursier//:org_pantsbuild_jarjar",
10+
"@regression_testing_coursier//:build_buf_protovalidate",
11+
"@regression_testing_coursier//:ch_epfl_scala_compiler_interface",
12+
"@regression_testing_coursier//:com_fasterxml_jackson_jackson_bom",
1113
"@regression_testing_coursier//:com_github_fommil_netlib_all",
14+
"@regression_testing_coursier//:com_github_jnr_jffi_native",
15+
"@regression_testing_coursier//:com_google_protobuf_protoc_linux_x86_64",
16+
"@regression_testing_coursier//:com_google_protobuf_protoc_osx_aarch_64",
17+
"@regression_testing_coursier//:io_kubernetes_client_java",
18+
"@regression_testing_coursier//:io_netty_netty_tcnative_boringssl_static",
19+
"@regression_testing_coursier//:io_quarkus_http_quarkus_http_servlet",
1220
"@regression_testing_coursier//:nz_ac_waikato_cms_weka_weka_stable",
21+
"@regression_testing_coursier//:org_apache_flink_flink_test_utils_2_12",
1322
"@regression_testing_coursier//:org_eclipse_jetty_jetty_http_tests",
1423
"@regression_testing_coursier//:org_eclipse_jetty_orbit_javax_servlet",
15-
"@regression_testing_coursier//:org_apache_flink_flink_test_utils_2_12",
16-
"@regression_testing_coursier//:ch_epfl_scala_compiler_interface",
17-
"@regression_testing_coursier//:org_openjfx_javafx_base",
18-
"@regression_testing_coursier//:io_kubernetes_client_java",
19-
"@regression_testing_coursier//:io_quarkus_http_quarkus_http_servlet",
20-
"@regression_testing_coursier//:com_fasterxml_jackson_jackson_bom",
2124
"@regression_testing_coursier//:org_junit_junit_bom",
22-
"@regression_testing_coursier//:io_netty_netty_tcnative_boringssl_static",
23-
"@regression_testing_coursier//:com_google_protobuf_protoc_linux_x86_64",
24-
"@regression_testing_coursier//:com_google_protobuf_protoc_osx_aarch_64",
25-
"@regression_testing_coursier//:build_buf_protovalidate",
25+
"@regression_testing_coursier//:org_openjfx_javafx_base",
26+
"@regression_testing_coursier//:org_pantsbuild_jarjar",
2627
"@regression_testing_maven//:org_apache_parquet_parquet_common",
2728
],
2829
)

tests/unit/coordinates_test.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ def _unusual_version_format_impl(ctx):
121121
# Unusual version formats
122122
versions = [
123123
"809c471bf94f09bf4699ba53eb337768d5d9882f", # A git sha
124-
"FY21R16", # Based on year and release number
125-
"PRERELEASE", # Just a nice name
124+
"FY21R16", # Based on year and release number
125+
"PRERELEASE", # Just a nice name
126126
"VX.2.5.0.0", # Also seen in the wild
127-
"jcef-7f53d6d+cef-100.0.14+g4e5ba66+chromium-100.0.4896.75", # Seen in the wild
127+
"jcef-7f53d6d+cef-100.0.14+g4e5ba66+chromium-100.0.4896.75", # Seen in the wild
128128
]
129129

130130
for version in versions:

0 commit comments

Comments
 (0)