Esteemed API Council members,While working on platform versioning, Seb has identified some client libraries which are shipped with the partner SDK but depend on FIDL APIs which aren't. He identified the following FIDL APIs in this situation:
- fuchsia.fs
- fuchsia.hardware.pty
- fuchsia.net.name
- fuchsia.posix.*
- fuchsia.vulkan.loader
The problem is that "partner" APIs differ from "internal" APIs along two different dimensions: visibility and stability. These APIs don't fit neatly into either category; they want to be private (like "internal" APIs) but they need to be stable (like "partner" APIs) because they're being called from code that isn't updated in lock-step with the system.The simplest way to address this situation is to get rid of this category of API and say that all APIs accessed by libraries in the "partner" SDK must also be "partner" (or stabler). This policy would be basically a "libraries" version of the policy established for tools in RFC-0169.An alternative would be to introduce a new "internal-visible, partner-stable" API category, but before considering that, we should have a pretty strong justification for why the existing categories are insufficient.csuter, tamird, jbauman, brunodalbo: Do you have any concerns about elevating the APIs listed above to "partner" level?
Speaking from the perspective of fuchsia.net.name and fuchsia.posix.*, for which FDIO is a client in the SDK.I think from a practical standpoint, being able to prevent the library from being consumed directly is beneficial until we feel it's ready for direct use by applications. For fuchsia.posix.* I do worry about unexpected usage creep if we just put it in the SDK. For fuchsia.net.name we just don't have a ready and willing user to justify it, which has been our bar for adding things to the SDK.I also assume that we'd want more than just elevate to "partner", we'd probably want to apply FIDL versioning to them as well, right? I think applying the versioning might be beneficial for us to be able to use it to reason about safe API evolution more easily, which we've been doing without tooling help so far. But given zxio/FDIO is compiled with a HEAD SDK, I fear that the incentive quickly becomes to maintain most of the api at `added=HEAD` which is effectively the same as not having it in the SDK, unless I'm missing something.
On Fri, Jan 6, 2023 at 6:31 PM Bruno Dal Bo <bruno...@google.com> wrote:Speaking from the perspective of fuchsia.net.name and fuchsia.posix.*, for which FDIO is a client in the SDK.I think from a practical standpoint, being able to prevent the library from being consumed directly is beneficial until we feel it's ready for direct use by applications. For fuchsia.posix.* I do worry about unexpected usage creep if we just put it in the SDK. For fuchsia.net.name we just don't have a ready and willing user to justify it, which has been our bar for adding things to the SDK.I also assume that we'd want more than just elevate to "partner", we'd probably want to apply FIDL versioning to them as well, right?
On Fri, Jan 6, 2023 at 1:47 PM Adam Barth <aba...@google.com> wrote:On Fri, Jan 6, 2023 at 6:31 PM Bruno Dal Bo <bruno...@google.com> wrote:Speaking from the perspective of fuchsia.net.name and fuchsia.posix.*, for which FDIO is a client in the SDK.I think from a practical standpoint, being able to prevent the library from being consumed directly is beneficial until we feel it's ready for direct use by applications. For fuchsia.posix.* I do worry about unexpected usage creep if we just put it in the SDK. For fuchsia.net.name we just don't have a ready and willing user to justify it, which has been our bar for adding things to the SDK.
I also assume that we'd want more than just elevate to "partner", we'd probably want to apply FIDL versioning to them as well, right?Correct - properly versioning these FIDL libraries is the main motivation here.I think applying the versioning might be beneficial for us to be able to use it to reason about safe API evolution more easily, which we've been doing without tooling help so far. But given zxio/FDIO is compiled with a HEAD SDK, I fear that the incentive quickly becomes to maintain most of the api at `added=HEAD` which is effectively the same as not having it in the SDK, unless I'm missing something.+Sébastien Marchand is also working on building the SDK shared libraries at specific target API levels to address this issue. We'll eventually have N copies of libfdio.so in the SDK, one for every supported API level in that SDK. Those copies will be built against that API level.
For fuchsia.fs, no.
I think we should add the necessary SDK category (or alternative machinery).Even if all these APIs were ready for SDK inclusion (as Bruno pointed out, that's not obviously so) we may want this mechanism in the future; in its absence, FIDL authors will be nudged toward SDK inclusion in future cases, which I think is not what we want.
On Mon, Jan 9, 2023 at 11:12 AM Tamir Duberstein <tam...@google.com> wrote:I think we should add the necessary SDK category (or alternative machinery).Even if all these APIs were ready for SDK inclusion (as Bruno pointed out, that's not obviously so) we may want this mechanism in the future; in its absence, FIDL authors will be nudged toward SDK inclusion in future cases, which I think is not what we want.
Maybe, but just to be clear: these APIs will have exactly the same constraints as the partner APIs in terms of support. E.g. you won't be able to change their signature and we'll have to provide ABI compatibility windows for all these APIs (by enforcing the use of the `legacy=true` FIDL tags). So the main thing that we'll get out of the new SDK category is that these APIs won't be exposed to the SDK users (which might be a good motivation to add this category, I just want this to be clear).
Maybe, but just to be clear: these APIs will have exactly the same constraints as the partner APIs in terms of support. E.g. you won't be able to change their signature and we'll have to provide ABI compatibility windows for all these APIs (by enforcing the use of the `legacy=true` FIDL tags). So the main thing that we'll get out of the new SDK category is that these APIs won't be exposed to the SDK users (which might be a good motivation to add this category, I just want this to be clear).
Bruno outlined the reasons above.We may want to use the FIDL in a library whose interfaces we support while maintaining the freedom to change the FIDL without worrying about OOT clients.There are also cases in which the FIDL is quite complex to hold correctly (e.g. fast datagram sockets) so we want to do our best to steer clients away from direct use and toward the libraries we provide.
On Mon, Jan 9, 2023 at 11:52 AM Hunter Freyer <hjfr...@google.com> wrote:
On Mon, Jan 9, 2023 at 11:30 AM Sébastien Marchand <sebma...@google.com> wrote:On Mon, Jan 9, 2023 at 11:12 AM Tamir Duberstein <tam...@google.com> wrote:I think we should add the necessary SDK category (or alternative machinery).Even if all these APIs were ready for SDK inclusion (as Bruno pointed out, that's not obviously so) we may want this mechanism in the future; in its absence, FIDL authors will be nudged toward SDK inclusion in future cases, which I think is not what we want.
--
You received this message because you are subscribed to the Google Groups "api-council" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-council...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/api-council/CACOR3hKU1_wmGF9j4ZmAx26m0R4mOyOVqTReAXt%2BDRwZRW_9EQ%40mail.gmail.com.
How does a client using fuchsia.posix.* directly differ from one using the protocol via FDIO, given that in both cases the component is built against a specific version of that protocol?
Is the argument that with the constraint that the protocol only be used via FDIO, we can more easily audit (and/or compatibility test) older FDIO versions as a proxy for whether changes are compatible with older clients?
SG. I'll start working on that. I'll also update the RFC to mention this new category. Any suggestions for the name? Here's some ideas:- internal_versioned- internal_visible- internal_with_compat
Kk, it seems like everybody can live with the introduction of a new category. If that's not the case, please let me know.On the name bikeshedding front: I think it ought to include the word "partner", since really this is a modification of the "partner" SDK category. Perhaps "partner_private" or "partner_hidden"? In the future we might want to use the same technique for the "public" SDK, so that version could be oxymoronically named "public_private" or "public_hidden".
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/api-council/CAPONGC04dh6HBy8d7NF9fepOD%2Bwx4o-L4UW7r_mhooY24LWmPw%40mail.gmail.com.