Giter VIP home page Giter VIP logo

equinox.bundles's Introduction

equinox.bundles's People

Contributors

akurtakov avatar alblue avatar anjumfatima avatar bananeweizen avatar bjhargrave avatar carstenartur avatar ecljpseb0t avatar fipro78 avatar guw avatar hanneswell avatar iloveeclipse avatar jarthorn avatar jjohnstn avatar jonahgraham avatar julianjho avatar laeubi avatar lkirchev avatar mbooth101 avatar merks avatar mickaelistria avatar mkeller avatar niraj-modi avatar rinswind avatar rotty3000 avatar skaegi avatar sprigogin avatar sravanlakkimsetti avatar sxenos avatar tjwatson avatar vogella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

equinox.bundles's Issues

org.eclipse.equinox.preferences has wrong version

The version of org.eclipse.equinox.preferences is most likely wrong after #25.

3.9 version was released already, we can't add API with old version numbers.

I see that API filters were added, because API tooling wants to increase major bundle version, but this doesn't mean if we don't increase major we won't increase minor segment.

This causes such errors like eclipse-platform/eclipse.platform.resources#102 (comment)

Because client code that receives this API re-exported via org.eclipse.core.runtime doesn't see new fields added if the installation contains "old" 3.9 bundles without this API.

So I think we must:

  1. bump org.eclipse.equinox.preferences to 3.10 here :
  2. also bump version of the package (see manifest that says it has 3.4.0 version:
    org.eclipse.core.runtime.preferences;version="3.4.0",
    )
  3. bump re-exported package in org.eclipse.core.runtime to 3.10 here https://github.com/eclipse-platform/eclipse.platform.runtime/blob/4cc1d01f2d8f2e9494b69003f05e064683ebc7cd/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF#L16

Originally posted by @iloveeclipse in #25 (comment)

Enable Discussions?

GH Discussions are a great way to get in touch with users at the point where they report bugs and find the code.

I'd thus like to suggest to enable GH discussions for Equinox.

Incorrect `org.osgi.service.prefs` dependency in org.eclipse.equinox.preferences-3.10.0

The declaration for the org.osgi.service.prefs dependency inside https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.equinox.preferences/3.10.0/org.eclipse.equinox.preferences-3.10.0.pom

is wrong. Instead of being:

    <dependency>
      <groupId>org.osgi.service</groupId>
      <artifactId>org.osgi.service.prefs</artifactId>
      <version>[1.1.0,1.2.0)</version>
    </dependency>

as it currently is, it should be

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.prefs</artifactId>
      <version>[1.1.0,1.2.0)</version>
    </dependency>

(basically, the <groupId> is wrong)
as can be seen on Maven Central: https://search.maven.org/artifact/org.osgi/org.osgi.service.prefs/1.1.2/jar

Otherwise, I get a

org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.10.0 -> org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0): No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range

error. If I patch the POM file in my local maven cache, this problem is resolved and the dependency downloads as expected.

-Dosgi.dataAreaRequiresExplicitInit=true doesn't work anymore

While reviewing eclipse-platform/eclipse.platform.resources#71 I've found, that I'm able to silently init a workspace (with default value) without specifying workspace location explicitly via prompt or -data argument, even if -Dosgi.dataAreaRequiresExplicitInit=true is set in eclipse.ini.

This is a regression, so bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=514333 is back.

I'm investigating where it was broken... 4.19 is OK, 4.20 is broken...

OK, regression is coming from

Ironically, commit message was The start code for the plugin can be migrated to run inside Workspace without changing existing behaviour....

Archive this repository

Please contact the EF Helpdesk so archive this repository now, so no new code is pushed here by accident.

org.osgi.service.prefs.Preferences cannot be resolved. It is indirectly referenced from required .class files

This may be related to #54?

When using 4.24 platform with CDT I see the following errors in the IDE. I have the following errors. These errors do not happen when I build the project with Tycho.

  • The project was not built since its build path is incomplete. Cannot find the class file for org.osgi.service.prefs.Preferences. Fix the build path then try building this project org.eclipse.remote.ui Unknown Java Problem
  • The type org.osgi.service.prefs.Preferences cannot be resolved. It is indirectly referenced from required .class files PreferencesAdapter.java /org.eclipse.remote.ui/src/org/eclipse/remote/internal/ui/preferences line 1 Java Problem

java.lang.IllegalArgumentException: Declaration is invalid in recent builds

At startup in the latest build I see the follow error:

@tjwatson and @HannesWell maybe related to your recent work?

java.lang.IllegalArgumentException: Declaration is invalid: osgi.native; eclipse.product="org.eclipse.sdk.ide"; osgi.nl="de_DE"; osgi.framework.useSystemProperties="true"; osgi.instance.area.default="file:/C:/Users/vogella/workspace/"; ds.delayed.keepInstances.default="true"; osgi.bundles="reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start"; osgi.native.osversion:Version="10.0.0"; osgi.native.osname:List="Windows10,Windows 10,Win10,Win32"; eclipse.p2.profile="SDKProfile"; org.osgi.framework.processor="x86-64"; osgi.framework="file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar"; osgi.framework.extensions="reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar"; osgi.os="win32"; org.osgi.framework.os.name="Windows10"; osgi.splashPath="platform:/base/plugins/org.eclipse.platform"; osgi.arch="x86_64"; osgi.ws="win32"; osgi.instance.area="C:\Users\vogella\workspace\eclipse"; org.eclipse.equinox.simpleconfigurator.configUrl="file:org.eclipse.equinox.simpleconfigurator/bundles.info"; osgi.bundles.defaultStartLevel="4"; org.osgi.framework.language="de"; osgi.native.processor:List="x86-64,amd64,em64t,x86_64"; eclipse.application="org.eclipse.ui.ide.workbench"; org.osgi.framework.os.version="10.0.0"; osgi.compatibility.bootdelegation.default="true"; eclipse.p2.data.area="@config.dir/../p2/"; eclipse.buildId="4.24.0.I20220427-0410"; osgi.native.language="de"
at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createGenericDescriptions(StateObjectFactoryImpl.java:582)
at org.eclipse.osgi.compatibility.state.StateConverter.createProvideCapability(StateConverter.java:116)
at org.eclipse.osgi.compatibility.state.StateConverter.createDescription(StateConverter.java:67)
at org.eclipse.osgi.compatibility.state.PlatformAdminImpl.createSystemState(PlatformAdminImpl.java:107)
at org.eclipse.osgi.compatibility.state.PlatformAdminImpl.getSystemState(PlatformAdminImpl.java:85)
at org.eclipse.osgi.compatibility.state.ReadOnlyState.getBundle(ReadOnlyState.java:41)
at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.getIsEnabled(LocalRegistryBackend.java:291)
at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.createBundleAdapter(LocalRegistryBackend.java:155)
at org.eclipse.pde.internal.runtime.registry.model.LocalRegistryBackend.bundleChanged(LocalRegistryBackend.java:399)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Caused by: org.osgi.framework.BundleException: Invalid manifest header Provide-Capability: "osgi.native; eclipse.product="org.eclipse.sdk.ide"; osgi.nl="de_DE"; osgi.framework.useSystemProperties="true"; osgi.instance.area.default="file:/C:/Users/vogella/workspace/"; ds.delayed.keepInstances.default="true"; osgi.bundles="reference:file:org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar@1:start"; osgi.native.osversion:Version="10.0.0"; osgi.native.osname:List="Windows10,Windows 10,Win10,Win32"; eclipse.p2.profile="SDKProfile"; org.osgi.framework.processor="x86-64"; osgi.framework="file:/c:/Users/vogella/Downloads/eclipse-SDK-I20220424-1800-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.18.0.v20220426-2016.jar"; osgi.framework.extensions="reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar"; osgi.os="win32"; org.osgi.framework.os.name="Windows10"; osgi.splashPath="platform:/base/plugins/org.eclipse.platform"; osgi.arch="x86_64"; osgi.ws="win32"; osgi.instance.area="C:\Users\vogella\workspace\eclipse"; org.eclipse.equinox.simpleconfigurator.configUrl="file:org.eclipse.equinox.simpleconfigurator/bundles.info"; osgi.bundles.defaultStartLevel="4"; org.osgi.framework.language="de"; osgi.native.processor:List="x86-64,amd64,em64t,x86_64"; eclipse.application="org.eclipse.ui.ide.workbench"; org.osgi.framework.os.version="10.0.0"; osgi.compatibility.bootdelegation.default="true"; eclipse.p2.data.area="@config.dir/../p2/"; eclipse.buildId="4.24.0.I20220427-0410"; osgi.native.language="de""
at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:444)
at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createGenericDescriptions(StateObjectFactoryImpl.java:577)
... 11 more

Storage location for ConfigAdmin

Hi,

I created a small OSGi application based on Equinox. I then created a small JVM using Atomos and jlink. It works quite nice, but it seems the configuration I apply at runtime is not persisted.

I had the same issue with a similar setup using the Felix bundles. I ended up adding

-Dfelix.cm.dir="<CONFIG_PERSISTENCE_FOLDER>"

to the start script JLINK_VM_OPTIONS. For the Felix jlink JVM this works fine and the folder is created with the persisted configuration.

But I am not able to do this for the Equinox ConfigAdmin. Looking at the ConfigurationStore it seems to always use the BundleContext and does not support any other configuration. I then thought to set the configuration area via

-Dosgi.configuration.area="<CONFIG_PERSISTENCE_FOLDER>"

but that doesn't have any effect.

Is there any way to specify the location where the configuration should be persisted? Should it be osgi.configuration.area to specify the whole configuration folder and bundle cache? Or is there another system property I haven't found yet?

logback RCE CVE-2021-42550

I don't know where to write about these libraries

CVE-2021-42550

scanner
args:[--scan-log4j1 --scan-logback --scan-zip]

[?] Found CVE-2021-42550 (logback 1.2.7) vulnerability in $ECLIPSE_DIR/plugins/ch.qos.logback.classic_1.2.3.v20200428-2012.jar, logback N/A
[?] Found CVE-2021-42550 (logback 1.2.7) vulnerability in $HOME/.p2/pool/plugins/ch.qos.logback.classic_1.1.2.v20171220-1825.jar, logback N/A

There is a new test fail caused by this change, tests must be updated too.

There is a new test fail caused by this change, tests must be updated too.

https://download.eclipse.org/eclipse/downloads/drops4/I20220414-1800/testresults/html/org.eclipse.core.tests.runtime_ep424I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html

org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest | testLegacy | Failure | 
3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>junit.framework.ComparisonFailure: 3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>at junit.framework.Assert.assertEquals(Assert.java:100)at junit.framework.TestCase.assertEquals(TestCase.java:253)at org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest.testLegacy(EclipsePreferencesTest.java:1091)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Originally posted by @iloveeclipse in #15 (comment)

Build failure in 4.24 I-Build: I20220428-0120

Error message

 [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.0-SNAPSHOT:compile (default-compile) on project org.eclipse.equinox.log.stream: Compilation failure: Compilation failure: 
 [ERROR] /home/jenkins/agent/workspace/I-build-4.24/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production/gitCache/eclipse.platform.releng.aggregator/rt.equinox.bundles/bundles/org.eclipse.equinox.log.stream/src/org/eclipse/equinox/internal/log/stream/LogStreamProviderFactory.java: 
 [ERROR] 	/*******************************************************************************
 [ERROR] 	^
 [ERROR] The type org.osgi.util.function.Predicate cannot be resolved. It is indirectly referenced from required .class files
 [ERROR] 1 problem (1 error)
 [ERROR] -> [Help 1]
 [ERROR] 
 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR] 
 [ERROR] For more information about the errors and possible solutions, please read the following articles:
 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
 [ERROR] 
 [ERROR] After correcting the problems, you can resume the build with the command
 [ERROR]   mvn <args> -rf :org.eclipse.equinox.log.stream

Publish the a "BundleStateScope" as an IScopeContext service (factory)

Currently a common patterns is that one acquires the instance scope through a static access InstanceScope.INSTANCE and then pass the ID of the bundle to listen for preference changes.

Another similar call is Platform.getStateLocation(...) or Plugin.getStateLocation to get an IPath to store bundle specific data.

Both calls suffer from the fact (due to their static access) that they are prone to initialization order problems, e.g. if the workspace location is not set. Beside that, a user of these must in one way or another bind itself to the Platform and/or Plugin activator to work where a reference to IScopeContext / IEclipsePreferences would be enough.

I'd thus would suggest the following:

  • There is a (private) BundleStateScope that register a IScopeContext service factory that creates a BundleStateScope passing the requesting bundle
  • The IScopeContext.getNode(String) method uses InstanceScope.INSTANCE.getNode(bundle.getSymbolicName()).node(qualifier)
  • The IScopeContext.getLocation() returns MetaDataKeeper.getMetaArea().getStateLocation(bundle)

That way a component that want to use either of both could simply use:

@Reference(target = "(context=bundle)")
IScopeContext scopeContext;

to get a reference and then call to add a preference listener to the root:
scopeContext.getNode("").addPreferenceChangeListener(this);
or
IPath myLocation = scopeContext.getLocation();
to get hold of its state location.

Given that we delay the registration of the service factory until a suitable state is reached (e.g. workspace URL set) such a component is resistant to start-order dependencies or to early bundle activation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.