Skip to content

Commit

Permalink
Prepare to Push to BCR
Browse files Browse the repository at this point in the history
Last bit of housecleaning before attempting to push this version to the BCR. Primarily just updates examples/bzlmod/ to use clarodocs().

Updates the JS related Module deps to not be considered "dev" dependencies as they need to be available for downstream Modules depending on claro-lang.

Also fixes the stdlib/cache module so that it correctly builds.

Updates the examples/bzlmod/ project to manually place JS related Module deps since it looks like Bazel requires these to be direct deps of downstream projects since the clarodocs() macro references the repos but they aren't known to Bazel from the perspective of a downstream dependent apparently.

Updates tools/clarodocs/defs.bzl to use fully qualified `@claro-lang` prefix on all targets listed there since it's referenced by the clarodocs_rules.bzl downstream users will be using.
  • Loading branch information
JasonSteving99 committed Apr 5, 2024
1 parent 7fd8342 commit 97a97c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module(
name = "claro-lang",
repo_name = "claro-lang",
version = "0.1.502",
version = "0.1.503",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.0.1")
Expand Down
8 changes: 7 additions & 1 deletion examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
module(name = "example-claro-module")

bazel_dep(name = "claro-lang", version = "0.1.502")
bazel_dep(name = "claro-lang", version = "0.1.503")

# NOTE: These "dev dependencies" are only necessary if you'd like to use ClaroDocs to visualize
# Claro programs as a local dev server. With these dependencies added, you should be able to
# `load("@claro-lang//tools/clarodocs/generator:clarodocs_rules.bzl", "clarodocs")` in your
# BUILD files. Then: `clarodocs(name = ..., root = ":some_claro_binary")` targets can be run.
bazel_dep(name = "aspect_bazel_lib", version = "2.0.1", dev_dependency = True)
bazel_dep(name = "aspect_rules_js", version = "1.38.0", dev_dependency = True)
16 changes: 8 additions & 8 deletions tools/clarodocs/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ SRC_PATTERNS = [
]

RUNTIME_DEPS = [
"//tools/clarodocs:runtime_deps",
"//tools/clarodocs:node_modules/react-dom",
"//tools/clarodocs:node_modules/react",
"//tools/clarodocs:node_modules/web-vitals",
"//tools/clarodocs/src:assets",
"//tools/clarodocs/src",
"//tools/clarodocs/public",
"@claro-lang//tools/clarodocs:runtime_deps",
"@claro-lang//tools/clarodocs:node_modules/react-dom",
"@claro-lang//tools/clarodocs:node_modules/react",
"@claro-lang//tools/clarodocs:node_modules/web-vitals",
"@claro-lang//tools/clarodocs/src:assets",
"@claro-lang//tools/clarodocs/src",
"@claro-lang//tools/clarodocs/public",
]

# Filename conventions described at
Expand All @@ -35,5 +35,5 @@ TEST_PATTERNS = [
# Partially-apply our (generated) .swcrc config file to the swc starlark function
TRANSPILER = partial.make(
swc,
swcrc = "//tools/clarodocs:.swcrc",
swcrc = "@claro-lang//tools/clarodocs:.swcrc",
)

0 comments on commit 97a97c7

Please sign in to comment.