Skip to content

Commit

Permalink
Add notes for 2.0.0 cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszKubuszok committed Jan 5, 2025
1 parent efd61db commit 7137b36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ trait ProductTypes { this: Definitions =>
sealed trait SourceType extends scala.Product with Serializable
object SourceType {

// FIXME (2.0.0 cleanup): split into ConstructorArgVar and ConstructorBodyVal
/** `val`/`lazy val` initialized by constructor - either as val parameter or in body */
case object ConstructorVal extends SourceType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ private[compiletime] trait TransformProductToProductRuleModule { this: Derivatio
)(implicit ctx: TransformationContext[From, To]): DerivationResult[Rule.ExpansionResult[ToOrPartialTo]] = {
import ctx.config.*

// FIXME (2.0.0 cleanup): use only ConstructorArgVals as source in position-based matching, unless enabled by flag
val usePositionBasedMatching = Type[From].isTuple || Type[To].isTuple
lazy val fromEnabledExtractorsForPositionBasedMatching = fromExtractors.filter { case (name, getter) =>
val fieldFlags = flags.at(TargetPath(Path(_.select(name))))
Expand Down

0 comments on commit 7137b36

Please sign in to comment.