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

Oliver Lietz commented on SLING-9999:
-------------------------------------

[~karlpauls], [~radu], The whole discussion here and your behavior is quite 
weird. You have added an additional dependency and changed several mature 
bundles without a discussion on dev@.

Why was there no discussion on dev@ for this major change affecting several 
mature bundles?

I didn't want to be rude, but honestly the package name 
{{o.a.s.servlets.resolver.bundle.tracker}} does NOT make sense AT ALL. 
{{tracker}} is an implementation detail irrelevant for most of the classes. The 
Bundle API package does NOT reference Servlets {{resolver}} but 
{{script}}​s/{{scripting}}:
{noformat}
grep -R resolve bundle | wc -l
       0
{noformat}
{noformat}
grep -R script bundle | grep -v "package org.apache.sling.scripting.api.bundle" 
| wc -l
      19
{noformat}
{noformat}
grep -R script bundle | grep -v "package org.apache.sling.scripting.api.bundle"
bundle/BundledRenderUnitFinder.java:     * bundles for the class or script 
capable of providing a rendering for resource type chain.
bundle/BundledRenderUnit.java:import javax.script.ScriptException;
bundle/BundledRenderUnit.java: * A {@code BundledRenderUnit} represents a 
pre-packaged script or precompiled script (Java class) that will be executed in 
order to
bundle/BundledRenderUnit.java: * context of a {@link 
javax.script.ScriptEngine}, the provider module should add the current 
executing unit into the {@link
bundle/BundledRenderUnit.java: * javax.script.ScriptEngine}'s {@link 
javax.script.ScriptContext} using the {@link #VARIABLE} key.
bundle/BundledRenderUnit.java:     * The variable available in the {@link 
javax.script.Bindings} associated to a {@link 
org.apache.sling.api.SlingHttpServletRequest} if
bundle/BundledRenderUnit.java:     * In case this {@code BundledRenderUnit} 
wraps a precompiled script, this method will return an instance of that object.
bundle/BundledRenderUnit.java:     * @return a precompiled unit, if {@code 
this} unit wraps a precompiled script; {@code null} otherwise
bundle/BundledRenderUnit.java:     * Returns the name of {@code this 
BundledRenderUnit}. This can be the name of the wrapped script or precompiled 
script.
bundle/BundledRenderUnit.java:     * Retrieves an OSGi runtime dependency of 
the wrapped script identified by the passed {@code className} parameter.
bundle/BundledRenderUnit.java:     * Retrieves multiple instances of an OSGi 
runtime dependency of the wrapped script identified by the passed {@code 
className}
bundle/BundledRenderUnit.java:     * This method will execute / evaluate the 
wrapped script or precompiled script with the given request.
bundle/BundledRenderUnit.java:     * This method will return an input stream if 
{@code this} unit is backed by a script that can be interpreted.
bundle/BundledRenderUnit.java:     * @return an {@link InputStream} providing 
the source code of the backing script; if {@code this} unit is backed by a 
precompiled
bundle/BundledRenderUnit.java:     * script (essentially a Java class), then 
this method will return {@code null}
bundle/BundledRenderUnitCapability.java:     * Returns the script engine short 
name which can be used to evaluate the {@link BundledRenderUnit} described by 
this capability.
bundle/BundledRenderUnitCapability.java:     * @return the script engine short 
name which can be used to evaluate the {@link BundledRenderUnit} described by 
this capability.
bundle/BundledRenderUnitCapability.java:     * Returns the original's script 
extension that was used to generate this capability.
bundle/BundledRenderUnitCapability.java:     * @return the original's script 
extension that was used to generate this capability.
{noformat}
Why do you think {{o.a.s.servlets.resolver.bundle.tracker}} is a meaningful 
package name?

Why do you think the very generic class 
[ResourceType|https://github.com/apache/sling-org-apache-sling-api/blob/02cb7f1bbc4836865afd7e9964d3be1380daf734/src/main/java/org/apache/sling/api/resource/type/ResourceType.java]
 should not live in {{o.a.s.api.resource.type}} but instead in 
{{o.a.s.servlets.resolver.bundle.tracker}}?

Only in your latest comments you insist to revert the changes where in the 
beginning of the discussion it looked like an option.

[~karlpauls], My main motivation is to have proper/meaningful package and class 
names AND no cyclic dependencies which could lead to all kinds of issues.

So please stop blaming the resolver in Karaf. It just disclosed an issue you 
introduced. The [behavior can be 
configured|https://karaf.apache.org/manual/latest/#_feature_and_resolver] but 
if the OSGi Spec says this behavior is wrong I'm more than happy to restart the 
discussion for Karaf 5.

The package version of the Bundle API is still below 1.0 so moving it around 
*now* is fine (adhering to Semantic Versioning specification).

The latest changes/addition from [~radu] are again a quick workaround. We 
should try to keep module and root package names in sync.

 

> Remove cyclic dependency between scripting and servlets features
> ----------------------------------------------------------------
>
>                 Key: SLING-9999
>                 URL: https://issues.apache.org/jira/browse/SLING-9999
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, Karaf, Scripting, Servlets, Starter
>            Reporter: Oliver Lietz
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: Scripting Bundle Maven Plugin 0.2.4, Scripting Core 
> 2.3.6, Servlets Resolver 2.7.14, Servlets Resolver API 1.0.0, Scripting JSP 
> 2.5.2, Scripting HTL Engine 1.4.8-1.4.0
>
>
> Before {{org.apache.sling.scripting.core.impl.bundled}} and 
> {{org.apache.sling.servlets.resolver.bundle}} were added the dependency 
> chains were e.g.
> {{sling-servlets}} → {{sling-scripting}} → {{sling}}
> {{sling-scripting-jsp}} → {{sling-scripting}} → {{sling}}
> Currently several _scripting_ modules depend on 
> {{org.apache.sling.servlets.resolver.bundle.tracker}}.
> h2. Move _Bundle_ API to Scripting and Resource packages (modules)
> ||Actual Package (Module)||Target Package (Module)||
> |*{{org.apache.sling.servlets.resolver.bundle.tracker.BundledRenderUnit}}* 
> ({{org.apache.sling.servlets.resolver}})|*{{org.apache.sling.scripting.api.bundle.BundledRenderUnit}}*
>  ({{org.apache.sling.scripting.api}})|
> |*{{org.apache.sling.servlets.resolver.bundle.tracker. 
> BundledRenderUnitCapability}}* 
> ({{org.apache.sling.servlets.resolver}})|*{{org.apache.sling.scripting.api.bundle.BundledRenderUnitCapability}}*
>  ({{org.apache.sling.scripting.api}})|
> |*{{org.apache.sling.servlets.resolver.bundle.tracker.BundledRenderUnitFinder}}*
>  
> ({{org.apache.sling.servlets.resolver}})|*{{org.apache.sling.scripting.api.bundle.BundledRenderUnitFinder}}*
>  ({{org.apache.sling.scripting.api}})|
> |*{{org.apache.sling.servlets.resolver.bundle.tracker.ResourceType}}* 
> ({{org.apache.sling.servlets.resolver}})|*{{org.apache.sling.api.resource.type.ResourceType}}*
>  ({{org.apache.sling.api}})|
> |*{{org.apache.sling.servlets.resolver.bundle.tracker.TypeProvider}}* 
> ({{org.apache.sling.servlets.resolver}})|*{{org.apache.sling.scripting.api.bundle.TypeProvider}}*
>  (_*{color:#ff8b00}class name?{color}*_) ({{org.apache.sling.scripting.api}})|
> ----
> ||Module||Commits||Status||
> |{{org.apache.sling.api}}|[02cb7f1|https://github.com/apache/sling-org-apache-sling-api/commit/02cb7f1bbc4836865afd7e9964d3be1380daf734]|(/)|
> |{{org.apache.sling.scripting.api}}|[d38759d|https://github.com/apache/sling-org-apache-sling-scripting-api/commit/d38759dbd3d4159f70ea54bff23b037be8d07cd6]|(/)|
> |{{org.apache.sling.scripting.core}}|[b2f368a|https://github.com/apache/sling-org-apache-sling-scripting-core/commit/b2f368a90a087979c34d8072fe529675971234fe],
>  
> [1467cfa|https://github.com/apache/sling-org-apache-sling-scripting-core/commit/1467cfa6a3fe4c77a628d078f9d944ce4cc42eb1]|(/)|
> |{{org.apache.sling.scripting.jsp}}|[ccdb902|https://github.com/apache/sling-org-apache-sling-scripting-jsp/commit/ccdb90266f254bb2143a5d870725a8f4b28d4d8b]|(/)|
> |{{org.apache.sling.scripting.sightly}}|[1567894|https://github.com/apache/sling-org-apache-sling-scripting-sightly/commit/1567894f6c1835a317c01e6c5b5987a260a74757],
>  
> [b2f57cd|https://github.com/apache/sling-org-apache-sling-scripting-sightly/commit/b2f57cd43d7d961fcf194cf7bf61b1c79f343d44]|(/)|
> |{{org.apache.sling.servlets.resolver}}|[8262ce6|https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/8262ce63725b9ab93c1d3eb07ace6b02d79acc65]|(!)
>  probably more classes which should be living in a scripting module|



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to