David Bosschaert created SLING-8191:
---------------------------------------
Summary: API Region dependency analyzer should automatically check
relevant region combinations
Key: SLING-8191
URL: https://issues.apache.org/jira/browse/SLING-8191
Project: Sling
Issue Type: Task
Affects Versions: Feature Model Analyser 0.8.0
Reporter: David Bosschaert
Assignee: David Bosschaert
The API Region Dependency Analyzer currently needs to be configured with an
'exporting region' and a 'hiding region'.
I think this can be simplified because the {{api-regions}} section is ordered
in the feature files.
I think the analyzer can just check that API regions defined earlier in the
list don't have API dependencies on API regions later in the list. So for
example if you have the following regions defined:
{code} "api-regions:JSON|false":[
{
"name": "global",
"exports": ["org.foo.bar"]
}, {
"name": "internal",
"exports": ["org.foo.internal"]
}]
{code}
Then the {{internal}} region inherits the packages from the {{global}} region.
So API defined in the {{global}} region cannot use API from the {{internal}}
region in its API signatures. But API in the {{internal}} region _can_ use API
from the {{global}} region in its signatures.
Also the analyzer needs to ensure that neither region specified in the
{{api-regions}} section uses API that is internal to the feature, this is API
that is exported from bundles in the feature, but that is not listed in an API
Regions section at all.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)