PSA: ui/legacy:bundle visibility restrictions impact downstream projects

3 views
Skip to first unread message

Tim Van der Lippe

unread,
Apr 27, 2021, 9:39:12 AM4/27/21
to devtools-dev
Hey all,

In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2853551 we have updated the ui/legacy:bundle target to restrict its visibility. This is to ensure we have a consistent dependency tree: as you can see some of our models/ are incorrectly depending on UI implementation.

Since the visibility uses relative paths, this could potentially break downstream projects (including the Edge DevTools fork) if there are downstream implementations that rely on ui/legacy. Therefore, we have added an augmentation variable that you can use to add targets to the visibility. To do so, update your `.gn` file in the root directory by adding the following to the `default_args`:

default_args = {
  devtools_ui_legacy_visibility = [
    "//front_end/forked/folder/*",
  ]
}

Here, `front_end/forked/folder` is a path (relative to the root directory) towards the folder containing a BUILD.gn file that contains a dependency on ui/legacy:bundle. The `default_args` override any argument specified in a `declare_args` block in GN, which `ui/legacy/BUILD.gn` uses (for documentation, see https://gn.googlesource.com/gn/+/master/docs/reference.md#other-help-topics-gn-file-variables and https://gn.googlesource.com/gn/+/master/docs/reference.md#func_declare_args).

If you have any questions, feel free to reach out to me.

Cheers,
Tim
Reply all
Reply to author
Forward
0 new messages