Repository navigation
fix: answer no builder for scope-excluded beans in MapStruct SPI (#383) - #395
Merged
AndreasIgel merged 4 commits intoNov 10, 2026
Conversation
igel-devin-ai
commented
Nov 10, 2026
igel-devin-ai
commented
Nov 10, 2026
igel-devin-ai
commented
Nov 10, 2026
devin-ai-integration
Bot
deleted the
devin/1794290179-mapstruct-scope-miss
branch
November 22, 2026 14:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #383.
MapStructBuilderProviderdeferred every unpublished bean while the simple-builders registry was unfinished. WhenBuilderProcessorplans nothing (every marked bean outsidebuilderGenerationPackages) it generates no source, javac starts no further round, and MapStruct 1.6.3 does not retry deferred lookups in processing-over — the mapper fails with "No implementation was created".The provider now answers "no builder" immediately when planning can never produce one:
builderGenerationPackagesscope excludes its package (compiler option plus annotation/inherited/template overrides viaBuilderConfigurationReader),java.*,javax.*,jdk.*) that MapStruct probes for property types.MapStructAdditionalSupportedOptionsProviderdeclaresbuilderGenerationPackagesso MapStruct forwards-Asimplebuilder.builderGenerationPackagesinto SPI environments.BuilderConfigurationReadergained SPI-usable readers for compiler options and per-element generation scope.Test-first:
mapStruct_processorOrderReversed_markedBeanOutsideGenerationScope_shouldMapViaSettersfailed before the fix with the MapStruct "No implementation was created" diagnostic and passes after;MapStructSpiProbeTestnow expects the immediate empty answer for scope-excluded beans.mvn clean installis green (486 processor tests).