Skip to content

Commit

Permalink
Merge branch 'main' into versioned
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 9, 2023
2 parents 426ed77 + b424565 commit 8fc057b
Show file tree
Hide file tree
Showing 30 changed files with 630 additions and 263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/[email protected]
- name: Self-hosted Renovate
uses: renovatebot/github-action@v34.92.1
uses: renovatebot/github-action@v34.94.0
with:
configurationFile: renovate.json
token: ${{ secrets.GH_PAT }}
Expand Down
8 changes: 4 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports_files(
".eslintrc.json",
"css_loader.d.ts",
"yarn.lock",
".git"
".git",
],
visibility = ["//visibility:public"],
)
Expand All @@ -63,6 +63,6 @@ copy_to_bin(

renovate_config_validator_test(
name = "validate_renovate_config_test",
data = [ "renovate.json" ],
args = [ "$(location renovate.json)" ]
)
args = ["$(location renovate.json)"],
data = ["renovate.json"],
)
4 changes: 2 additions & 2 deletions Cargo.Bazel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,9 @@ dependencies = [

[[package]]
name = "swc_common"
version = "0.29.26"
version = "0.29.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "288ede106f4d2c98ba2a4d95d43679d5e0c7d93a75c45745039c01dfd9da437d"
checksum = "90a2c285d33b47a5e532a662c178dc91956534ff52207892918d3034a534ae12"
dependencies = [
"ahash",
"ast_node",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
clap = { version = "4.0.32", features = ["derive"] }
swc_common = "0.29.26"
swc_common = "0.29.27"
sha2 = "0.10.6"
hex = "0.4.3"
swc_css_codegen = "0.137.3"
Expand Down
7 changes: 3 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,14 @@ swc_register_toolchains(
swc_version = LATEST_VERSION,
)


load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

rules_rust_dependencies()

rust_register_toolchains(edition = "2021")

# this rule is really weird. see docs https://github.com/bazelbuild/rules_rust/blob/main/crate_universe/private/crates_repository.bzl#L137
load("@rules_rust//crate_universe:defs.bzl", "crates_repository", "crate")
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")

crates_repository(
name = "cargo",
Expand All @@ -139,11 +138,11 @@ crates_repository(
# Should match the version represented by the currently registered `rust_toolchain`.
rust_version = "1.60.0",
)

load("@cargo//:defs.bzl", "crate_repositories")

crate_repositories()

load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")

rust_analyzer_dependencies()
rust_analyzer_dependencies()
1 change: 0 additions & 1 deletion bin/host/rs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ alias(
name = "rustfmt",
actual = "@rules_rust//:rustfmt",
)

10 changes: 5 additions & 5 deletions bin/linux/pulumi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ alias(

sh_test(
name = "smoke",
data = [ ":pulumi" ],
srcs = [ "smoke.sh" ],
srcs = ["smoke.sh"],
data = [":pulumi"],
env = {
# the below should become rlocationpath when https://github.com/bazelbuild/bazel/pull/16668 has a release
"PULUMI_BIN": "$(rootpath :pulumi)"
"PULUMI_BIN": "$(rootpath :pulumi)",
},
deps = [
"@bazel_tools//tools/bash/runfiles",
]
)
],
)
1 change: 0 additions & 1 deletion bzl/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,3 @@ exports_files(glob(["**/*"], exclude_directories=0))
sha256 = "aaaa4b9591a5dad8d8907ae2dbe6e0eb49e6314946ce4c7149241648e56a1277",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.16.1/rules_rust-v0.16.1.tar.gz"],
)

26 changes: 13 additions & 13 deletions cargo-bazel-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "7696823679b4539dff9cf2785f134bd80ae24b9818ac974a460ef20f681cf739",
"checksum": "1f82b1b58eb3939c896debe1bdfafb73bd7e7dfcfccf26d4c72b5f96ac041ffb",
"crates": {
"Inflector 0.11.4": {
"name": "Inflector",
Expand Down Expand Up @@ -2423,7 +2423,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down Expand Up @@ -4610,13 +4610,13 @@
},
"license": "Apache-2.0"
},
"swc_common 0.29.26": {
"swc_common 0.29.27": {
"name": "swc_common",
"version": "0.29.26",
"version": "0.29.27",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/swc_common/0.29.26/download",
"sha256": "288ede106f4d2c98ba2a4d95d43679d5e0c7d93a75c45745039c01dfd9da437d"
"url": "https://crates.io/api/v1/crates/swc_common/0.29.27/download",
"sha256": "90a2c285d33b47a5e532a662c178dc91956534ff52207892918d3034a534ae12"
}
},
"targets": [
Expand Down Expand Up @@ -4725,7 +4725,7 @@
],
"selects": {}
},
"version": "0.29.26"
"version": "0.29.27"
},
"license": "Apache-2.0"
},
Expand Down Expand Up @@ -4768,7 +4768,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
}
],
Expand Down Expand Up @@ -4836,7 +4836,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down Expand Up @@ -4963,7 +4963,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down Expand Up @@ -5034,7 +5034,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down Expand Up @@ -5093,7 +5093,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down Expand Up @@ -5152,7 +5152,7 @@
"target": "swc_atoms"
},
{
"id": "swc_common 0.29.26",
"id": "swc_common 0.29.27",
"target": "swc_common"
},
{
Expand Down
1 change: 0 additions & 1 deletion css/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ load("//rs/css/module:rules.bzl", "css_module_rule")
def css_module(name, srcs, **kwargs):
css_module_rule(name = name, srcs = srcs, **kwargs)


def _css_library_impl(ctx):
css_info = css_library_info(
srcs = depset(ctx.files.srcs),
Expand Down
15 changes: 7 additions & 8 deletions css/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ load("//ts:rules.bzl", "ts_project")

css_module(
name = "css",
srcs = [ "example.module.css" ]
srcs = ["example.module.css"],
)


ts_project(
name = "ts",
srcs = [ "example.ts" ],
data = [ "example.css" ],
ignores_lint = [ "example.ts" ]
srcs = ["example.ts"],
data = ["example.css"],
ignores_lint = ["example.ts"],
)

ts_project(
name = "importee",
srcs = [ "importee.ts" ],
deps = [":ts"]
)
srcs = ["importee.ts"],
deps = [":ts"],
)
2 changes: 1 addition & 1 deletion git/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Nothing here yet
# Nothing here yet
23 changes: 12 additions & 11 deletions git/rules.bzl
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
def git_commit_affecting_files(name, srcs = [], **kwargs):
native.filegroup(
name = name + "_srcs",
srcs = srcs
srcs = srcs,
)
native.genrule(
name = name,
srcs = [ "//:.git", name + "_srcs" ],
srcs = ["//:.git", name + "_srcs"],
cmd_bash = """
git log -n 1 --pretty=format:%H -- $(rootpaths :""" + name + """_srcs) > $@
""",
outs = [ name + ".gitref" ]
outs = [name + ".gitref"],
)

def source_files_for_rule(name, rule, **kwargs):
rulename = native.repository_name() + "//" + native.package_name() + rule
native.genquery(
name = name + "_labels",
expression = "filter(\"^//\", kind(\"source file\", deps(" + rulename + ")))",
scope = [ rulename ],
opts = [ ]
scope = [rulename],
opts = [],
)

native.genrule(
name = name,
srcs = [ name + "_labels" ],
srcs = [name + "_labels"],
# turn labels into paths (for whatever reason, genquery doesn't let you do this)
cmd_bash = "sed -r 's/\\/\\///;s/:/\\//g;s/^[\\/]+//' $< > $@",
outs = [ name + "_labels.out" ]
outs = [name + "_labels.out"],
)

def commit_affecting_rule(name, rule, **kwargs):
source_files_for_rule(
name = name + "_source_files", rule = rule, **kwargs
name = name + "_source_files",
rule = rule,
**kwargs
)

native.genrule(
name = name,
srcs = [ "//:.git", ":" + name + "_source_files" ],
srcs = ["//:.git", ":" + name + "_source_files"],
cmd_bash = """
git log -n 1 --pretty=format:%H -- $$(cat $(location :""" + name + "_source_files" + """)) > $@
""",
outs = [ name + ".gitref" ]
outs = [name + ".gitref"],
)

11 changes: 5 additions & 6 deletions git/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test")

git_commit_affecting_files(
name = "affected_files_basic_ref",
srcs = [ "abc.txt" ],
srcs = ["abc.txt"],
)


filegroup(
name = "test_file_group",
srcs = [ "abc.txt" ]
srcs = ["abc.txt"],
)

source_files_for_rule(
name = "test_source_files_for_rule_gen",
rule = ":test_file_group"
rule = ":test_file_group",
)

generated_file_test(
name = "source_files_for_rule_test",
src = "source_files_for_rule.golden",
generated = ":test_source_files_for_rule_gen",
src = "source_files_for_rule.golden"
)
)
2 changes: 1 addition & 1 deletion js/eslint/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# nothing here yet!
# nothing here yet!
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"d3-axis": "3.0.0",
"d3-scale": "4.0.2",
"diff": "5.1.0",
"esbuild": "0.16.15",
"esbuild": "0.16.16",
"esbuild-css-modules-plugin": "2.6.3",
"eslint": "8.31.0",
"eslint-config-next": "13.1.1",
Expand Down Expand Up @@ -95,7 +95,7 @@
"bazelisk": "npx --yes @bazel/bazelisk",
"build": "yarn run bazelisk build //...",
"test": "yarn run bazelisk run //bzl:affected_files",
"fix": "yarn run bazelisk run //:fix",
"fix": "yarn bazel run //:fix",
"dev": "yarn run ibazel --run_output --run_output_interactive=false test",
"pr": "gh pr create -f; gh pr merge -md --auto",
"repin": "CARGO_BAZEL_REPIN=1 yarn bazel sync --only=cargo"
Expand Down
3 changes: 1 addition & 2 deletions rs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package(default_visibility = ["//:__subpackages__"])


alias(
name = "rustfmt",
actual = "//bin/host/rs:rustfmt",
Expand All @@ -13,5 +12,5 @@ alias(

alias(
name = "gen_rust_project",
actual = "@rules_rust//tools/rust_analyzer:gen_rust_project"
actual = "@rules_rust//tools/rust_analyzer:gen_rust_project",
)
Loading

0 comments on commit 8fc057b

Please sign in to comment.