-
Notifications
You must be signed in to change notification settings - Fork 393
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
rule: add accessor for attribute comments #1700
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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!
This allows user to attach comments like "# do not sort" to the assignment expressions maintained by rule.go. rule.Format() calls into buildtools/build.Format() which in turn calls Rewrite(). Rewrite() by default sorts certain label arguments like "deps" and "hdrs". To preventing this sorting it is possible to provide the comment "# do not sort". However this comment needs to be attached to the assignment expression. In rule.go the assignment expressions are not exposed to the user, making it impossible to attach the comment to it. See bazel-contrib#237 (comment)
I just noticed that there is also #1394 which does exactly the same. |
@t-8ch While looking at the other PR, I noticed that the function should probably be called |
Change the name to be more consistent with the rest of the codebase as request in bazel-contrib#1700 (comment)
Change the name to be more consistent with the rest of the codebase as request in #1700 (comment)
This allows user to attach comments like "# do not sort" to the assignment expressions maintained by rule.go. rule.Format() calls into buildtools/build.Format() which in turn calls Rewrite(). Rewrite() by default sorts certain label arguments like "deps" and "hdrs". To preventing this sorting it is possible to provide the comment "# do not sort". However this comment needs to be attached to the assignment expression. In rule.go the assignment expressions are not exposed to the user, making it impossible to attach the comment to it. See bazel-contrib#237 (comment)
Change the name to be more consistent with the rest of the codebase as request in bazel-contrib#1700 (comment)
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.35.0` -> `v0.36.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary> ### [`v0.36.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.36.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.35.0...v0.36.0) #### What's Changed - Test with incompatible flags by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1696](https://togithub.com/bazelbuild/bazel-gazelle/pull/1696) - adding more default gazelle overrides by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1701](https://togithub.com/bazelbuild/bazel-gazelle/pull/1701) - rule: add accessor for attribute comments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - rule: set update flag on Rule.AddArg by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1702](https://togithub.com/bazelbuild/bazel-gazelle/pull/1702) - rule: rename GetAttrComments -> AttrComments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1703](https://togithub.com/bazelbuild/bazel-gazelle/pull/1703) - Remove some usage of deprecated ioutil by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - Allow passing Gazelle binary as a file by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1706](https://togithub.com/bazelbuild/bazel-gazelle/pull/1706) - rule: allow usage of Label struct with Rule APIs by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1705](https://togithub.com/bazelbuild/bazel-gazelle/pull/1705) - Remove ioutil usage by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1707](https://togithub.com/bazelbuild/bazel-gazelle/pull/1707) - doc: fix link to Swift gazelle plugin by [@​cgrindel](https://togithub.com/cgrindel) in [https://github.com/bazelbuild/bazel-gazelle/pull/1708](https://togithub.com/bazelbuild/bazel-gazelle/pull/1708) - Fix two shellcheck warnings in gazelle.bash.in by [@​mortenmj](https://togithub.com/mortenmj) in [https://github.com/bazelbuild/bazel-gazelle/pull/1710](https://togithub.com/bazelbuild/bazel-gazelle/pull/1710) - implement expression conversions via BzlExprValue interface by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1714](https://togithub.com/bazelbuild/bazel-gazelle/pull/1714) - update documentation for 0.35 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1712](https://togithub.com/bazelbuild/bazel-gazelle/pull/1712) - Update circl to v1.3.7 in tests by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1718](https://togithub.com/bazelbuild/bazel-gazelle/pull/1718) - rule: make value sorting configurable (alternative implementation) by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1719](https://togithub.com/bazelbuild/bazel-gazelle/pull/1719) - Add check in `update-repos` to omit reading `WORKSPACE` on bzlmod only repos. by [@​Megakuul](https://togithub.com/Megakuul) in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - Add default gazelle override for github.com/cockroachdb/errors. by [@​fardream](https://togithub.com/fardream) in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - README: fix resolve_regexp doc by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1729](https://togithub.com/bazelbuild/bazel-gazelle/pull/1729) - feat(bzlmod): allow `default_gazelle_attributes` for `go_deps` extension by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1716](https://togithub.com/bazelbuild/bazel-gazelle/pull/1716) - add new std_packages from go 1.22 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1740](https://togithub.com/bazelbuild/bazel-gazelle/pull/1740) - fix: wrap generation test labels with Label() by [@​pedrobarco](https://togithub.com/pedrobarco) in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - proto: Add Bzlmod support for well-known types by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1741](https://togithub.com/bazelbuild/bazel-gazelle/pull/1741) - Test BCR with Bazel 6.5.0 and 7.0.2 by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1744](https://togithub.com/bazelbuild/bazel-gazelle/pull/1744) - Set go_naming_convention for cel-go by [@​riking](https://togithub.com/riking) in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - nit: fix error message in go_repository by [@​hauserx](https://togithub.com/hauserx) in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - Add `go_deps.config(env = ...)` as a replacement for `gazelle_dependencies(go_env = ...)` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1748](https://togithub.com/bazelbuild/bazel-gazelle/pull/1748) - Warn if integrity not specified for archive_override by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - Use host module cache whithout build cache and verify it by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1755](https://togithub.com/bazelbuild/bazel-gazelle/pull/1755) - Update default_gazelle_overrides.bzl by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1758](https://togithub.com/bazelbuild/bazel-gazelle/pull/1758) - Mark `go_deps` extension as reproducible by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1761](https://togithub.com/bazelbuild/bazel-gazelle/pull/1761) - Ignore `purego` build constraint by [@​mattyclarkson](https://togithub.com/mattyclarkson) in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - Expose path to root `go.mod` to rules_go by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1762](https://togithub.com/bazelbuild/bazel-gazelle/pull/1762) - Fix and expand `reproducible` usage in extensions by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1763](https://togithub.com/bazelbuild/bazel-gazelle/pull/1763) - Add is_bazel_module to deps.bzl. by [@​spags-lacework](https://togithub.com/spags-lacework) in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) - prepare release 0.36 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1752](https://togithub.com/bazelbuild/bazel-gazelle/pull/1752) #### New Contributors - [@​t-8ch](https://togithub.com/t-8ch) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - [@​dzbarsky](https://togithub.com/dzbarsky) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - [@​Megakuul](https://togithub.com/Megakuul) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - [@​fardream](https://togithub.com/fardream) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - [@​pedrobarco](https://togithub.com/pedrobarco) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - [@​riking](https://togithub.com/riking) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - [@​hauserx](https://togithub.com/hauserx) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - [@​scaiper](https://togithub.com/scaiper) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - [@​mattyclarkson](https://togithub.com/mattyclarkson) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - [@​spags-lacework](https://togithub.com/spags-lacework) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) **Full Changelog**: bazel-contrib/bazel-gazelle@v0.35.0...v0.36.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://developer.mend.io/github/kreempuff/rules_unreal_engine). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.35.0` -> `v0.36.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary> ### [`v0.36.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.36.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.35.0...v0.36.0) #### What's Changed - Test with incompatible flags by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1696](https://togithub.com/bazelbuild/bazel-gazelle/pull/1696) - adding more default gazelle overrides by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1701](https://togithub.com/bazelbuild/bazel-gazelle/pull/1701) - rule: add accessor for attribute comments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - rule: set update flag on Rule.AddArg by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1702](https://togithub.com/bazelbuild/bazel-gazelle/pull/1702) - rule: rename GetAttrComments -> AttrComments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1703](https://togithub.com/bazelbuild/bazel-gazelle/pull/1703) - Remove some usage of deprecated ioutil by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - Allow passing Gazelle binary as a file by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1706](https://togithub.com/bazelbuild/bazel-gazelle/pull/1706) - rule: allow usage of Label struct with Rule APIs by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1705](https://togithub.com/bazelbuild/bazel-gazelle/pull/1705) - Remove ioutil usage by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1707](https://togithub.com/bazelbuild/bazel-gazelle/pull/1707) - doc: fix link to Swift gazelle plugin by [@​cgrindel](https://togithub.com/cgrindel) in [https://github.com/bazelbuild/bazel-gazelle/pull/1708](https://togithub.com/bazelbuild/bazel-gazelle/pull/1708) - Fix two shellcheck warnings in gazelle.bash.in by [@​mortenmj](https://togithub.com/mortenmj) in [https://github.com/bazelbuild/bazel-gazelle/pull/1710](https://togithub.com/bazelbuild/bazel-gazelle/pull/1710) - implement expression conversions via BzlExprValue interface by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1714](https://togithub.com/bazelbuild/bazel-gazelle/pull/1714) - update documentation for 0.35 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1712](https://togithub.com/bazelbuild/bazel-gazelle/pull/1712) - Update circl to v1.3.7 in tests by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1718](https://togithub.com/bazelbuild/bazel-gazelle/pull/1718) - rule: make value sorting configurable (alternative implementation) by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1719](https://togithub.com/bazelbuild/bazel-gazelle/pull/1719) - Add check in `update-repos` to omit reading `WORKSPACE` on bzlmod only repos. by [@​Megakuul](https://togithub.com/Megakuul) in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - Add default gazelle override for github.com/cockroachdb/errors. by [@​fardream](https://togithub.com/fardream) in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - README: fix resolve_regexp doc by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1729](https://togithub.com/bazelbuild/bazel-gazelle/pull/1729) - feat(bzlmod): allow `default_gazelle_attributes` for `go_deps` extension by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1716](https://togithub.com/bazelbuild/bazel-gazelle/pull/1716) - add new std_packages from go 1.22 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1740](https://togithub.com/bazelbuild/bazel-gazelle/pull/1740) - fix: wrap generation test labels with Label() by [@​pedrobarco](https://togithub.com/pedrobarco) in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - proto: Add Bzlmod support for well-known types by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1741](https://togithub.com/bazelbuild/bazel-gazelle/pull/1741) - Test BCR with Bazel 6.5.0 and 7.0.2 by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1744](https://togithub.com/bazelbuild/bazel-gazelle/pull/1744) - Set go_naming_convention for cel-go by [@​riking](https://togithub.com/riking) in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - nit: fix error message in go_repository by [@​hauserx](https://togithub.com/hauserx) in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - Add `go_deps.config(env = ...)` as a replacement for `gazelle_dependencies(go_env = ...)` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1748](https://togithub.com/bazelbuild/bazel-gazelle/pull/1748) - Warn if integrity not specified for archive_override by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - Use host module cache whithout build cache and verify it by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1755](https://togithub.com/bazelbuild/bazel-gazelle/pull/1755) - Update default_gazelle_overrides.bzl by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1758](https://togithub.com/bazelbuild/bazel-gazelle/pull/1758) - Mark `go_deps` extension as reproducible by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1761](https://togithub.com/bazelbuild/bazel-gazelle/pull/1761) - Ignore `purego` build constraint by [@​mattyclarkson](https://togithub.com/mattyclarkson) in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - Expose path to root `go.mod` to rules_go by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1762](https://togithub.com/bazelbuild/bazel-gazelle/pull/1762) - Fix and expand `reproducible` usage in extensions by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1763](https://togithub.com/bazelbuild/bazel-gazelle/pull/1763) - Add is_bazel_module to deps.bzl. by [@​spags-lacework](https://togithub.com/spags-lacework) in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) - prepare release 0.36 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1752](https://togithub.com/bazelbuild/bazel-gazelle/pull/1752) #### New Contributors - [@​t-8ch](https://togithub.com/t-8ch) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - [@​dzbarsky](https://togithub.com/dzbarsky) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - [@​Megakuul](https://togithub.com/Megakuul) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - [@​fardream](https://togithub.com/fardream) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - [@​pedrobarco](https://togithub.com/pedrobarco) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - [@​riking](https://togithub.com/riking) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - [@​hauserx](https://togithub.com/hauserx) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - [@​scaiper](https://togithub.com/scaiper) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - [@​mattyclarkson](https://togithub.com/mattyclarkson) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - [@​spags-lacework](https://togithub.com/spags-lacework) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) **Full Changelog**: bazel-contrib/bazel-gazelle@v0.35.0...v0.36.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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.35.0` -> `v0.36.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary> ### [`v0.36.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.36.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.35.0...v0.36.0) #### What's Changed - Test with incompatible flags by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1696](https://togithub.com/bazelbuild/bazel-gazelle/pull/1696) - adding more default gazelle overrides by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1701](https://togithub.com/bazelbuild/bazel-gazelle/pull/1701) - rule: add accessor for attribute comments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - rule: set update flag on Rule.AddArg by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1702](https://togithub.com/bazelbuild/bazel-gazelle/pull/1702) - rule: rename GetAttrComments -> AttrComments by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1703](https://togithub.com/bazelbuild/bazel-gazelle/pull/1703) - Remove some usage of deprecated ioutil by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - Allow passing Gazelle binary as a file by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1706](https://togithub.com/bazelbuild/bazel-gazelle/pull/1706) - rule: allow usage of Label struct with Rule APIs by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1705](https://togithub.com/bazelbuild/bazel-gazelle/pull/1705) - Remove ioutil usage by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/bazel-gazelle/pull/1707](https://togithub.com/bazelbuild/bazel-gazelle/pull/1707) - doc: fix link to Swift gazelle plugin by [@​cgrindel](https://togithub.com/cgrindel) in [https://github.com/bazelbuild/bazel-gazelle/pull/1708](https://togithub.com/bazelbuild/bazel-gazelle/pull/1708) - Fix two shellcheck warnings in gazelle.bash.in by [@​mortenmj](https://togithub.com/mortenmj) in [https://github.com/bazelbuild/bazel-gazelle/pull/1710](https://togithub.com/bazelbuild/bazel-gazelle/pull/1710) - implement expression conversions via BzlExprValue interface by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1714](https://togithub.com/bazelbuild/bazel-gazelle/pull/1714) - update documentation for 0.35 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1712](https://togithub.com/bazelbuild/bazel-gazelle/pull/1712) - Update circl to v1.3.7 in tests by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1718](https://togithub.com/bazelbuild/bazel-gazelle/pull/1718) - rule: make value sorting configurable (alternative implementation) by [@​t-8ch](https://togithub.com/t-8ch) in [https://github.com/bazelbuild/bazel-gazelle/pull/1719](https://togithub.com/bazelbuild/bazel-gazelle/pull/1719) - Add check in `update-repos` to omit reading `WORKSPACE` on bzlmod only repos. by [@​Megakuul](https://togithub.com/Megakuul) in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - Add default gazelle override for github.com/cockroachdb/errors. by [@​fardream](https://togithub.com/fardream) in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - README: fix resolve_regexp doc by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1729](https://togithub.com/bazelbuild/bazel-gazelle/pull/1729) - feat(bzlmod): allow `default_gazelle_attributes` for `go_deps` extension by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1716](https://togithub.com/bazelbuild/bazel-gazelle/pull/1716) - add new std_packages from go 1.22 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1740](https://togithub.com/bazelbuild/bazel-gazelle/pull/1740) - fix: wrap generation test labels with Label() by [@​pedrobarco](https://togithub.com/pedrobarco) in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - proto: Add Bzlmod support for well-known types by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1741](https://togithub.com/bazelbuild/bazel-gazelle/pull/1741) - Test BCR with Bazel 6.5.0 and 7.0.2 by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1744](https://togithub.com/bazelbuild/bazel-gazelle/pull/1744) - Set go_naming_convention for cel-go by [@​riking](https://togithub.com/riking) in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - nit: fix error message in go_repository by [@​hauserx](https://togithub.com/hauserx) in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - Add `go_deps.config(env = ...)` as a replacement for `gazelle_dependencies(go_env = ...)` by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1748](https://togithub.com/bazelbuild/bazel-gazelle/pull/1748) - Warn if integrity not specified for archive_override by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - Use host module cache whithout build cache and verify it by [@​scaiper](https://togithub.com/scaiper) in [https://github.com/bazelbuild/bazel-gazelle/pull/1755](https://togithub.com/bazelbuild/bazel-gazelle/pull/1755) - Update default_gazelle_overrides.bzl by [@​sluongng](https://togithub.com/sluongng) in [https://github.com/bazelbuild/bazel-gazelle/pull/1758](https://togithub.com/bazelbuild/bazel-gazelle/pull/1758) - Mark `go_deps` extension as reproducible by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1761](https://togithub.com/bazelbuild/bazel-gazelle/pull/1761) - Ignore `purego` build constraint by [@​mattyclarkson](https://togithub.com/mattyclarkson) in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - Expose path to root `go.mod` to rules_go by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1762](https://togithub.com/bazelbuild/bazel-gazelle/pull/1762) - Fix and expand `reproducible` usage in extensions by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/bazel-gazelle/pull/1763](https://togithub.com/bazelbuild/bazel-gazelle/pull/1763) - Add is_bazel_module to deps.bzl. by [@​spags-lacework](https://togithub.com/spags-lacework) in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) - prepare release 0.36 by [@​tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/bazel-gazelle/pull/1752](https://togithub.com/bazelbuild/bazel-gazelle/pull/1752) #### New Contributors - [@​t-8ch](https://togithub.com/t-8ch) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1700](https://togithub.com/bazelbuild/bazel-gazelle/pull/1700) - [@​dzbarsky](https://togithub.com/dzbarsky) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1704](https://togithub.com/bazelbuild/bazel-gazelle/pull/1704) - [@​Megakuul](https://togithub.com/Megakuul) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1727](https://togithub.com/bazelbuild/bazel-gazelle/pull/1727) - [@​fardream](https://togithub.com/fardream) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1728](https://togithub.com/bazelbuild/bazel-gazelle/pull/1728) - [@​pedrobarco](https://togithub.com/pedrobarco) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1743](https://togithub.com/bazelbuild/bazel-gazelle/pull/1743) - [@​riking](https://togithub.com/riking) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1746](https://togithub.com/bazelbuild/bazel-gazelle/pull/1746) - [@​hauserx](https://togithub.com/hauserx) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1750](https://togithub.com/bazelbuild/bazel-gazelle/pull/1750) - [@​scaiper](https://togithub.com/scaiper) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1753](https://togithub.com/bazelbuild/bazel-gazelle/pull/1753) - [@​mattyclarkson](https://togithub.com/mattyclarkson) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1767](https://togithub.com/bazelbuild/bazel-gazelle/pull/1767) - [@​spags-lacework](https://togithub.com/spags-lacework) made their first contribution in [https://github.com/bazelbuild/bazel-gazelle/pull/1771](https://togithub.com/bazelbuild/bazel-gazelle/pull/1771) **Full Changelog**: bazel-contrib/bazel-gazelle@v0.35.0...v0.36.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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
What type of PR is this?
Feature
What package or component does this PR mostly affect?
rule/rule.go
What does this PR do? Why is it needed?
This allows user to attach comments like "# do not sort" to the assignment expressions maintained by rule.go.
rule.Format() calls into buildtools/build.Format() which in turn calls Rewrite(). Rewrite() by default sorts certain label arguments like "deps" and "hdrs". To preventing this sorting it is possible to provide the comment "# do not sort". However this comment needs to be attached to the assignment expression.
In rule.go the assignment expressions are not exposed to the user, making it impossible to attach the comment to it.
See #237 (comment)
Which issues(s) does this PR fix?
Fixes #237