Skip to content

Commit

Permalink
Merge pull request #246 from aherrmann/struct-has-no-methods
Browse files Browse the repository at this point in the history
Use `json.encode` instead of struct method.
  • Loading branch information
aherrmann authored Mar 22, 2024
2 parents 0319ab3 + edbb216 commit 6b622c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zig/private/settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _settings_impl(ctx):
)

settings_json = ctx.actions.declare_file(ctx.label.name + ".json")
ctx.actions.write(settings_json, settings_info.to_json(), is_executable = False)
ctx.actions.write(settings_json, json.encode(settings_info), is_executable = False)

default_info = DefaultInfo(
files = depset([settings_json]),
Expand Down
2 changes: 1 addition & 1 deletion zig/private/zig_target_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _zig_target_toolchain(ctx):
)

target_json = ctx.actions.declare_file(ctx.label.name + ".json")
ctx.actions.write(target_json, target_info.to_json(), is_executable = False)
ctx.actions.write(target_json, json.encode(target_info), is_executable = False)

template_variables = platform_common.TemplateVariableInfo({
"ZIG_TARGET": target,
Expand Down

0 comments on commit 6b622c8

Please sign in to comment.