-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Use case
Spi Implementations have a better opportunity for reusability if they are configurable. Currently MapStruct's MappingProcessor does not pass the compilerArgs down to the MapStructProcessingEnvironment which is received on the init methods of the Spi classes (such as AccessorNamingStrategy).
Example of such use case: entur/mapstruct-spi-protobuf#133 (this approach ultimately failed because a workaround was needed to retrieve the options that MapStruct does not pass through).
Generated Code
To resolve this we can just pass the options down to MapStructProcessingEnvironment. To be safe, we can limit this to only options under the namespace of mapstruct.ap.spi.
Possible workarounds
There are no viable work arounds. An attempt was made to have the options loaded from a parallel processor but there is no guarantee of processor initialization order.
MapStruct Version
MapStruct 1.5.3