Skip to content

proposal: config: stop inferring APIs when there aren't any listed in librarian.yaml #4358

@jskeet

Description

@jskeet

Currently, if the list of APIs for a library is empty, we try to infer a single API (including its path) based on the library name.

I appreciate this is intended to keep librarian.yaml concise, but:

  • There are libraries which genuinely don't have any APIs associated with them. Currently those have to then have veneer: true specified, to prevent the API inference, which feels like it's mixing concerns. (And I believe for most languages this will be the only reason to set veneer: true. See proposal: config: remove veneer field from librarian.yaml #4276 for removing this field.) Having logic for when it's populated and when it's not means more thought is required when looking at the config file in order to work out what's actually going to happen.
  • The inference is language-specific, which means a platform team operator who is trying to work out what API path will be generated for a given library needs to know all the inference rules
  • It can be useful to try to find the library associated with an API path just by copy/paste of the API path - that doesn't work if the API path isn't listed

Note: removing the inference in this direction does not prevent us from using "API path => library name" inference when adding a new API (either by updating an existing library or adding a new one).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions