Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2dd0447
vendor closure-library
pcj Sep 22, 2025
e0be3eb
restore base.js from closure-library
pcj Sep 22, 2025
16e5cac
Checkpoint test app
pcj Sep 22, 2025
73c723b
checkpoint progress with protobuf, templates, and safevalues
pcj Sep 29, 2025
e49d0c3
safevalues full compile
pcj Sep 30, 2025
1186560
checkpoint all tests passing with closure-templates patches
pcj Oct 5, 2025
f93a8bd
Change rules_tickle to archive_override
pcj Oct 6, 2025
e055e14
Remove local overrides
pcj Oct 6, 2025
53ed55f
Use stricter .bazelrc flags
pcj Oct 6, 2025
fcbf712
Update workflows and bcr metadata
pcj Oct 6, 2025
34b0ab5
Add readme notice
pcj Oct 6, 2025
a065aa1
Rename @rules_closure -> @io_bazel_rules_closure
pcj Oct 6, 2025
e634475
Merge remote-tracking branch 'upstream/master'
pcj Oct 6, 2025
327c568
Remove repo_name(s)
pcj Oct 6, 2025
2cce0a7
Merge pull request #1 from stackb/pcj/merge-upstream-master
pcj Oct 6, 2025
9fcc6b7
Update README
pcj Oct 6, 2025
1d036a2
Merge pull request #2 from stackb/readme-namechange
pcj Oct 6, 2025
1b0e75d
Update to use patched protobuf-javascript
pcj Oct 8, 2025
e06a5cd
Merge pull request #3 from stackb/pcj/protobuf-javascript-patch
pcj Oct 8, 2025
f0575a5
Fix source.template.json
pcj Oct 8, 2025
34265a9
Update closure-templates to use published version
pcj Oct 8, 2025
88d6c5e
Merge pull request #4 from stackb/pcj/use-bcr-closure-templates
pcj Oct 8, 2025
4a82676
Bump build_stack_rules_proto
pcj Oct 9, 2025
daf623e
Use fully-qualified labels in bzl files
pcj Oct 9, 2025
70347d4
override bsrp
pcj Oct 9, 2025
06bcc2d
Use separate maven namespace for our deps
pcj Oct 9, 2025
37aa57e
Resolve maven dep issues
pcj Oct 9, 2025
c2231f4
checkpoint working state of safevalues
pcj Nov 3, 2025
408ec75
revert usage of closure_ts_archive (no longer needed)
pcj Nov 3, 2025
e4461f9
checkpoint
pcj Nov 8, 2025
690dc4b
Remove additional self-refs
pcj Nov 19, 2025
d759b14
Remove local_repo
pcj Nov 19, 2025
a86e7cd
Merge pull request #5 from stackb/pcj/label-fixes-wip
pcj Nov 19, 2025
c61fc20
fix: restore fully qualified path in bzl imports
pcj Nov 19, 2025
8e4d253
Rename module from io_bazel_rules_closure to stackb_rules_closure
pcj Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 12 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Compile/run with Java 21
build --java_language_version=21
# Enable Java 21
build --java_runtime_version=21
build --java_language_version=21
build --tool_java_language_version=21
build --tool_java_runtime_version=21

# Don't leak PATH and LD_LIBRARY_PATH into the build.
build --incompatible_strict_action_env

# To facilitate testing in bazelci incompatible flags
# @see https://github.com/bazelbuild/bazel/pull/26906#issue-3386957462
build --incompatible_autoload_externally=

# For bazel 8 BCR CI
build --incompatible_disable_native_repo_rules
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.4.1
3 changes: 0 additions & 3 deletions .bcr/config.yml

This file was deleted.

22 changes: 6 additions & 16 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
{
"homepage": "https://github.com/bazelbuild/rules_closure",
"homepage": "https://github.com/stackb/rules_closure",
"maintainers": [
{
"name": "Goktug Gokdogan",
"email": "goktug@google.com",
"github": "gkdn"
},
{
"name": "Julien Dramaix",
"email": "dramaix@google.com",
"github": "jDramaix"
},
{
"name": "Yuan Tian",
"email": "mollyibot@google.com",
"github": "mollyibot"
"name": "Paul Cody",
"email": "pcj@stack.build",
"github": "pcj"
}
],
"repository": [
"github:bazelbuild/rules_closure"
"github:stackb/rules_closure"
],
"versions": [],
"yanked_versions": {}
}
}
27 changes: 12 additions & 15 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
matrix:
platform:
- macos
- ubuntu2004
bazel:
- "7.x"
- "8.x"
tasks:
run_tests:
bazel: ${{ bazel }}
platform: ${{ platform }}
build_targets:
- "..."
test_targets:
- "..."
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:
- "//..."
2 changes: 1 addition & 1 deletion .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"strip_prefix": "{REPO}-{TAG}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz"
}
13 changes: 13 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Debug where options came from
build --announce_rc

# Don't rely on test logs being easily accessible from the test runner,
# though it makes the log noisier.
test --test_output=errors

# This directory is configured in GitHub actions to be persisted between runs.
build --disk_cache=$HOME/.cache/bazel
build --repository_cache=$HOME/.cache/bazel-repo

# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
test --test_env=XDG_CACHE_HOME
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

# Controls when the action will run.
on:
push:
branches: [master]
pull_request:
workflow_dispatch:

concurrency:
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.15.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: true
# Share repository cache between workflows.
repository-cache: true
- name: bazel test
run: >-
bazelisk
--bazelrc=.github/workflows/ci.bazelrc
--bazelrc=.bazelrc
test
//...
36 changes: 36 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Publish new releases to Bazel Central Registry.
name: Publish to BCR
on:
# Run the publish workflow after a successful release
# Will be triggered from the release.yaml workflow
workflow_call:
inputs:
tag_name:
required: true
type: string
secrets:
publish_token:
required: true
# In case of problems, let release engineers retry by manually dispatching
# the workflow from the GitHub UI
workflow_dispatch:
inputs:
tag_name:
description: git tag being released
required: true
type: string
jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.2.3
with:
draft: false
tag_name: ${{ inputs.tag_name }}
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
registry_fork: stackb/bazel-central-registry
permissions:
attestations: write
contents: write
id-token: write
secrets:
# Necessary to push to the BCR fork, and to open a pull request against a registry
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Cut a release whenever a new tag is pushed to the repo.
name: Release
on:
# Can be triggered from the tag.yaml workflow
workflow_call:
inputs:
tag_name:
required: true
type: string
secrets:
publish_token:
required: true
# Or, developers can manually push a tag from their clone
push:
tags:
- "v*.*.*"
permissions:
id-token: write
attestations: write
contents: write
jobs:
release:
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3
# uses: ./.github/workflows/release_ruleset.yaml # copied-from: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3
with:
prerelease: false
release_files: rules_closure-*.tar.gz
tag_name: ${{ inputs.tag_name || github.ref_name }}
secrets: inherit
publish:
needs: release
uses: ./.github/workflows/publish.yaml
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
secrets:
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

#!/usr/bin/env bash

set -o errexit -o nounset -o pipefail

# Set by GH actions, see
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
readonly TAG=$1
# The prefix is chosen to match what GitHub generates for source archives.
# This guarantees that users can easily switch from a released artifact to a source archive
# with minimal differences in their code (e.g. strip_prefix remains the same)
readonly PREFIX="rules_closure-${TAG}"
readonly ARCHIVE="${PREFIX}.tar.gz"

# NB: configuration for 'git archive' is in /.gitattributes
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')

# The stdout of this program will be used as the top of the release notes for this release.
cat << EOF
## Using bzlmod with Bazel 6 or later:

Add to your \`MODULE.bazel\` file:

\`\`\`starlark
bazel_dep(name = "rules_closure", version = "${TAG}")
\`\`\`
EOF
Loading
Loading