-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Improved Plugin API #1834
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
Is there also a plan to add an api which provides a minimal representation of some pickles(For some detailed third party reporting it needs Feature pickle etc) as a part of this feature request? |
Currently the pickles are available as There currently is no good way to access how the pickles are organized in a feature and I hope to unlock that with #1870. But that will be a very generic tree structure. It won't for example contain the outline steps in a Scenario outline. So it depends on how much detail you'll need. For AST level detail you'll have to parse the features yourself or wait for cucumber messages to be integrated with Cucumber JVM which will include a well defined json schema for the AST. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
I am working on a project that'd benefit from a more flexible plugin structure, can we make a deal where I'll rework the plugins and you let me add some features (such as reading registered stepdefs from glue, accessing type transformers etc.) I started working on separating the plugins to their own small modules and not surprisingly this will break compatibility so it might be a good opportunity to introduce some wanted changes. I am proposing these changes: Also to avoid FQN for "3rd" party plugins each plugin can be annotated with Another change would be removing interfaces like Also coming: more config options! I'd like for the plugins to have the ability to be more configurable, the config values would be accessed via the ActivationContext as well. Another useful feature would be to open outputstreams/writers via the ActivationContext as well, so the resources get autoclosed, but I need to look at how the plugins handle their outputs, maybe the context won't create them but you'll be able to register your Any arguments to my proposal or other changes that would be appreciated? |
If you are looking to access the glue context from a plugin, perhaps it is best to explain underlying use case. It could be that a plugin may not be the right solution or there may be a different solution all together. Could you create a new issue for the changes you actually want done? |
I described the use case in #2239 |
Another consideration comes from cucumber/junit-xml-formatter#27. Plugins may need to access have configuration options, somehow.... |
Issues with the plugin system
URLOutputStream
is an abomination.Path
andFileSystem
APIs.Appendable
can't be closed but we trick around that inNiceAppendable
.OutputStream
argument must always be closed. Plugins however can't tell if Cucumber crashed and thus can't clean it up. This should be done by Cucumber (it created the stream so it owns it).Solution
Appendable
as valid argument.Something in that direction anyway.
The text was updated successfully, but these errors were encountered: