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

Fix parsing of service provider file #3843

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

karelmaxa
Copy link
Contributor

This PR fixes wrong parsing of the service provider configuration file in the OSGi environment.

The specification of the configuration file is the following (see ServiceLoader JavaDoc):

The provider-configuration file must be encoded in UTF-8. Space and tab characters surrounding each service provider's name, as well as blank lines, are ignored. The comment character is '#' (U+0023 NUMBER SIGN); on each line all characters following the first comment character are ignored

Check List:

  • Unit tests: YES
  • Documentation: NO

@karelmaxa karelmaxa changed the title Fix parsing of service provider file (#3841). Fix parsing of service provider file Feb 7, 2024
Copy link
Contributor

@filiphr filiphr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @karelmaxa. Everything looks great, only one small change

@pavelhoral
Copy link
Contributor

A bit off topic (explanation for the crashing tests):

The build crashes because of FlowableMyBatisRuntimeHints uses non-exported shaded (internal) Javassist class from mybatis dependency. Then the class FlowableAppRuntimeHints uses imports from spring-core dependency, which is not defined as OSGi at all. And there might be others (I did not dig deeper). I think that the current state of main branch is kind of totally broken from the OSGi point of view.

So this seems like it needs to be addressed at some architectural design level whether OSGi is a concern or not. I am just a "passer by", so I just wanted to share this knowledge without knowing what to do with this information.

@filiphr
Copy link
Contributor

filiphr commented Feb 7, 2024

Thanks for the explanation @pavelhoral. Those hints were moved just today. We'll look into fixing those OSGi tests. Seems like you know your way around OSGi, do you perhaps know if there is a way to exclude some classes? e.g. those runtime hints are not needed in an OSGi world.

@pavelhoral
Copy link
Contributor

pavelhoral commented Feb 7, 2024

I am just an OSGi user... but I can try to look into it later. Normally you would define the packages that should not be exported with an exclamation mark in front of it. But there is a conflict with the configuration in the root POM file that practically marks all module packages for export (so it can not be overridden).

@pavelhoral
Copy link
Contributor

I have created dedicated issue to the wiring issue #3844. This PR has kind of nothing to do with it. Also apologies for my previous comment that contained a lot of nonsense (now decorated with "strikethrough").

@filiphr
Copy link
Contributor

filiphr commented Feb 8, 2024

Thanks @pavelhoral for the OSGi fixes on main. I've re-run the tests here to see that everything is OK. Will merge after that. Thanks @karelmaxa

@karelmaxa
Copy link
Contributor Author

karelmaxa commented Feb 9, 2024

I have rebased the branch with the main, so the OSGi test fix should now be included.

@filiphr
Copy link
Contributor

filiphr commented Feb 9, 2024

Thanks @karelmaxa. The rebase wasn't entirely needed due to the way GitHub does PR checks. The tests are run by applying your changes on top of the target branch (main) and then running the tests.

@filiphr filiphr merged commit 5bca8a4 into flowable:main Feb 9, 2024
1 of 2 checks passed
@karelmaxa karelmaxa deleted the fix-3841 branch February 9, 2024 08:14
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.

4 participants