[jira] [Commented] (RNG-186) Commons-RNG Simple imports package that Commons-RNG Core does not export
[ https://issues.apache.org/jira/browse/RNG-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17840414#comment-17840414 ] Alex Herbert commented on RNG-186: -- In place of `Random`, at least consider `ThreadLocalRandom.current()` or a `SplittableRandom` instance with the default increment. Both of those RNGs will pass state-of-the-art tests for randomness (TestU01 BigCrush or PractRand for several TiB of output). Their limitation is a period of 2^64, which is sufficient for generating test data. They will also be faster for either true concurrent usage (`ThreadLocalRandom`), or single thread usage (`SplittableRandom`). Note that Random has a period of 2^48 and is effectively synchronized using an AtomicLong for its state. I can look at the bundle plugin. It is important for our multi-module builds to ensure we do not get a repeat of this module issue again. > Commons-RNG Simple imports package that Commons-RNG Core does not export > > > Key: RNG-186 > URL: https://issues.apache.org/jira/browse/RNG-186 > Project: Commons RNG > Issue Type: Task > Components: core, simple >Affects Versions: 1.5 >Reporter: Richard Eckart de Castilho >Priority: Major > > Commons RNG Simple imports the following packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.simple > Implementation-Version: 1.5 > Import-Package: > org.apache.commons.rng,org.apache.commons.rng.core, > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > However, Commons RNG Core does not export the source packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.core > Implementation-Version: 1.5 > Export-Package: > > org.apache.commons.rng.core;x-friends:="org.apache.commons.rng.simple";version="1.5.0" > Private-Package: > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > Consequently, using Commons RNG simple fails in an OSGi environment as the > bundle cannot be resolved. > {noformat} > [ERROR] Resolution failed. Capabilities satisfying the following requirements > could not be found: > [<>] > ... > ⇒ osgi.wiring.package: > (&(osgi.wiring.package=org.apache.commons.rng.simple)(version>=1.5.0)(!(version>=2.0.0))) > ⇒ [org.apache.commons.rng.simple version=1.5.0] > ⇒ osgi.wiring.package: > (osgi.wiring.package=org.apache.commons.rng.core.source32) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (RNG-186) Commons-RNG Simple imports package that Commons-RNG Core does not export
[ https://issues.apache.org/jira/browse/RNG-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17840398#comment-17840398 ] Richard Eckart de Castilho commented on RNG-186: Thanks for the pointer for not using Random. In my case, it's a test case though where I believe Random is quite sufficient ;) > Commons-RNG Simple imports package that Commons-RNG Core does not export > > > Key: RNG-186 > URL: https://issues.apache.org/jira/browse/RNG-186 > Project: Commons RNG > Issue Type: Task > Components: core, simple >Affects Versions: 1.5 >Reporter: Richard Eckart de Castilho >Priority: Major > > Commons RNG Simple imports the following packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.simple > Implementation-Version: 1.5 > Import-Package: > org.apache.commons.rng,org.apache.commons.rng.core, > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > However, Commons RNG Core does not export the source packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.core > Implementation-Version: 1.5 > Export-Package: > > org.apache.commons.rng.core;x-friends:="org.apache.commons.rng.simple";version="1.5.0" > Private-Package: > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > Consequently, using Commons RNG simple fails in an OSGi environment as the > bundle cannot be resolved. > {noformat} > [ERROR] Resolution failed. Capabilities satisfying the following requirements > could not be found: > [<>] > ... > ⇒ osgi.wiring.package: > (&(osgi.wiring.package=org.apache.commons.rng.simple)(version>=1.5.0)(!(version>=2.0.0))) > ⇒ [org.apache.commons.rng.simple version=1.5.0] > ⇒ osgi.wiring.package: > (osgi.wiring.package=org.apache.commons.rng.core.source32) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (RNG-186) Commons-RNG Simple imports package that Commons-RNG Core does not export
[ https://issues.apache.org/jira/browse/RNG-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17840396#comment-17840396 ] Gilles Sadowski commented on RNG-186: - bq. For my purposes, I have switched simply to using the Java Random class at the moment. https://commons.apache.org/proper/commons-rng/userguide/why_not_java_random.html bq. You might consider using the https://github.com/bndtools/bnd/blob/master/maven-plugins/bnd-testing-maven-plugin [...] Thanks for the suggestion PR welcome that would set this up... > Commons-RNG Simple imports package that Commons-RNG Core does not export > > > Key: RNG-186 > URL: https://issues.apache.org/jira/browse/RNG-186 > Project: Commons RNG > Issue Type: Task > Components: core, simple >Affects Versions: 1.5 >Reporter: Richard Eckart de Castilho >Priority: Major > > Commons RNG Simple imports the following packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.simple > Implementation-Version: 1.5 > Import-Package: > org.apache.commons.rng,org.apache.commons.rng.core, > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > However, Commons RNG Core does not export the source packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.core > Implementation-Version: 1.5 > Export-Package: > > org.apache.commons.rng.core;x-friends:="org.apache.commons.rng.simple";version="1.5.0" > Private-Package: > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > Consequently, using Commons RNG simple fails in an OSGi environment as the > bundle cannot be resolved. > {noformat} > [ERROR] Resolution failed. Capabilities satisfying the following requirements > could not be found: > [<>] > ... > ⇒ osgi.wiring.package: > (&(osgi.wiring.package=org.apache.commons.rng.simple)(version>=1.5.0)(!(version>=2.0.0))) > ⇒ [org.apache.commons.rng.simple version=1.5.0] > ⇒ osgi.wiring.package: > (osgi.wiring.package=org.apache.commons.rng.core.source32) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (RNG-186) Commons-RNG Simple imports package that Commons-RNG Core does not export
[ https://issues.apache.org/jira/browse/RNG-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17840376#comment-17840376 ] Richard Eckart de Castilho commented on RNG-186: For my purposes, I have switched simply to using the Java Random class at the moment. But your description of the remedy sounds correct, so I would expect it works now. You might consider using the https://github.com/bndtools/bnd/blob/master/maven-plugins/bnd-testing-maven-plugin in your build to check if bundles can in principle resolve. > Commons-RNG Simple imports package that Commons-RNG Core does not export > > > Key: RNG-186 > URL: https://issues.apache.org/jira/browse/RNG-186 > Project: Commons RNG > Issue Type: Task > Components: core, simple >Affects Versions: 1.5 >Reporter: Richard Eckart de Castilho >Priority: Major > > Commons RNG Simple imports the following packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.simple > Implementation-Version: 1.5 > Import-Package: > org.apache.commons.rng,org.apache.commons.rng.core, > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > However, Commons RNG Core does not export the source packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.core > Implementation-Version: 1.5 > Export-Package: > > org.apache.commons.rng.core;x-friends:="org.apache.commons.rng.simple";version="1.5.0" > Private-Package: > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > Consequently, using Commons RNG simple fails in an OSGi environment as the > bundle cannot be resolved. > {noformat} > [ERROR] Resolution failed. Capabilities satisfying the following requirements > could not be found: > [<>] > ... > ⇒ osgi.wiring.package: > (&(osgi.wiring.package=org.apache.commons.rng.simple)(version>=1.5.0)(!(version>=2.0.0))) > ⇒ [org.apache.commons.rng.simple version=1.5.0] > ⇒ osgi.wiring.package: > (osgi.wiring.package=org.apache.commons.rng.core.source32) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (RNG-186) Commons-RNG Simple imports package that Commons-RNG Core does not export
[ https://issues.apache.org/jira/browse/RNG-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17838584#comment-17838584 ] Alex Herbert commented on RNG-186: -- The commons-rng-core module was using the header x-friends:="org.apache.commons.rng.simple". This is not a standard header but is reserved for the Eclipse Foundation, see [OSGi Bundle Headers Reference|https://docs.osgi.org/reference/bundle-headers.html]. I do not think this is generally recognised to provide support for cross-module code usage of code not intended for a public API. For general support I believe we must export the other modules required by commons-rng-simple. I have pushed changes to master that update to the latest Commons Parent POM. This uses the maven-bundle-plugin to generate OSGi header and module info file when using a compiler supporting Java 9+. The snapshots should be available on [https://repository.apache.org/content/repositories/snapshots/]. Please try this to see if the change corrects the issue. > Commons-RNG Simple imports package that Commons-RNG Core does not export > > > Key: RNG-186 > URL: https://issues.apache.org/jira/browse/RNG-186 > Project: Commons RNG > Issue Type: Task > Components: core, simple >Affects Versions: 1.5 >Reporter: Richard Eckart de Castilho >Priority: Major > > Commons RNG Simple imports the following packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.simple > Implementation-Version: 1.5 > Import-Package: > org.apache.commons.rng,org.apache.commons.rng.core, > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > However, Commons RNG Core does not export the source packages: > {noformat} > Bundle-SymbolicName: org.apache.commons.rng.core > Implementation-Version: 1.5 > Export-Package: > > org.apache.commons.rng.core;x-friends:="org.apache.commons.rng.simple";version="1.5.0" > Private-Package: > org.apache.commons.rng.core.source32, > org.apache.commons.rng.core.source64, > org.apache.commons.rng.core.util > {noformat} > Consequently, using Commons RNG simple fails in an OSGi environment as the > bundle cannot be resolved. > {noformat} > [ERROR] Resolution failed. Capabilities satisfying the following requirements > could not be found: > [<>] > ... > ⇒ osgi.wiring.package: > (&(osgi.wiring.package=org.apache.commons.rng.simple)(version>=1.5.0)(!(version>=2.0.0))) > ⇒ [org.apache.commons.rng.simple version=1.5.0] > ⇒ osgi.wiring.package: > (osgi.wiring.package=org.apache.commons.rng.core.source32) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)