Skip to content

Commit

Permalink
chore: update hidden params
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Oct 19, 2024
1 parent c650b6d commit 0dca953
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
4 changes: 1 addition & 3 deletions toolchains/rover/macros.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,14 @@ def sdl_impl(ctx: AnalysisContext) -> list[DefaultInfo]:
rover_toolchain.output_sdl[DefaultInfo].default_outputs,
"--generator-bin",
ctx.attrs.generator[RunInfo],
hidden = ctx.attrs.deps_srcs,
)
for arg in ctx.attrs.args:
cmd.add("--arg", arg)
cmd.add(
out.as_output()
)

for deps_src in ctx.attrs.deps_srcs:
cmd.hidden(deps_src)

ctx.actions.run(cmd, category = "sdl")
return [DefaultInfo(default_output = out)]

Expand Down
2 changes: 1 addition & 1 deletion toolchains/simple-pnpm/macros.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def build_node_modules_impl(ctx: AnalysisContext) -> list[DefaultInfo]:
cmd = cmd_args(
ctx.attrs._python_toolchain[PythonToolchainInfo].interpreter,
simple_pnpm_toolchain.build_node_modules[DefaultInfo].default_outputs,
hidden = [ctx.attrs.pnpm_lock, ctx.attrs.package_json]
)
cmd.add("--root-dir")
cmd.add(package_dir)

cmd.add(out.as_output())


ctx.actions.run(cmd, category = "pnpm", identifier = "install")

return [DefaultInfo(default_output = out)]
Expand Down
36 changes: 18 additions & 18 deletions toolchains/workspace-pnpm/macros.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def build_workspace_node_modules_impl(ctx: AnalysisContext) -> list[DefaultInfo]
cmd = cmd_args(
ctx.attrs._python_toolchain[PythonToolchainInfo].interpreter,
pnpm_toolchain.build_workspace_node_modules[DefaultInfo].default_outputs,
hidden = [ctx.attrs.pnpm_lock]
)
if ctx.attrs.root_workspace:
cmd.add("--package-dir")
Expand All @@ -149,7 +150,6 @@ def build_workspace_node_modules_impl(ctx: AnalysisContext) -> list[DefaultInfo]
cmd.add("--root-dir")
cmd.add(package_dir)
cmd.add(out.as_output())
cmd.hidden([ctx.attrs.pnpm_lock])

ctx.actions.run(cmd, category = "pnpm", identifier = "install")

Expand Down Expand Up @@ -187,6 +187,7 @@ def build_node_modules_impl(ctx: AnalysisContext) -> list[DefaultInfo]:
pnpm_toolchain.build_node_modules[DefaultInfo].default_outputs,
"--turbo-bin",
ctx.attrs.turbo_bin[RunInfo],
hidden = [ctx.attrs.workspace]
)

cmd.add("--package-dir")
Expand All @@ -199,7 +200,6 @@ def build_node_modules_impl(ctx: AnalysisContext) -> list[DefaultInfo]:

cmd.add(out.as_output())


ctx.actions.run(cmd, category = "pnpm", identifier = identifier + ctx.label.package)

return [DefaultInfo(default_output = out)]
Expand Down Expand Up @@ -1200,13 +1200,13 @@ fi

env_json = ctx.attrs.env_json if ctx.attrs.env_json else ""
args = cmd_args([
script,
ctx.label.package,
env_json,
ctx.attrs.command
])
args.hidden([ctx.attrs.deps])
args.hidden([ctx.attrs.srcs])
script,
ctx.label.package,
env_json,
ctx.attrs.command,
],
hidden=ctx.attrs.deps + ctx.attrs.srcs
)

return [DefaultInfo(), RunInfo(args = args)]

Expand Down Expand Up @@ -1249,13 +1249,13 @@ exec pnpm run --report-summary "$npm_run_command"
env_json = ctx.attrs.env_json if ctx.attrs.env_json else ""

run_cmd_args = cmd_args([
script,
ctx.label.package,
env_json,
ctx.attrs.command,
])
run_cmd_args.hidden([ctx.attrs.deps])
run_cmd_args.hidden([ctx.attrs.srcs])
script,
ctx.label.package,
env_json,
ctx.attrs.command,
],
hidden=ctx.attrs.deps + ctx.attrs.srcs
)
args_file = ctx.actions.write("args.txt", run_cmd_args)

return inject_test_run_info(
Expand Down Expand Up @@ -1392,14 +1392,14 @@ def graphql_codegen_impl(ctx: AnalysisContext) -> list[DefaultInfo]:
"--package-dir",
cmd_args([build_context.workspace_root, ctx.label.package], delimiter = "/"),
"--config",
ctx.attrs.config
ctx.attrs.config,
hidden=ctx.attrs.srcs
)
for schema in ctx.attrs.schemas:
cmd.add(
"--schema",
cmd_args(schema),
)
cmd.hidden([ctx.attrs.srcs])
cmd.add(out.as_output())

ctx.actions.run(cmd, category = "codegen")
Expand Down

0 comments on commit 0dca953

Please sign in to comment.