Skip to content

Is it possible to make @Lenses ignore some fields? #1411

Open
@GalLalouche

Description

@GalLalouche

Suppose I have the following case class (I'm using Scala 2.13):

case class Foo(
  a: Int,
  b: Int,
  ...,
  z: Int,
  noLens: Int
)

Is there any way to use @Lenses to create lenses for all fields except noLens? I tried using private val or multiple parameter lists, but both cases resulted in a compilation error. I know I can manually create all the other lenses, but that's very verbose.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions