sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-8078) New Analyser task which is able to detect Export-Package dependencies between regions
Date Wed, 07 Nov 2018 15:38:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678400#comment-16678400
] 

ASF GitHub Bot commented on SLING-8078:
---------------------------------------

cziegeler commented on issue #7: SLING-8078 - New Analyser task which is able to detect Export-Package
dependencies between regions
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/7#issuecomment-436665548
 
 
   The patch looks good to me, the only minor thing is that we should think about prefixing
the parameters with something task related, otherwise we might run into a clash between two
tasks using the same parameter name. Obviously as XML is used in maven we can't use a colon,
so maybe an underscore and keys will become taskname_parametername.
   The analyser would get such keys, and when it invokes a task it will only pass in the parameters
with the right prefix or parameters not having a prefix and removes the prefix.
   For example if these parameters are passed into the Analyser 
   mytask_foo=one
   mytask_hi=hello
   nexttask_bla=two
   debug=true
   and the analyser invokes the task named "mytask", the following paramters are available
through the context
   foo=one
   hi=hello
   debug=true
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> New Analyser task which is able to detect Export-Package dependencies between regions
> -------------------------------------------------------------------------------------
>
>                 Key: SLING-8078
>                 URL: https://issues.apache.org/jira/browse/SLING-8078
>             Project: Sling
>          Issue Type: New Feature
>          Components: Feature Model, Maven Plugins and Archetypes
>    Affects Versions: Feature Model Analyser 0.2.0
>            Reporter: Simone Tripodi
>            Assignee: David Bosschaert
>            Priority: Major
>             Fix For: Feature Model Analyser 0.2.2
>
>
> It may be helpful users have the need to define a {{deprecated}} region in order to mark
which APIs don't have to be exposed to end users, a new Analyser Task implementation will
help to detect if {{global}} exported APIs don't have {{uses}} dependencies to APIs that are
declared in the {{deprecated}} region.
> i.e. given a feature:
> {noformat}
> ...
> [
>   {
>     "name": "global"
>     "exports": ["org.osgi.util.function"]
>   },
>   {
>     "name": "deprecated",
>    "exports": ["org.objectweb.asm"]
>   }
> ]
> ...
> {noformat}
> and a bundle declares the OSGi header in the Manifest as below:
> {noformat}
> Export-Package: org.osgi.util.function;uses:="org.objectweb.asm"
> {noformat}
> the new Analyser Task implementation will detect that "violation"
> {noformat}
> Bundle 'org.osgi:org.osgi.util.function:1.0.0', defined in feature 'org.apache.sling.testing:org.apache.sling.testing.apiregions:1.0.0',
declares 'org.osgi.util.function' in the 'Export-Package' header which requires 'org.objectweb.asm'
package that is in the 'deprecated' region
> {noformat}
> PR is coming



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message