Provisional OSGi API policy

Overview

The OSGi Alliance exposes provisional API through draft specification releases. Additionally, some Felix contributors work for OSGi Alliance member companies and have access to provisional OSGi API. Often, Felix subprojects want to experiment with and/or implement provisional OSGi API. In some cases, Felix subprojects may actually be the reference implementation for the specification in question. This creates potentially confusing or questionable situations.

For example, if a Felix subproject is released with provisional OSGi API, downstream users may not be aware that the contained API is not final OSGi API. They may mistakenly confer "official" status on it, since it is contained in an "official" Apache release. Further, the ability to implement OSGi specifications is based on creating compliant implementations. Since it is not really possible to be compliant with a provisional specification, the status of such implementations is sort of a gray area.

To deal with these situations, this document describes the policy for handling provisional OSGi API in Felix subprojects.

Policy summary

To make the policy as simple and consistent as possible, Felix subprojects must not contain nor depend on provisional OSGi API. Provisional OSGi API refers to anything in the org.osgi.* package namespace that is not part of a final released specification.

Policy in practice

Since subprojects will still want to implement and experiment with provisional OSGi specifications, this must still be possible. The following steps should be taken when working on or with provisional OSGi specifications:

  1. Any provisional OSGi API must be recreated in the org.apache.felix.* package name space; this effectively makes it provisional Felix API.
  2. All Felix provisional API must be marked as deprecated.
  3. All Felix provisional API exported from bundles should be exported with a mandatory attribute of status="provisional".

When working with new specifications, this will likely result in parallel package structures between the provisional OSGi and Felix APIs. When working with existing specifications, it may be necessary to create extensions to existing OSGi interfaces in the Felix package namespace.

Policy rationale

The first goal of this policy is to completely avoid using provisional OSGi API given the potential confusion and questions by doing so. The second goal is to make the existence of any Felix provisional API completely obvious to downstream users and make it difficult for them to use it unknowingly. This latter goal gives us the ability to still "release early and often", but without being required to maintain backward compatibility on provisional APIs.

  • No labels