bazel-contrib / rules_go

Go rules for Bazel
Apache License 2.0
1.39k stars 664 forks source link

Make it easier to parse rules_go's .bzl files with Go Starlark #4140

Closed EdSchouten closed 1 month ago

EdSchouten commented 1 month ago

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

EdSchouten commented 1 month ago

Dear lord. Bazel itself doesn't support \u, even though it was added to Starlark three years ago:

https://github.com/bazelbuild/starlark/commit/7f53743af10f87f0915a2e941baf2e795ea8f3e3

Let me remove the commit that was converting \x to \u for now.