optics-dev / optics-dev/Monocle
Lens macro-generated for a specific field should allow introspecting the name
Open
Nobody has claimed this yet.
feature
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 207
- Avg merge
- 7h 59m
- Merged PRs (30d)
- 5
Description
For instance, given
case class Person(age: Int)
val personAge = GenLens[Person](_.age)
It would be useful to be able to do personAge.name and get back "age". There are a number of use cases for this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the GenLensPerson macro entry point and how the generated lens represents the selected field. Determine how a name such as "age" could be exposed through the lens API, then add coverage for personAge.name returning "age" and verify existing lens behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100