Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 151 additions & 0 deletions modules/io_bazel_rules_closure/1.0.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
module(
name = "io_bazel_rules_closure",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into the future, wouldn't stackb_rules_closure be a more meaningful name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for stackb_rules_closure

version = "1.0.0",
compatibility_level = 1,
)

# -------------------------------------------------------------------
# Direct Dependencies
# -------------------------------------------------------------------

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "build_stack_rules_proto", version = "4.1.0")
bazel_dep(name = "closure-templates", version = "1.0.1")
bazel_dep(name = "google_bazel_common", version = "0.0.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf_javascript", version = "0.0.0")
bazel_dep(name = "protobuf", version = "32.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_java", version = "8.16.1")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.5.3")
bazel_dep(name = "rules_tsickle", version = "1.0.0")
bazel_dep(name = "rules_web_testing_java", version = "0.4.1")
bazel_dep(name = "rules_webtesting", version = "0.4.1")

# -------------------------------------------------------------------
# Overrides
# -------------------------------------------------------------------

# NOTE: cannot upgrade past protobuf editions...
#
# Commit: 263ee701cba6b75e1f8eddad5adcdf74718318b1
# Date: 2025-10-08 21:32:22 +0000 UTC
# URL: https://github.com/protocolbuffers/protobuf-javascript/commit/263ee701cba6b75e1f8eddad5adcdf74718318b1
#
# remove writeZigzagVarint64BigInt
# Size: 401599 (402 kB)
archive_override(
module_name = "protobuf_javascript",
sha256 = "8a50071fbca5e4a26361e6c9d81dd842207f0005f7cc1720226f20c25a231805",
strip_prefix = "protobuf-javascript-263ee701cba6b75e1f8eddad5adcdf74718318b1",
urls = ["https://github.com/protocolbuffers/protobuf-javascript/archive/263ee701cba6b75e1f8eddad5adcdf74718318b1.tar.gz"],
patches = ["closure/protobuf/protobuf_javascript.patch"],
patch_strip = 1,
)

# -------------------------------------------------------------------
# additional http dependencies
# -------------------------------------------------------------------

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

http_file(
name = "fonts_noto_mono_deb",
sha256 = "71ff715cf50a74a8cc11b02e7c906b69a242d3d677e739e0b2d18cd23b7de375",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/f/fonts-noto/fonts-noto-mono_20161116-1_all.deb",
"http://http.us.debian.org/debian/pool/main/f/fonts-noto/fonts-noto-mono_20161116-1_all.deb",
],
)

http_file(
name = "libexpat_amd64_deb",
sha256 = "682d2321297c56dec327770efa986d4bef43a5acb1a5528b3098e05652998fae",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/e/expat/libexpat1_2.1.0-6+deb8u3_amd64.deb",
"http://http.us.debian.org/debian/pool/main/e/expat/libexpat1_2.1.0-6+deb8u3_amd64.deb",
],
)

http_file(
name = "libpng_amd64_deb",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these debs prod.dependencies? I'm asking since there is a steady volume of security issues found in these libraries and having them enter your build as an http_file dep of a ruleset would be unexpected at least for me.

Are there BCR versions of these libs that you could depend on instead?

sha256 = "a57b6d53169c67a7754719f4b742c96554a18f931ca5b9e0408fb6502bb77e80",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u2_amd64.deb",
"http://http.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u2_amd64.deb",
],
)

http_file(
name = "libfontconfig_amd64_deb",
sha256 = "0bb54d61c13aa5b5253cb5e08aaca0dfc4c626a05ee30f51d0e3002cda166fec",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/f/fontconfig/libfontconfig1_2.11.0-6.3+deb8u1_amd64.deb",
"http://http.us.debian.org/debian/pool/main/f/fontconfig/libfontconfig1_2.11.0-6.3+deb8u1_amd64.deb",
],
)

http_file(
name = "libfreetype_amd64_deb",
sha256 = "80184d932f9b0acc130af081c60a2da114c7b1e7531c18c63174498fae47d862",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/f/freetype/libfreetype6_2.5.2-3+deb8u1_amd64.deb",
"http://http.us.debian.org/debian/pool/main/f/freetype/libfreetype6_2.5.2-3+deb8u1_amd64.deb",
],
)

http_file(
name = "fonts_noto_hinted_deb",
sha256 = "a71fcee2bc7820fc4e0c780bb9c7c6db8364fd2c5bac20867c5c33eed470dc51",
urls = [
"https://mirror.bazel.build/http.us.debian.org/debian/pool/main/f/fonts-noto/fonts-noto-hinted_20161116-1_all.deb",
"http://http.us.debian.org/debian/pool/main/f/fonts-noto/fonts-noto-hinted_20161116-1_all.deb",
],
)

platform_http_file = use_repo_rule("//closure/private:platform_http_file.bzl", "platform_http_file")

platform_http_file(
name = "phantomjs",
amd64_sha256 = "86dd9a4bf4aee45f1a84c9f61cf1947c1d6dce9b9e8d2a907105da7852460d2f",
amd64_urls = [
"https://mirror.bazel.build/bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2",
"https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2",
],
macos_sha256 = "538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1",
macos_urls = [
"https://mirror.bazel.build/bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip",
"https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip",
],
)

# -------------------------------------------------------------------
# maven configuration
# -------------------------------------------------------------------

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"args4j:args4j:2.33",
"com.google.closure-stylesheets:closure-stylesheets:1.5.0",
"com.google.dagger:dagger-producers:2.43.2",
"com.google.jimfs:jimfs:1.1",
"net.java.dev.javacc:javacc:7.0.13",
"org.jsoup:jsoup:1.16.1",
"org.seleniumhq.selenium:selenium-remote-driver:4.27.0",
"org.seleniumhq.selenium:selenium-api:4.27.0",
"org.seleniumhq.selenium:selenium-support:4.27.0",
],
)
maven.artifact(
artifact = "closure-compiler",
group = "com.google.javascript",
version = "v20250402", # Using maven.artifact here because the version number vxxxxx cannot parsed correctly.
)
maven.override(
coordinates = "javacc:javacc",
target = "@maven//:net_java_dev_javacc_javacc", # javacc:javacc was not updated since 2008 and relocated to net.java.dev.javacc
)
use_repo(maven, "maven")
17 changes: 17 additions & 0 deletions modules/io_bazel_rules_closure/1.0.0/attestations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"mediaType": "application/vnd.build.bazel.registry.attestation+json;version=1.0.0",
"attestations": {
"source.json": {
"url": "https://github.com/stackb/rules_closure/releases/download/v1.0.0/source.json.intoto.jsonl",
"integrity": "sha256-Cnen9+csJY3IDFGnAbzWwMSa8pHSSvwNBzU0SF/6JZw="
},
"MODULE.bazel": {
"url": "https://github.com/stackb/rules_closure/releases/download/v1.0.0/MODULE.bazel.intoto.jsonl",
"integrity": "sha256-8ryg6IOdgeQVRNEbuSJp931zxg8qY5OoXmrWqeIiqMk="
},
"rules_closure-v1.0.0.tar.gz": {
"url": "https://github.com/stackb/rules_closure/releases/download/v1.0.0/rules_closure-v1.0.0.tar.gz.intoto.jsonl",
"integrity": "sha256-a3/Cz6B/1NkUF/xxMiZW/mNTKtCeRYdiqpH8VEmHAgE="
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
===================================================================
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -1,7 +1,7 @@
module(
name = "io_bazel_rules_closure",
- version = "0.0.0",
+ version = "1.0.0",
compatibility_level = 1,
)

# -------------------------------------------------------------------
12 changes: 12 additions & 0 deletions modules/io_bazel_rules_closure/1.0.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bcr_test_module:
module_path: "."
matrix:
platform: ["debian11", "ubuntu2404", "macos"]
bazel: [7.x, 8.x]
tasks:
run_tests:
name: "Build module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
9 changes: 9 additions & 0 deletions modules/io_bazel_rules_closure/1.0.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-4X8l+riZJQA0IO5FU+xylmWmXsWo6eOzFRd7I2MucIg=",
"strip_prefix": "rules_closure-v1.0.0",
"url": "https://github.com/stackb/rules_closure/releases/download/v1.0.0/rules_closure-v1.0.0.tar.gz",
"patches": {
"module_dot_bazel_version.patch": "sha256-JwYf8afo3I1dqq4EVKIv+9TUVYdW1IVE7CkCjl2ObzE="
},
"patch_strip": 1
}
18 changes: 18 additions & 0 deletions modules/io_bazel_rules_closure/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"homepage": "https://github.com/stackb/rules_closure",
"maintainers": [
{
"name": "Paul Cody",
"email": "pcj@stack.build",
"github": "pcj",
"github_user_id": 50580
}
],
"repository": [
"github:stackb/rules_closure"
],
"versions": [
"1.0.0"
],
"yanked_versions": {}
}
Loading