Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[M] Change in fuchsia/fuchsia[main]: [fx] Implement `fx bazel-tool set_gn_targets` command.

1 view
Skip to first unread message

'David Turner (Gerrit)' via owners-override

unread,
Mar 7, 2025, 5:29:14 AMMar 7
to Owners Override
Attention needed from Aaron Wood, David Fang and Owners Override

David Turner has uploaded the change for review

David Turner would like Owners Override to review this change.

Commit message

[fx] Implement `fx bazel-tool set_gn_targets` command.

Implement a new `fx bazel-tool` command that can be used
to switch the @gn_targets symlink to the content matching
a given Bazel target.

This is required to invoke `fx bazel build` command directly
for any Bazel target that is wrapped by the same GN
bazel_action() target.

For example, for a workbench_eng.x64 build, the command:

```
fx bazel-tool set_gn_targets //build/info:version --verbose
```

Will print something like:

```
Bazel target //build/info:version is a dependency of GN target //products/workbench:workbench_eng.x64_bazel_build_group
Which builds the following bazel targets:
//products/workbench:assembly_eng.x64_product_assembly
//products/workbench:assembly_eng.x64
//products/workbench:elf_sizes.x64
//products/workbench:product_bundle_eng.x64

@gn_targets now points to /work/fuchsia/out/default/obj/products/workbench/workbench_eng.x64_bazel_build_group.gn_targets
```

+ Add workspace_utils.GN_TARGETS_DIR_SYMLINK
+ Make //build/OWNERS owners of //scripts/bazel_tool.py

Fixed: 341258445
Change-Id: I039d8523ee3d654558986337342e519f2044130a

Change diff


Change information

Files:
  • M build/bazel/scripts/BUILD.gn
  • M build/bazel/scripts/workspace_utils.py
  • M scripts/OWNERS
  • M scripts/bazel_tool.py
  • M tools/devshell/bazel-tool
Change size: M
Delta: 5 files changed, 183 insertions(+), 5 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • David Fang
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I039d8523ee3d654558986337342e519f2044130a
Gerrit-Change-Number: 1220865
Gerrit-PatchSet: 4
Gerrit-Owner: David Turner <di...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Alice Neels <nee...@google.com>
Gerrit-Reviewer: Clayton Wilkinson <wilkin...@google.com>
Gerrit-Reviewer: David Fang <fan...@google.com>
Gerrit-Reviewer: David Turner <di...@google.com>
Gerrit-Reviewer: Jay Zhuang <jayz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: David Fang <fan...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Aaron Wood <aaro...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/3ea07b46bbc7c777a225a922cfb02194e7b947bd-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'James Robinson (Gerrit)' via owners-override

unread,
Mar 7, 2025, 11:19:12 AMMar 7
to David Turner, Owners Override, David Fang, Jay Zhuang, Alice Neels, Clayton Wilkinson, Aaron Wood, GI Try Builder, CQ Bot
Attention needed from Aaron Wood, David Fang, David Turner and Owners Override

James Robinson voted and added 1 comment

Votes added by James Robinson

Owners-Override+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
James Robinson . resolved

+OO for //scripts

Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • David Fang
  • David Turner
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I039d8523ee3d654558986337342e519f2044130a
Gerrit-Change-Number: 1220865
Gerrit-PatchSet: 4
Gerrit-Owner: David Turner <di...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Alice Neels <nee...@google.com>
Gerrit-Reviewer: Clayton Wilkinson <wilkin...@google.com>
Gerrit-Reviewer: David Fang <fan...@google.com>
Gerrit-Reviewer: David Turner <di...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Jay Zhuang <jayz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: David Fang <fan...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: David Turner <di...@google.com>
Gerrit-Attention: Aaron Wood <aaro...@google.com>
Gerrit-Comment-Date: Fri, 07 Mar 2025 16:19:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/a466278012c9f7f5a04f3bacc316839512bede2b-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'David Turner (Gerrit)' via owners-override

unread,
Mar 7, 2025, 2:08:16 PMMar 7
to James Robinson, Owners Override, David Fang, Jay Zhuang, Alice Neels, Clayton Wilkinson, Aaron Wood, GI Try Builder, CQ Bot
Attention needed from Aaron Wood, David Fang and Owners Override

David Turner voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • David Fang
  • Owners Override
Gerrit-Attention: Aaron Wood <aaro...@google.com>
Gerrit-Comment-Date: Fri, 07 Mar 2025 19:08:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/67a685ba5fee336316de684c5033dde33552d53b-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Mar 7, 2025, 3:09:13 PMMar 7
to David Turner, James Robinson, Owners Override, David Fang, Jay Zhuang, Alice Neels, Clayton Wilkinson, Aaron Wood, GI Try Builder

CQ Bot submitted the change

Change information

Commit message:
[fx] Implement `fx bazel-tool set_gn_targets` command.

Implement a new `fx bazel-tool` command that can be used
to switch the @gn_targets symlink to the content matching
a given Bazel target.

This is required to invoke `fx bazel build` command directly
for any Bazel target that is wrapped by the same GN
bazel_action() target.

For example, for a workbench_eng.x64 build, the command:

```
fx bazel-tool set_gn_targets //build/info:version --verbose
```

Will print something like:

```
Bazel target //build/info:version is a dependency of GN target //products/workbench:workbench_eng.x64_bazel_build_group
Which builds the following bazel targets:
//products/workbench:assembly_eng.x64_product_assembly
//products/workbench:assembly_eng.x64
//products/workbench:elf_sizes.x64
//products/workbench:product_bundle_eng.x64

@gn_targets now points to /work/fuchsia/out/default/obj/products/workbench/workbench_eng.x64_bazel_build_group.gn_targets
```

+ Add workspace_utils.GN_TARGETS_DIR_SYMLINK
+ Make //build/OWNERS owners of //scripts/bazel_tool.py

Fixed: 341258445
Change-Id: I039d8523ee3d654558986337342e519f2044130a
Reviewed-by: Clayton Wilkinson <wilkin...@google.com>
Reviewed-by: Alice Neels <nee...@google.com>
Commit-Queue: David Turner <di...@google.com>
Reviewed-by: Jay Zhuang <jayz...@google.com>
Reviewed-by: David Fang <fan...@google.com>
Owners-Override: James Robinson <jam...@google.com>
Files:
  • M build/bazel/scripts/BUILD.gn
  • M build/bazel/scripts/workspace_utils.py
  • M scripts/OWNERS
  • M scripts/bazel_tool.py
  • M tools/devshell/bazel-tool
Change size: M
Delta: 5 files changed, 183 insertions(+), 5 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Alice Neels, +2 by Clayton Wilkinson, +2 by Jay Zhuang, +2 by David Fang
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I039d8523ee3d654558986337342e519f2044130a
Gerrit-Change-Number: 1220865
Gerrit-PatchSet: 5
Gerrit-Owner: David Turner <di...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Alice Neels <nee...@google.com>
Gerrit-Reviewer: Clayton Wilkinson <wilkin...@google.com>
Gerrit-Reviewer: David Fang <fan...@google.com>
Gerrit-Reviewer: David Turner <di...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Jay Zhuang <jayz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/0f3419c077a369e0e6430f2157e383ee96d1aae3-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Mar 7, 2025, 3:13:12 PMMar 7
to David Turner, CQ Bot, James Robinson, Owners Override, David Fang, Jay Zhuang, Alice Neels, Clayton Wilkinson, Aaron Wood, GI Try Builder

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I039d8523ee3d654558986337342e519f2044130a
Gerrit-Change-Number: 1220865
Gerrit-PatchSet: 5
Gerrit-Owner: David Turner <di...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Alice Neels <nee...@google.com>
Gerrit-Reviewer: Clayton Wilkinson <wilkin...@google.com>
Gerrit-Reviewer: David Fang <fan...@google.com>
Gerrit-Reviewer: David Turner <di...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Jay Zhuang <jayz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Fri, 07 Mar 2025 20:13:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/791489dde74b69dcf08204757d24d4b4e1a50d77-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'David Fang (Gerrit)' via owners-override

unread,
Mar 7, 2025, 6:49:10 PMMar 7
to David Turner, CQ Bot, GI Roller, James Robinson, Owners Override, Jay Zhuang, Alice Neels, Clayton Wilkinson, Aaron Wood, GI Try Builder

David Fang added 1 comment

Patchset-level comments
File-level comment, Patchset 4:
David Fang . resolved

would `build/scripts` be a good location for this as well?

David Turner

I would prefer `build/bazel/scripts/` in that case because this is tied very closely to our Bazel wrappers / implementation (and actually imports a module here already). Wdyt?

David Fang

even better!

Gerrit-Comment-Date: Fri, 07 Mar 2025 23:49:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Fang <fan...@google.com>
Comment-In-Reply-To: David Turner <di...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/eeedf32a5706ae55fb529b541285492ddc0a9e5b-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages