Skip to content

Commit

Permalink
Make it easier to parse rules_go's .bzl files with Go Starlark (#4140)
Browse files Browse the repository at this point in the history
**What type of PR is this?**

Feature

**What does this PR do? Why is it needed?**

I'm doing some experiments, where I'm trying to parse rules_go's source
code with Go Starlark so that I can analyze it. In the process I've
noticed that there are some small constructs that Go Starlark doesn't
seem to like. In both those cases It looks like Go Starlark works as
intended.

**Which issues(s) does this PR fix?**

n/a

**Other notes for review**
  • Loading branch information
EdSchouten authored Oct 9, 2024
1 parent 9741b36 commit 9c8c142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/private/rules/wrappers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def go_binary_macro(name, **kwargs):
# behaviour, so we forbid this.
fail("Cannot use select for go_binary with goos/goarch set, but {} was a select".format(key))

if kwargs.get("linkmode", default = LINKMODE_NORMAL) in LINKMODES_EXECUTABLE:
if kwargs.get("linkmode", LINKMODE_NORMAL) in LINKMODES_EXECUTABLE:
go_binary(name = name, **kwargs)
else:
go_non_executable_binary(name = name, **kwargs)
Expand Down

0 comments on commit 9c8c142

Please sign in to comment.