Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GalLalouche opened this issue Nov 28, 2023 · 1 comment
Open

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

GalLalouche opened this issue Nov 28, 2023 · 1 comment
Labels

Comments

@GalLalouche
Copy link

GalLalouche commented Nov 28, 2023

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

@julien-truffaut
Copy link
Member

Sorry, it is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants