-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Use ServiceLoader to find Backend and Object Factory implementations #1450
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
Comments
Yes, this would be a great improvement! |
Will look into this. Never used ServiceLoader before so also will improve my understanding of code java. |
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. |
Resolved by a03dd01. |
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. |
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
The text was updated successfully, but these errors were encountered: