Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect version in module-info #17

Closed
fipro78 opened this issue May 5, 2022 · 5 comments
Closed

Incorrect version in module-info #17

fipro78 opened this issue May 5, 2022 · 5 comments
Labels
in:framework Issues related to the OSGi Framework implementation

Comments

@fipro78
Copy link
Contributor

fipro78 commented May 5, 2022

I just noticed that the module-info of org.eclipse.osgi has the version 3.17.200-SNAPSHOT while the bundle itself has the version 3.17.200.v20220215-2237 in the MANIFEST.MF.

@tjwatson
Copy link
Contributor

tjwatson commented May 5, 2022

I don't see a way to tell moditect to set the module attribute module_version_index to anything specific. It appears to use the pom.xml version. Our build always uses pom versions with SNAPSHOT and then it fills in the qualifier for the bundle manifest version. But we don't do anything with the maven version. Then when they go to publish the artifact to maven central they drop the SNAPSHOT from the maven version.

While this is annoying, I wonder what practical issues it has because there is no way to require a specific version of a Java module.

@laeubi
Copy link
Member

laeubi commented May 5, 2022

Tycho has a new feature to automatically match the pom-version with the manifest version see: https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md#enhanced-support-for-maven-ci-friendly-versions

@fipro78
Copy link
Contributor Author

fipro78 commented May 5, 2022

I don't know if this is really an issue or if this causes problems. I just noticed that inconsistency when looking into another issue and I was wondering why org.eclipse.osgi is a SNAPSHOT although I downloaded the release version. Probably more a user confusion issue rather than a technical one.

@stbischof
Copy link
Contributor

fyi:
i let bnd generate the module-info.class automatically. The result is.
not really related to this issue but if the discussion goes more in the direction of "how to generate the file" this would also be a way

open module org.eclipse.osgi {
  requires j9stubs-j9stubs;
  requires java.base;
  requires java.management;
  requires java.xml;
  requires jdk.unsupported;
  
  exports org.eclipse.equinox.log;
  exports org.eclipse.osgi.framework.console;
  exports org.eclipse.osgi.framework.eventmgr;
  exports org.eclipse.osgi.framework.log;
  exports org.eclipse.osgi.report.resolution;
  exports org.eclipse.osgi.service.datalocation;
  exports org.eclipse.osgi.service.debug;
  exports org.eclipse.osgi.service.environment;
  exports org.eclipse.osgi.service.localization;
  exports org.eclipse.osgi.service.runnable;
  exports org.eclipse.osgi.service.urlconversion;
  exports org.eclipse.osgi.storagemanager;
  exports org.eclipse.osgi.util;
  exports org.osgi.dto;
  exports org.osgi.framework.connect;
  exports org.osgi.framework.dto;
  exports org.osgi.framework.hooks.bundle;
  exports org.osgi.framework.hooks.resolver;
  exports org.osgi.framework.hooks.service;
  exports org.osgi.framework.hooks.weaving;
  exports org.osgi.framework.launch;
  exports org.osgi.framework.namespace;
  exports org.osgi.framework.startlevel.dto;
  exports org.osgi.framework.startlevel;
  exports org.osgi.framework.wiring.dto;
  exports org.osgi.framework.wiring;
  exports org.osgi.framework;
  exports org.osgi.resource.dto;
  exports org.osgi.resource;
  exports org.osgi.service.condition;
  exports org.osgi.service.condpermadmin;
  exports org.osgi.service.log.admin;
  exports org.osgi.service.log;
  exports org.osgi.service.packageadmin;
  exports org.osgi.service.permissionadmin;
  exports org.osgi.service.resolver;
  exports org.osgi.service.startlevel;
  exports org.osgi.service.url;
  exports org.osgi.util.tracker;
  exports org.eclipse.osgi.internal.debug;
  exports org.eclipse.osgi.internal.framework;
  exports org.eclipse.osgi.internal.hookregistry;
  exports org.eclipse.osgi.internal.loader;
  exports org.eclipse.osgi.internal.loader.buddy;
  exports org.eclipse.osgi.internal.loader.classpath;
  exports org.eclipse.osgi.internal.loader.sources;
  exports org.eclipse.osgi.internal.location;
  exports org.eclipse.osgi.internal.provisional.service.security;
  exports org.eclipse.osgi.internal.provisional.verifier;
  exports org.eclipse.osgi.internal.service.security;
  exports org.eclipse.osgi.internal.serviceregistry;
  exports org.eclipse.osgi.internal.signedcontent;
  exports org.eclipse.osgi.internal.url;
  exports org.eclipse.osgi.internal.messages;
  exports org.eclipse.osgi.framework.internal.reliablefile;
  exports org.eclipse.core.runtime.adaptor;
  exports org.eclipse.core.runtime.internal.adaptor;
  exports org.eclipse.osgi.container;
  exports org.eclipse.osgi.container.builders;
  exports org.eclipse.osgi.container.namespaces;
  exports org.eclipse.osgi.framework.util;
  exports org.eclipse.osgi.launch;
  exports org.eclipse.osgi.service.pluginconversion;
  exports org.eclipse.osgi.service.resolver;
  exports org.eclipse.osgi.service.security;
  exports org.eclipse.osgi.signedcontent;
  exports org.eclipse.osgi.storage;
  exports org.eclipse.osgi.storage.bundlefile;
  exports org.eclipse.osgi.storage.url;
  exports org.osgi.service.serviceloader;
  
  provides org.osgi.framework.connect.ConnectFrameworkFactory with org.eclipse.osgi.launch.EquinoxFactory;
  provides org.osgi.framework.launch.FrameworkFactory with org.eclipse.osgi.launch.EquinoxFactory;
}

@laeubi laeubi transferred this issue from eclipse-equinox/equinox.framework Jun 16, 2022
@tjwatson tjwatson added the in:framework Issues related to the OSGi Framework implementation label Jun 20, 2022
@tjwatson
Copy link
Contributor

Now that we are moving to use BND to generate the module-info class, we have moved to striping off the qualifier from the module-info version (see #53). I'm going to close this issue because it was about the incorrect version being set with our usage of modetect. There is still some work that needs to be done to make sure the BND production of module-info is correct #27.

laeubi pushed a commit to laeubi/equinox that referenced this issue Jan 19, 2023
When bundles are discarded during Equinox construction (before init is
called) the framework will force a refresh on the discarded bundles this
may trigger already resolved bundles to be re-resolved.  During the
constructor call we must prevent non-extension bundles that get
refreshed from resolving until after the framework has been initialized.

Fixes eclipse-equinox#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:framework Issues related to the OSGi Framework implementation
Projects
None yet
Development

No branches or pull requests

4 participants