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

Remove Service-Component OSGI-INF/*.xml from uber-jar #1732

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

merks
Copy link

@merks merks commented Feb 20, 2025

@merks
Copy link
Author

merks commented Feb 20, 2025

I ran the build locally and there is no such folder:

merks@CORE MINGW64 /d/Users/merks/temp/lemminx/org.eclipse.lemminx
$find . -name "*OSGI*"

merks@CORE MINGW64 /d/Users/merks/temp/lemminx/org.eclipse.lemminx

@mickaelistria
Copy link
Contributor

@laeubi Can you please review?

@laeubi
Copy link
Contributor

laeubi commented Feb 20, 2025

I ran the build locally and there is no such folder

please read the spec:

The last component of each path in the Service-Component header may use wildcards so that Bundle.findEntries can be used to locate the XML document within the bundle and its fragments.
For example:

Service-Component: OSGI-INF/*.xml

See also:

so this is not an error but allows extension of the lemminx-uber jar provided with OSGi-Fragements, so this is not an error.

@merks
Copy link
Author

merks commented Feb 20, 2025

Is it an error not to have it? What will no longer work without it? What is looking up what, where, and why? Is anyone actually using that capability or is this something that could exist but doesn't current actually exist?

Pretend that I am stupid and know nothing about this. Also imagine a million users coming to this issue who will be equally confused and that being told to please read the spec and/or please go complain somewhere about ambiguous logging specification will perhaps prove unsatisfying. They might shake their heads and ask "What's wrong with these people?" hypothetically speaking...

Or a different question, whomever is pulls this dependency into an installation, can they provide said fragment that will make the error stop logging? Or better yet, can the project itself provide a degenerate/no-op/empty XML file that will make it stop logging. Can we can do something/anything to that make something be located by the wildcard so that there is no error logged?

@laeubi
Copy link
Contributor

laeubi commented Feb 20, 2025

Is it an error not to have it?

Of course not

What will no longer work without it?

You can no longer extend the bundle with fragments that contain declarative service components.

What is looking up what, where, and why?

https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#d0e30931

Is anyone actually using that capability or is this something that could exist but doesn't current actually exist?

As it was only added with the last release it could be used now but not before. e.g. m2e is providing an extension to lemminx now, for further details see:

Pretend that I am stupid and know nothing about this. Also imagine a million users coming to this issue who will be equally confused and that being told to please read the spec and/or please go complain somewhere about ambiguous logging specification will perhaps prove unsatisfying. They might shake their heads and ask "What's wrong with these people?" hypothetically speaking...

This is really hypothetical as no one is actually looking at the Eclipse log (or no one really complains) as these are not errors that surface to the usual user, e.g. this is what I see in my daily eclipse (and I regularly clear the error log so it is only from the past days):
grafik

So did we get "million complains"? not really ... are people confused? not really... Does anyone work on these issue? I'm not sure ...

Can we can do something/anything to that make something be located by the wildcard so that there is no error logged?

Eclipse consumes https://github.com/apache/felix-dev/tree/master/scr what is the component that logs the error.

@merks
Copy link
Author

merks commented Feb 20, 2025

Repeating different question... Whomever is pulls this dependency into an installation, can they provide said fragment that will make the error stop logging? Or better yet, can the project itself provide a degenerate/no-op/empty XML file that will make it stop logging? Can we can do something/anything now to that make something be located by the wildcard so that there is no error logged?

@laeubi
Copy link
Contributor

laeubi commented Feb 20, 2025

I have created

or better yet, can the project itself provide a degenerate/no-op/empty XML file that will make it stop logging?

Having something added as a workaround to suppress a harmless logmessage do not seems valuable to me. For the record an dummy, disabled by default component description will look like this:

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" enabled="false" name="dummy">
   <!-- See https://github.com/apache/felix-dev/pull/383 -->
   <implementation class="java.lang.Object"/>
</scr:component>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants