-
-
Notifications
You must be signed in to change notification settings - Fork 723
go: support "all:" prefix for "go:embed" directives #3455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fmeum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
On last thing: I just noticed that the Go docs only ever mention files starting with . and _ - do you know whether some/_hidden/file would be included also without all:... with the standard Go toolchain?
The Go docs seem to be correct! Any directories are always included (including those starting with |
|
A correct implementation should closely follow https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/load/pkg.go;l=2045;drc=2f2c5e41e7728cae99abd14e8bd5ffcfebf9df8e I do want to get there but I feel like we would need to change the implementation more drastically to get it to be correct. Additional edge cases I found:
I don't have the time available to implement this behavior correctly. |
|
Thanks for collecting the pointers, that's already very helpful. Given that you uncovered a number of places in which we (unknowingly) deviate from the native toolchain, let's just keep the scope of this PR limited to How do you feel about doing the following as part of this PR?
Let me know if you think that you won't have the time for it and we can consider merging as is. |
I'll do that. Thanks for the quick responses! |
|
…ng embedded Also added TODOs documenting deviations from the native toolchain implementation
|
I implemented excludes for ".bzr", ".hg", ".git", and ".svn" and added TODOs.
This works in the same way that it does for the native toolchain. |
|
Thanks! I added the links to the comments. This is good to go now. |
* Handle "all:" prefix for go:embed * lint go/tools/builders * embedcfg: prevent bad names including folders from known VCS from being embedded Also added TODOs documenting deviations from the native toolchain implementation * Apply suggestions from code review --------- Co-authored-by: Fabian Meumertzheim <[email protected]>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.38.1` -> `v0.39.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go</summary> ### [`v0.39.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.39.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.38.1...v0.39.0) #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "6b65cb7917b4d1709f9410ffe00ecf3e160edf674b78c54a894471320862184f", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.2") #### What's Changed - Make the toolchain's `go` binary available as a target by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3429](https://togithub.com/bazelbuild/rules_go/pull/3429) - add bazel test rule for excluded packages in popular_repos by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - change build test name from 'need_test' to 'build_only' by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3449](https://togithub.com/bazelbuild/rules_go/pull/3449) - fix a grammer issue by [@​Longchuanzheng](https://togithub.com/Longchuanzheng) in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - go: support "all:" prefix for "go:embed" directives by [@​malt3](https://togithub.com/malt3) in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - Remove `filter_transition_label` workaround by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3438](https://togithub.com/bazelbuild/rules_go/pull/3438) - Extract generated code from BUILD.toolchains.bazel into a macro by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3439](https://togithub.com/bazelbuild/rules_go/pull/3439) - bzlmod: Prohibit undesirable SDK registrations in non-root modules by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3440](https://togithub.com/bazelbuild/rules_go/pull/3440) - update links to gazelle docs by [@​garymm](https://togithub.com/garymm) in [https://github.com/bazelbuild/rules_go/pull/3464](https://togithub.com/bazelbuild/rules_go/pull/3464) - bzlmod: Improve SDK registration by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3443](https://togithub.com/bazelbuild/rules_go/pull/3443) - Expand locations in `x_defs` values by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3473](https://togithub.com/bazelbuild/rules_go/pull/3473) - Make `//go` usable in scripts run with `bazel run` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3474](https://togithub.com/bazelbuild/rules_go/pull/3474) - Avoid repository rule restarts in go_sdk by [@​jfirebaugh](https://togithub.com/jfirebaugh) in [https://github.com/bazelbuild/rules_go/pull/3478](https://togithub.com/bazelbuild/rules_go/pull/3478) - bzlmod: Test BCR test module on all platforms by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3479](https://togithub.com/bazelbuild/rules_go/pull/3479) - Improve error when linkmode requires cgo by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3482](https://togithub.com/bazelbuild/rules_go/pull/3482) - Rename `error` script in `go_cross_binary` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3481](https://togithub.com/bazelbuild/rules_go/pull/3481) - Only infer platforms from crosstool/cpu if at default by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3485](https://togithub.com/bazelbuild/rules_go/pull/3485) - Add missing darwin CPUs to apple matcher by [@​keith](https://togithub.com/keith) in [https://github.com/bazelbuild/rules_go/pull/3461](https://togithub.com/bazelbuild/rules_go/pull/3461) - Canonicalize tags before transitioning by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3484](https://togithub.com/bazelbuild/rules_go/pull/3484) - Keep build tags that affect the stdlib build by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3488](https://togithub.com/bazelbuild/rules_go/pull/3488) - Quote `CC` if it contains whitespace by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3491](https://togithub.com/bazelbuild/rules_go/pull/3491) - Disable cgo by default with unsupported compilers by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3493](https://togithub.com/bazelbuild/rules_go/pull/3493) - Only install `runtime/cgo` with `pure = False` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3492](https://togithub.com/bazelbuild/rules_go/pull/3492) - Use `ctx.readdir` instead of `ls` for SDK platform detection by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3497](https://togithub.com/bazelbuild/rules_go/pull/3497) #### New Contributors - [@​uberzzr](https://togithub.com/uberzzr) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - [@​Longchuanzheng](https://togithub.com/Longchuanzheng) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - [@​malt3](https://togithub.com/malt3) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - [@​tyler-french](https://togithub.com/tyler-french) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3495](https://togithub.com/bazelbuild/rules_go/pull/3495) **Full Changelog**: bazel-contrib/rules_go@v0.38.0...v0.39.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/cgrindel/bazel-starlib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.38.1` -> `v0.39.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go</summary> ### [`v0.39.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.39.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.38.1...v0.39.0) #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "6b65cb7917b4d1709f9410ffe00ecf3e160edf674b78c54a894471320862184f", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.2") #### What's Changed - Make the toolchain's `go` binary available as a target by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3429](https://togithub.com/bazelbuild/rules_go/pull/3429) - add bazel test rule for excluded packages in popular_repos by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - change build test name from 'need_test' to 'build_only' by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3449](https://togithub.com/bazelbuild/rules_go/pull/3449) - fix a grammer issue by [@​Longchuanzheng](https://togithub.com/Longchuanzheng) in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - go: support "all:" prefix for "go:embed" directives by [@​malt3](https://togithub.com/malt3) in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - Remove `filter_transition_label` workaround by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3438](https://togithub.com/bazelbuild/rules_go/pull/3438) - Extract generated code from BUILD.toolchains.bazel into a macro by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3439](https://togithub.com/bazelbuild/rules_go/pull/3439) - bzlmod: Prohibit undesirable SDK registrations in non-root modules by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3440](https://togithub.com/bazelbuild/rules_go/pull/3440) - update links to gazelle docs by [@​garymm](https://togithub.com/garymm) in [https://github.com/bazelbuild/rules_go/pull/3464](https://togithub.com/bazelbuild/rules_go/pull/3464) - bzlmod: Improve SDK registration by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3443](https://togithub.com/bazelbuild/rules_go/pull/3443) - Expand locations in `x_defs` values by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3473](https://togithub.com/bazelbuild/rules_go/pull/3473) - Make `//go` usable in scripts run with `bazel run` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3474](https://togithub.com/bazelbuild/rules_go/pull/3474) - Avoid repository rule restarts in go_sdk by [@​jfirebaugh](https://togithub.com/jfirebaugh) in [https://github.com/bazelbuild/rules_go/pull/3478](https://togithub.com/bazelbuild/rules_go/pull/3478) - bzlmod: Test BCR test module on all platforms by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3479](https://togithub.com/bazelbuild/rules_go/pull/3479) - Improve error when linkmode requires cgo by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3482](https://togithub.com/bazelbuild/rules_go/pull/3482) - Rename `error` script in `go_cross_binary` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3481](https://togithub.com/bazelbuild/rules_go/pull/3481) - Only infer platforms from crosstool/cpu if at default by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3485](https://togithub.com/bazelbuild/rules_go/pull/3485) - Add missing darwin CPUs to apple matcher by [@​keith](https://togithub.com/keith) in [https://github.com/bazelbuild/rules_go/pull/3461](https://togithub.com/bazelbuild/rules_go/pull/3461) - Canonicalize tags before transitioning by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3484](https://togithub.com/bazelbuild/rules_go/pull/3484) - Keep build tags that affect the stdlib build by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3488](https://togithub.com/bazelbuild/rules_go/pull/3488) - Quote `CC` if it contains whitespace by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3491](https://togithub.com/bazelbuild/rules_go/pull/3491) - Disable cgo by default with unsupported compilers by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3493](https://togithub.com/bazelbuild/rules_go/pull/3493) - Only install `runtime/cgo` with `pure = False` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3492](https://togithub.com/bazelbuild/rules_go/pull/3492) - Use `ctx.readdir` instead of `ls` for SDK platform detection by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3497](https://togithub.com/bazelbuild/rules_go/pull/3497) #### New Contributors - [@​uberzzr](https://togithub.com/uberzzr) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - [@​Longchuanzheng](https://togithub.com/Longchuanzheng) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - [@​malt3](https://togithub.com/malt3) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - [@​tyler-french](https://togithub.com/tyler-french) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3495](https://togithub.com/bazelbuild/rules_go/pull/3495) **Full Changelog**: bazel-contrib/rules_go@v0.38.0...v0.39.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/cgrindel/swift_bazel). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.38.1` -> `v0.39.0` | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bazelbuild/rules_go</summary> ### [`v0.39.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.39.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.38.1...v0.39.0) #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "6b65cb7917b4d1709f9410ffe00ecf3e160edf674b78c54a894471320862184f", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.2") #### What's Changed - Make the toolchain's `go` binary available as a target by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3429](https://togithub.com/bazelbuild/rules_go/pull/3429) - add bazel test rule for excluded packages in popular_repos by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - change build test name from 'need_test' to 'build_only' by [@​uberzzr](https://togithub.com/uberzzr) in [https://github.com/bazelbuild/rules_go/pull/3449](https://togithub.com/bazelbuild/rules_go/pull/3449) - fix a grammer issue by [@​Longchuanzheng](https://togithub.com/Longchuanzheng) in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - go: support "all:" prefix for "go:embed" directives by [@​malt3](https://togithub.com/malt3) in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - Remove `filter_transition_label` workaround by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3438](https://togithub.com/bazelbuild/rules_go/pull/3438) - Extract generated code from BUILD.toolchains.bazel into a macro by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3439](https://togithub.com/bazelbuild/rules_go/pull/3439) - bzlmod: Prohibit undesirable SDK registrations in non-root modules by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3440](https://togithub.com/bazelbuild/rules_go/pull/3440) - update links to gazelle docs by [@​garymm](https://togithub.com/garymm) in [https://github.com/bazelbuild/rules_go/pull/3464](https://togithub.com/bazelbuild/rules_go/pull/3464) - bzlmod: Improve SDK registration by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3443](https://togithub.com/bazelbuild/rules_go/pull/3443) - Expand locations in `x_defs` values by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3473](https://togithub.com/bazelbuild/rules_go/pull/3473) - Make `//go` usable in scripts run with `bazel run` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3474](https://togithub.com/bazelbuild/rules_go/pull/3474) - Avoid repository rule restarts in go_sdk by [@​jfirebaugh](https://togithub.com/jfirebaugh) in [https://github.com/bazelbuild/rules_go/pull/3478](https://togithub.com/bazelbuild/rules_go/pull/3478) - bzlmod: Test BCR test module on all platforms by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3479](https://togithub.com/bazelbuild/rules_go/pull/3479) - Improve error when linkmode requires cgo by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3482](https://togithub.com/bazelbuild/rules_go/pull/3482) - Rename `error` script in `go_cross_binary` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3481](https://togithub.com/bazelbuild/rules_go/pull/3481) - Only infer platforms from crosstool/cpu if at default by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3485](https://togithub.com/bazelbuild/rules_go/pull/3485) - Add missing darwin CPUs to apple matcher by [@​keith](https://togithub.com/keith) in [https://github.com/bazelbuild/rules_go/pull/3461](https://togithub.com/bazelbuild/rules_go/pull/3461) - Canonicalize tags before transitioning by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3484](https://togithub.com/bazelbuild/rules_go/pull/3484) - Keep build tags that affect the stdlib build by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3488](https://togithub.com/bazelbuild/rules_go/pull/3488) - Quote `CC` if it contains whitespace by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3491](https://togithub.com/bazelbuild/rules_go/pull/3491) - Disable cgo by default with unsupported compilers by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3493](https://togithub.com/bazelbuild/rules_go/pull/3493) - Only install `runtime/cgo` with `pure = False` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3492](https://togithub.com/bazelbuild/rules_go/pull/3492) - Use `ctx.readdir` instead of `ls` for SDK platform detection by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3497](https://togithub.com/bazelbuild/rules_go/pull/3497) #### New Contributors - [@​uberzzr](https://togithub.com/uberzzr) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3447](https://togithub.com/bazelbuild/rules_go/pull/3447) - [@​Longchuanzheng](https://togithub.com/Longchuanzheng) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3451](https://togithub.com/bazelbuild/rules_go/pull/3451) - [@​malt3](https://togithub.com/malt3) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3455](https://togithub.com/bazelbuild/rules_go/pull/3455) - [@​tyler-french](https://togithub.com/tyler-french) made their first contribution in [https://github.com/bazelbuild/rules_go/pull/3495](https://togithub.com/bazelbuild/rules_go/pull/3495) **Full Changelog**: bazel-contrib/rules_go@v0.38.0...v0.39.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/kreempuff/rules_unreal_engine). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9-->
* Handle "all:" prefix for go:embed * lint go/tools/builders * embedcfg: prevent bad names including folders from known VCS from being embedded Also added TODOs documenting deviations from the native toolchain implementation * Apply suggestions from code review --------- Co-authored-by: Fabian Meumertzheim <[email protected]>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Implements the "all:" prefix for
//go:embeddirectives. From Go docs:Which issues(s) does this PR fix?
Fixes #3441
Other notes for review