When implementing a plugin, I can determine the source reference of a Step Definition (using handler on Envelope.stepDefinition), but I cannot determine the source reference for a ParameterType.
The cause is CachingGlue.emitParameterTypeDefined which creates an Envelope with a ParameterType which miss the source reference information.
🤔 What's the problem you're trying to solve?
When implementing a plugin, I can determine the source reference of a Step Definition (using handler on
Envelope.stepDefinition
), but I cannot determine the source reference for aParameterType
.The cause is
CachingGlue.emitParameterTypeDefined
which creates anEnvelope
with aParameterType
which miss the source reference information.✨ What's your proposed solution?
A simple solution would be to:
SourceReference
in theio.cucumber.messages.types.ParameterType
. Hint: requires changing the cucumber messages schema (https://github.com/cucumber/messages/tree/main/jsonschema) which generates classes for Java and other languages, see https://github.com/cucumber/messages/issues/145. A snapshot version of the library should be made.ParameterType
source reference when theEnvelope.parameterType
"event" is sent to the event bus, see https://github.com/cucumber/cucumber-jvm/issues/2719 for the corresponding Java feature.⛏ Have you considered any alternatives or workarounds?
N/A