Annotaions that are attached to the enum elements are not visible
While working on https://github.com/sksamuel/avro4s/pull/791 I realized that the 2nd item in the todo list is blocked by the fact we couldn't obtain annotations that are attached to the enum elements via magnolia (1.3.3).
In particular, I'm testing with
import com.sksamuel.avro4s.AvroSortPriority
enum ColoursAnnotatedEnum:
@AvroSortPriority(0)
case Red
@AvroSortPriority(1)
case Amber
@AvroSortPriority(2)
case Green
Is this a well-known issue that won't be fixed in magnolia?
@Zhen-hao no, I can't recall this being a "no-fix" issue :). Parameterless-enums are a bit special (as the cases don't form proper types), so maybe some special-casing needs to be done in the macro. Maybe you'd like to take a stab at trying to fix this?
@Zhen-hao no, I can't recall this being a "no-fix" issue :). Parameterless-enums are a bit special (as the cases don't form proper types), so maybe some special-casing needs to be done in the macro. Maybe you'd like to take a stab at trying to fix this?
Good to know that there are no inherent challenges on this issue. I can take a look at it this weekend. No guarantee that I will find a solution.
I didn't get the time to work on it. Hopefully, I can look into it in October.
@Zhen-hao no worries, looking forward! :)