From 1173c1486b38e80026d206ae1c6872bfc5c4dc3c Mon Sep 17 00:00:00 2001 From: Jason Steving <32336750+JasonSteving99@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:52:05 -0800 Subject: [PATCH] Add claro-lang@0.1.320 to BCR (#1094) * Test adding Claro Module to BCR * Test adding Claro Module to BCR * Add workspace.bzlmod patch * move metadata.json * try claro version 0.1.299 with MODULE.bazel in source archive * try claro version 0.1.299 with MODULE.bazel in source archive * try claro version 0.1.299 with MODULE.bazel in source archive * try claro version 0.1.301 with MODULE.bazel in source archive * try claro version 0.1.302 with MODULE.bazel in source archive * try claro version 0.1.302 with MODULE.bazel in source archive * try claro version 0.1.302 with MODULE.bazel in source archive * try claro version 0.1.302 with MODULE.bazel in source archive * try claro version 0.1.307 with MODULE.bazel in source archive * try claro version 0.1.309 with MODULE.bazel in source archive * try claro version 0.1.310 with MODULE.bazel in source archive * try claro version 0.1.310 with MODULE.bazel in source archive * try claro version 0.1.310 with MODULE.bazel in source archive * try claro version 0.1.310 with MODULE.bazel in source archive * Setup example hello world module * Setup example hello world module * Setup example hello world module * Setup example hello world module * try claro version 0.1.310 with MODULE.bazel in source archive * Clean branch. * Add claro-lang@0.1.316 * Setup example hello world module * Clean branch. * Clean branch. * Add platforms to presubmit.yml * Drop unsupported platforms from presubmit.yml * Add patch for trailing newline in examples/bzlmod/.bazelrc * Fix example_bzlmod_dot_bazelrc.patch file to drop warning about no newline to fix http_archive patch in https://buildkite.com/bazel/bcr-presubmit/builds/2422\#018b962c-d859-4f2b-ab62-7055d450767d * Fix example_bzlmod_dot_bazelrc.patch file to drop warning about no newline to fix http_archive patch in https://buildkite.com/bazel/bcr-presubmit/builds/2422\#018b962c-d859-4f2b-ab62-7055d450767d * Add claro-lang@0.1.320 to BCR Rather than 0.1.316 This is just to attempt to finally sidestep the issues with working through the BCR's presubmit tests being unable to consistently apply a patch to the .bazelrc file that didn't have a trailing newline that it expected. Literally the only appreciable difference between 0.1.320 and 0.1.316 is the addition of this trailing newline so that this patch isn't needed at all. * Add claro-lang@0.1.320 to BCR Rather than 0.1.316 --- modules/claro-lang/0.1.320/MODULE.bazel | 76 ++++++++++++++++++++++++ modules/claro-lang/0.1.320/presubmit.yml | 30 ++++++++++ modules/claro-lang/0.1.320/source.json | 4 ++ modules/claro-lang/metadata.json | 17 ++++++ 4 files changed, 127 insertions(+) create mode 100644 modules/claro-lang/0.1.320/MODULE.bazel create mode 100644 modules/claro-lang/0.1.320/presubmit.yml create mode 100644 modules/claro-lang/0.1.320/source.json create mode 100644 modules/claro-lang/metadata.json diff --git a/modules/claro-lang/0.1.320/MODULE.bazel b/modules/claro-lang/0.1.320/MODULE.bazel new file mode 100644 index 00000000000..610870e2b02 --- /dev/null +++ b/modules/claro-lang/0.1.320/MODULE.bazel @@ -0,0 +1,76 @@ +module( + name = "claro-lang", + repo_name = "claro-lang", + version = "0.1.320", +) + +bazel_dep(name = "bazel_skylib", version = "1.4.2") +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "rules_jvm_external", version = "5.3") +# -- bazel_dep definitions -- # + +# TODO(steving) For now, I'm re-exporting the maven module extension from @rules_jvm_external via my own .bzl file +# TODO(steving) literally just to avoid the unavoidable warning message: +# TODO(steving) "The maven repository 'maven' is used in two different bazel modules, originally in 'claro-lang' and now in 'protobuf'" +# TODO(steving) Apparently this is a known issue: https://bazelbuild.slack.com/archives/CEH3YH9RC/p1694506396048019 +# TODO(steving) Eventually, I'm hoping that Bzlmod will mature enough that this workaround can be dropped. +#maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven = use_extension(":maven_extension.bzl", "maven") +maven.install( + artifacts = + # First, I'll hardcode the maven artifacts that are needed for the jflex_rules + [ + # JFLEX_ARTIFACTS + "de.jflex:jflex:jar:1.9.1", + "com.github.vbmacher:java-cup-runtime:jar:11b-20160615-1", + # THIRD_PARTY_ARTIFACTS + "com.github.vbmacher:java-cup:jar:11b-20160615", + ] + + [ + "com.github.pcj:google-options:jar:1.0.0", + "com.google.auto.value:auto-value:1.5.3", + "com.google.guava:guava:jar:32.1.2-jre", + "com.google.protobuf:protobuf-java-util:3.24.3", + "com.googlecode.lanterna:lanterna:3.1.1", + "com.squareup.okhttp3:okhttp:4.11.0", + # Not using latest retrofit 2.9.0 because it seems there's a JDK warning of illegal reflection in retrofit2. + # The maintainers responded to this calling it something they explicitly won't fix since it's just a warning + # but I think that for now it makes Claro look bad, so I'm intentionally downgrading in the meantime until + # this is resolved. Re: https://github.com/square/retrofit/issues/3341 + "com.squareup.retrofit2:retrofit:2.7.2", + "com.google.code.gson:gson:2.10.1", + + ############################################################################################################ + # BEGIN ACTIVE J + # These deps come in a group, so if the version number ever gets bumped, must do it as a whole. + ############################################################################################################ + "io.activej:activej-common:5.4.3", + "io.activej:activej-eventloop:5.4.3", + "io.activej:activej-http:5.4.3", + "io.activej:activej-promise:5.4.3", + ############################################################################################################ + # END ACTIVE J + ############################################################################################################ + + # This addresses unwanted missing StaticLoggerBinder warning logs from SLF4J. This shouldn't be necessary + # anymore once Claro has proper logging support. See: https://www.slf4j.org/codes.html#StaticLoggerBinder + "org.slf4j:slf4j-nop:2.0.7", + ], +# lock_file = "//:maven_install.json", + lock_file = "//:rules_jvm_external~5.3~maven~maven_install.json", + repositories = [ + "https://jcenter.bintray.com/", + "https://maven.google.com", + "https://repo1.maven.org/maven2", + ], + version_conflict_policy = "pinned", +) +# Update pinned Maven deps using the following command. +# bazel run @unpinned_maven//:pin --enable_bzlmod +use_repo(maven, "maven", "unpinned_maven") +# End of extension `maven` + +non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps") +use_repo(non_module_deps, "jflex_rules") +use_repo(non_module_deps, "bootstrapping_claro_compiler_tarfile") +# End of extension `non_module_deps` diff --git a/modules/claro-lang/0.1.320/presubmit.yml b/modules/claro-lang/0.1.320/presubmit.yml new file mode 100644 index 00000000000..54cb84abf24 --- /dev/null +++ b/modules/claro-lang/0.1.320/presubmit.yml @@ -0,0 +1,30 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + build_targets: + - '@claro-lang//src/java/com/claro:claro_compiler_binary' + - '@claro-lang//src/java/com/claro/stdlib/claro/files:files' + - '@claro-lang//src/java/com/claro/stdlib/claro/futures:futures' + - '@claro-lang//src/java/com/claro/stdlib/claro/http:http' + - '@claro-lang//src/java/com/claro/stdlib/claro/lists:lists' + - '@claro-lang//src/java/com/claro/stdlib/claro/maps:maps' + - '@claro-lang//src/java/com/claro/stdlib/claro/sets:sets' +bcr_test_module: + module_path: examples/bzlmod + matrix: + platform: + - debian10 + - ubuntu2004 + - macos + tasks: + run_test_module: + name: Run test module + platform: ${{ platform }} + build_targets: + - '//hello_world:hello_world_binary' diff --git a/modules/claro-lang/0.1.320/source.json b/modules/claro-lang/0.1.320/source.json new file mode 100644 index 00000000000..c4203827e4c --- /dev/null +++ b/modules/claro-lang/0.1.320/source.json @@ -0,0 +1,4 @@ +{ + "url": "https://github.com/JasonSteving99/claro-lang/releases/download/v0.1.320/claro-source-archive-v0.1.320.zip", + "integrity": "sha256-q8nRNUNh3HFURSfEBSgJArwG377F0HxeZgjgN0sWwCY=" +} diff --git a/modules/claro-lang/metadata.json b/modules/claro-lang/metadata.json new file mode 100644 index 00000000000..b41c3084d9e --- /dev/null +++ b/modules/claro-lang/metadata.json @@ -0,0 +1,17 @@ +{ + "homepage": "clarolang.com", + "maintainers": [ + { + "email": "jasonmail99+bcr@gmail.com", + "github": "JasonSteving99", + "name": "Jason Steving" + } + ], + "repository": [ + "github:JasonSteving99/claro-lang" + ], + "versions": [ + "0.1.320" + ], + "yanked_versions": {} +}