You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2019/11/08 11:50:18 UTC

[feature] Analyser complains that 'Bundle contains classes in the default package'

Hi,

I'm build an application using the feature model tooling. I enabled
analysers and got shout at by the 'api-regions-check-order' checker
since it required configuration. I don't use API regions, so I disabled
that.

Then I ran into a problem due to jackson jar having classes in the
default package:

  Bundle contains classes in the default package: Artifact
[id=com.fasterxml.jackson.core:jackson-core:2.10.0]

I will disable this check as well, but I would like to understand why
this is a problem.

Thanks,
Robert


Re: [feature] Analyser complains that 'Bundle contains classes in the default package'

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2019-11-11 at 14:49 +0100, Carsten Ziegeler wrote:
> Am 11.11.2019 um 11:51 schrieb Robert Munteanu:
> > On Fri, 2019-11-08 at 14:18 +0100, Carsten Ziegeler wrote:
> > > Hi
> > > 
> > > it seems you run with all available checks. You should only run
> > > api
> > > region checks if you use api regions. We recently moved all
> > > analysers
> > > that use api regions to the regions extension.
> > 
> > As a bit of context, I started to incrementally use the feature
> > model
> > tooling on a simple project. I did so without any sort of explicit
> > configuration, as:
> > 
> > 1. I don't like configurations :-)
> > 2. I think the tooling should work out-of-the-box with sensible
> > values,
> > and allow customisation if needed.
> > 
> > Would it be an option to separate the 'default' scans from the
> > additional scans, like the API order one?
> > 
> The api regions should be optional as they are in a separate module. 
> Unfortunately, as the api-jars mojo uses extensions as well, this 
> separate module gets pulled in automatically.
> 
> I absolutely agree that we should work with good ootb configurations.
> 
> So maybe we should configure the slingfeature maven plugin with a
> good 
> set of basic analysers. If someone wants additional checks, they can
> be 
> configured.
> 
> > > The other check is done by the analyser for OSGi connect; I can't
> > > recall
> > > why this check was useful though.
> > 
> > Ack, would be interesting to know. Maybe this one would also be a
> > candidate for the non-default set of scanners? If the check is
> > related
> > to [1], maybe it's not useful for everyone right now.
> > 
> Agreed
> 
> So in summary, we should configure a good default set of analysers
> and 
> provide a way to add analysers (and skip the default ones)

Sound good to me. Filed a Jira issue so we don't forget about this:

  https://issues.apache.org/jira/browse/SLING-8839

Thanks,
Robert


Re: [feature] Analyser complains that 'Bundle contains classes in the default package'

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 11.11.2019 um 11:51 schrieb Robert Munteanu:
> On Fri, 2019-11-08 at 14:18 +0100, Carsten Ziegeler wrote:
>> Hi
>>
>> it seems you run with all available checks. You should only run api
>> region checks if you use api regions. We recently moved all
>> analysers
>> that use api regions to the regions extension.
> 
> As a bit of context, I started to incrementally use the feature model
> tooling on a simple project. I did so without any sort of explicit
> configuration, as:
> 
> 1. I don't like configurations :-)
> 2. I think the tooling should work out-of-the-box with sensible values,
> and allow customisation if needed.
> 
> Would it be an option to separate the 'default' scans from the
> additional scans, like the API order one?
> 
The api regions should be optional as they are in a separate module. 
Unfortunately, as the api-jars mojo uses extensions as well, this 
separate module gets pulled in automatically.

I absolutely agree that we should work with good ootb configurations.

So maybe we should configure the slingfeature maven plugin with a good 
set of basic analysers. If someone wants additional checks, they can be 
configured.

>>
>> The other check is done by the analyser for OSGi connect; I can't
>> recall
>> why this check was useful though.
> 
> Ack, would be interesting to know. Maybe this one would also be a
> candidate for the non-default set of scanners? If the check is related
> to [1], maybe it's not useful for everyone right now.
> 
Agreed

So in summary, we should configure a good default set of analysers and 
provide a way to add analysers (and skip the default ones)

Regards
Carsten
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: [feature] Analyser complains that 'Bundle contains classes in the default package'

Posted by Robert Munteanu <ro...@apache.org>.
On Fri, 2019-11-08 at 14:18 +0100, Carsten Ziegeler wrote:
> Hi
> 
> it seems you run with all available checks. You should only run api 
> region checks if you use api regions. We recently moved all
> analysers 
> that use api regions to the regions extension.

As a bit of context, I started to incrementally use the feature model
tooling on a simple project. I did so without any sort of explicit
configuration, as:

1. I don't like configurations :-) 
2. I think the tooling should work out-of-the-box with sensible values,
and allow customisation if needed.

Would it be an option to separate the 'default' scans from the
additional scans, like the API order one?

> 
> The other check is done by the analyser for OSGi connect; I can't
> recall 
> why this check was useful though.

Ack, would be interesting to know. Maybe this one would also be a
candidate for the non-default set of scanners? If the check is related
to [1], maybe it's not useful for everyone right now.

Thanks,
Robert

[1]: https://blog.osgi.org/2019/09/osgi-connect-revisited.html

> 
> Regards
> Carsten
> 
> Am 08.11.2019 um 12:50 schrieb Robert Munteanu:
> > Hi,
> > 
> > I'm build an application using the feature model tooling. I enabled
> > analysers and got shout at by the 'api-regions-check-order' checker
> > since it required configuration. I don't use API regions, so I
> > disabled
> > that.
> > 
> > Then I ran into a problem due to jackson jar having classes in the
> > default package:
> > 
> >    Bundle contains classes in the default package: Artifact
> > [id=com.fasterxml.jackson.core:jackson-core:2.10.0]
> > 
> > I will disable this check as well, but I would like to understand
> > why
> > this is a problem.
> > 
> > Thanks,
> > Robert
> > 


Re: [feature] Analyser complains that 'Bundle contains classes in the default package'

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi

it seems you run with all available checks. You should only run api 
region checks if you use api regions. We recently moved all analysers 
that use api regions to the regions extension.

The other check is done by the analyser for OSGi connect; I can't recall 
why this check was useful though.

Regards
Carsten

Am 08.11.2019 um 12:50 schrieb Robert Munteanu:
> Hi,
> 
> I'm build an application using the feature model tooling. I enabled
> analysers and got shout at by the 'api-regions-check-order' checker
> since it required configuration. I don't use API regions, so I disabled
> that.
> 
> Then I ran into a problem due to jackson jar having classes in the
> default package:
> 
>    Bundle contains classes in the default package: Artifact
> [id=com.fasterxml.jackson.core:jackson-core:2.10.0]
> 
> I will disable this check as well, but I would like to understand why
> this is a problem.
> 
> Thanks,
> Robert
> 

-- 
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org