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

Use ServiceLoader to find Backend and Object Factory implementations #1450

Closed
mpkorstanje opened this issue Sep 2, 2018 · 5 comments
Closed
Labels
good first issue Good for newcomers 🙏 help wanted Help wanted - not prioritized by core team
Milestone

Comments

@mpkorstanje
Copy link
Contributor

Summary

We currently use class path scanning to find backend and factory implementations. This is slow and makes setting up mock for tests a pain (they are also discovered). A ServiceLoader avoids this problem. This wasn't possible earlier versions of Cucumber because we compiled these against java 6.

https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html

@mpkorstanje mpkorstanje added this to the 5.0.0 milestone Sep 2, 2018
@mpkorstanje mpkorstanje changed the title Use ServiceLoader to Backend and Object Factories Use ServiceLoader to find Backend and Object Factories Sep 2, 2018
@mpkorstanje mpkorstanje changed the title Use ServiceLoader to find Backend and Object Factories Use ServiceLoader to find Backend and Object Factory implementations Sep 2, 2018
@aslakhellesoy
Copy link
Contributor

Yes, this would be a great improvement!

@aslakhellesoy aslakhellesoy added 🙏 help wanted Help wanted - not prioritized by core team good first issue Good for newcomers labels Sep 9, 2018
@nhojpatrick
Copy link
Member

Will look into this. Never used ServiceLoader before so also will improve my understanding of code java.
Just checking I should branch from develop-v5... when you say 5.0.0 milestone

@mpkorstanje
Copy link
Contributor Author

Great! And yes, please use the v5 branch! You'll notice it has significant structural changes.

This will help move us towards automatic module names, expose less of cucumbers implementation details, ect.

@mpkorstanje
Copy link
Contributor Author

Resolved by a03dd01.

@lock
Copy link

lock bot commented Nov 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers 🙏 help wanted Help wanted - not prioritized by core team
Projects
None yet
Development

No branches or pull requests

4 participants