Sub-task of #301.
Goal
The contract checks in BuilderScopeResolver.resolveByBuilderContract (ctor(T), B(), build(), and later the factory methods from #309) currently only verify that the members exist. They should additionally verify the members are accessible from the package the generated builder is placed in — e.g. via ProcessingContext.isMemberAccessibleFromBuilderPackage.
Why
Generated consumer code calls the referenced builder's constructor and build() from the generated builder's package. A candidate whose ctor(T), B() or build() is private — or package-private while the generated builder lands in a different package (e.g. via packageName) — passes the contract today but produces uncompilable code.
Sub-task of #301.
Goal
The contract checks in
BuilderScopeResolver.resolveByBuilderContract(ctor(T),B(),build(), and later the factory methods from #309) currently only verify that the members exist. They should additionally verify the members are accessible from the package the generated builder is placed in — e.g. viaProcessingContext.isMemberAccessibleFromBuilderPackage.Why
Generated consumer code calls the referenced builder's constructor and
build()from the generated builder's package. A candidate whosector(T),B()orbuild()is private — or package-private while the generated builder lands in a different package (e.g. viapackageName) — passes the contract today but produces uncompilable code.