Re: [rvos-eng] PSA: ffx plugins/subtools can only use SDK visible FIDL is starting to be enforced

18 views
Skip to first unread message

Clayton Wilkinson

unread,
Jul 24, 2023, 9:27:54 AM7/24/23
to Suraj Malhotra, rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team
Great Question. The current check is to disallow "internal" and "unknown" - meaning no sdk_category was declared on the fidl definition. So both partner and partner_internal are OK.

On Fri, Jul 21, 2023 at 11:39 AM Suraj Malhotra <surajm...@google.com> wrote:
Which sdk category is actually required to be set? Does it need to be partner or would partner_internal be sufficient?

On Fri, Jul 21, 2023 at 11:15 AM Clayton Wilkinson <wilkin...@google.com> wrote:

TL;DR: If you do not author ffx plugins or subtools you can stop reading this email. Once fxr/882154 lands, no new usages of FIDL libraries not included in the SDK from ffx subtools will be allowed, and we'll begin the process of addressing the libraries in the allowlist.



What is being done?


Host tools like ffx are external to the Fuchsia platform. This means to manage and maintain compatibility, these tools must use the exposed interfaces of the Fuchsia platform. These interfaces are declared in the SDK. By enforcing host tools to use the FIDL libraries in the SDK, we can rely on platform compatibility commitments to make host tools that are compatible with a range of Fuchsia platform revisions. 


A build time check for ffx_plugin() and ffx_tool() templates is being added to enforce any FIDL dependency (direct or indirect) is included in the SDK. 


To provide time to make all subtools compliant, there is an allowlist of FIDL libraries that are temporarily allowed to be used. We will work with component owners and host tool owners to eliminate this allowlist.


Why now?


This quarter we are focusing on platform and host tool compatibility. Having a stable ABI and a versioned API will greatly improve the reliability, testability, and general developer experience of Fuchsia development.


What are the options?


If a FIDL library is in the allowlist, there are a couple options on how to remove it from the list:


  1. Add your FIDL library to the SDK. Reach out to the API council. General information is here:

Fuchsia SDK Contributor Guide - Promoting_an_api_to_the_partner_category 


  1. Port your ffx plugin to be an in-tree only subtool. Subtools are standalone executables and are not linked into the ffx binary. These subtools can be included in the SDK, or just be built in-tree and not distributed. This will allow in-tree developers to run ffx your-subtool in-tree, but it is not part of the SDK. The trade-off is SDK based developers cannot use your subtool. More information on migrating to subtools: https://fuchsia.dev/fuchsia-src/development/tools/ffx/development/subtools/migrating



  1. Stop using it in a subtool. There could be inadvertent usages of FIDL libraries that could be removed.


  1. Other ideas? Reach out with ideas! The goal is to have a known, versioned and test interface to Fuchsia for use by host tools in the SDK. 


Who do I contact with questions?


The fuchsia tools team: fuchsia-t...@google.com

The FIDL team: tq-fid...@google.com

API Council:  api-c...@fuchsia.dev




Thanks!

Clayton

Suraj Malhotra

unread,
Jul 24, 2023, 9:27:57 AM7/24/23
to Clayton Wilkinson, rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team

Clayton Wilkinson

unread,
Jul 24, 2023, 9:28:01 AM7/24/23
to rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team

David Turner

unread,
Jul 24, 2023, 12:56:11 PM7/24/23
to Clayton Wilkinson, Suraj Malhotra, rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team
On Fri, Jul 21, 2023 at 8:47 PM Clayton Wilkinson <wilkin...@google.com> wrote:
Great Question. The current check is to disallow "internal" and "unknown" - meaning no sdk_category was declared on the fidl definition. So both partner and partner_internal are OK.

Can we disallow `experimental` too then? we have a number of atom collections under that category that should not be relied upon too.
 

David Turner

unread,
Jul 24, 2023, 12:56:11 PM7/24/23
to Clayton Wilkinson, Suraj Malhotra, rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team
Apart from that, thanks for doing this!

Clayton Wilkinson

unread,
Jul 24, 2023, 3:32:58 PM7/24/23
to David Turner, Suraj Malhotra, rvos-eng, api-c...@fuchsia.dev, tq-fidl-team, Fuchsia Tools Team
SGTM - So to be explicit. I grepped through the gn/gni files and looked for "sdk_category" and here is the list I found and what will be enforced (I'll add it to the CL description as well)

cts - (not sure how this overlaps with the others, so it is not allowed in subtools)
excluded - Not allowed in subtools
experimental - Not allowed in subtools
internal - Not allowed in subtools
unknown - Not allowed in subtools

partner - Allowed in subtools
partner_internal - Allowed in subtools
public - Allowed in subtools
Reply all
Reply to author
Forward
0 new messages