Skip to content

Commit ee1c4d6

Browse files
authored
chore(deps): update Aspect CLI (#3)
* Update ci.yaml * breaking changes * module files
1 parent 3b5ca71 commit ee1c4d6

File tree

7 files changed

+20
-23
lines changed

7 files changed

+20
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,10 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v5
2424
- uses: bazel-contrib/setup-bazel@0.15.0
25-
- name: Install Aspect CLI
26-
uses: jaxxstorm/action-install-gh-release@v2.1.0
27-
with:
28-
repo: aspect-build/aspect-cli
29-
tag: 2025.42.9
30-
asset-name: aspect-cli
31-
platform: unknown_linux
32-
arch: x86_64
33-
extension-matching: disable
34-
rename-to: aspect
35-
chmod: 0755
25+
- run: |
26+
curl -LO https://github.com/aspect-build/aspect-cli/releases/download/v2025.46.20/aspect-cli-x86_64-unknown-linux-musl
27+
chmod +x aspect-cli-x86_64-unknown-linux-musl
28+
mv aspect-cli-x86_64-unknown-linux-musl /usr/local/bin/aspect
3629
- name: Test
3730
working-directory: example
3831
shell: sh

MODULE.aspect

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"Public API re-export"
2+
use_task("coverage.axl", "coverage")

coverage.axl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,25 @@ def impl(ctx) -> int:
1313

1414
lcov_build = ctx.bazel.build(
1515
"@lcov",
16-
events = True,
17-
bazel_flags = ["--build_runfile_links"],
16+
build_events = True,
17+
flags = ["--build_runfile_links"],
1818
)
1919

2020
lcov = runnable(ctx)
21-
for event in lcov_build.events():
21+
for event in lcov_build.build_events():
2222
lcov.event(event)
2323

24-
test = ctx.bazel.build(
24+
test = ctx.bazel.test(
2525
"//...",
26-
events = True,
27-
bazel_flags = [
26+
build_events = True,
27+
flags = [
2828
"--isatty=" + str(int(out.is_tty)),
2929
"--collect_code_coverage",
3030
],
31-
bazel_verb = "test"
3231
)
3332

3433
coverage_dat_files = []
35-
for event in test.events():
34+
for event in test.build_events():
3635
if event.kind == "test_result":
3736
coverage_dat_files.extend([
3837
f.file.removeprefix("file://")

example/.aspect/coverage.axl

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.aspect/runnable.axl

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/MODULE.aspect

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
axl_local_dep(
2+
name = "coverage",
3+
path = "..",
4+
auto_use_tasks = True,
5+
)

runnable.axl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _determine_entrypoint(state: struct) -> str | None:
2727
break
2828
return entrypoint
2929

30-
def _spawn(ctx: task_context, state: struct, args: list[str]) -> std.process.child:
30+
def _spawn(ctx: TaskContext, state: struct, args: list[str]) -> std.process.Child:
3131
entrypoint = _determine_entrypoint(state)
3232
runfiles = entrypoint + ".runfiles"
3333
return ctx.std.process.command(entrypoint)\
@@ -40,7 +40,7 @@ def _spawn(ctx: task_context, state: struct, args: list[str]) -> std.process.chi
4040
.args(args) \
4141
.spawn()
4242

43-
def runnable(ctx) -> struct:
43+
def runnable(ctx: TaskContext) -> struct:
4444
state = struct(
4545
ctx = ctx,
4646
target = "@@lcov+//:lcov", # TODO(alexeagle): we can assume there's only one target

0 commit comments

Comments
 (0)