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

allow value constructor param to be any constructor parameter, rather than only the first #398

Merged

Conversation

martijnhoekstra
Copy link
Contributor

simplify and correct finding the constructor param index for the value param.

As a follow-up, I want to double-check whether we need to require -Yretain-trees.

Some of the boyscouting here is a matter of taste, if it's not to yours, I'm happy to revert.

@martijnhoekstra martijnhoekstra force-pushed the allow-value-to-the-right branch from a1cde16 to d3a872c Compare June 23, 2024 11:53
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.71%. Comparing base (1fbbd04) to head (3aeaa51).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #398   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files          63       63           
  Lines         511      511           
  Branches       34       34           
=======================================
  Hits          438      438           
  Misses         73       73           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lloydmeta
Copy link
Owner

Thanks for this. I will definitely review this once I have some spare time 🙇‍♂️

Copy link
Owner

@lloydmeta lloydmeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a question and two suggestions for reverting error messages.

++ on the simplification here.

macros/src/main/scala-3/enumeratum/ValueEnumMacros.scala Outdated Show resolved Hide resolved
macros/src/main/scala-3/enumeratum/ValueEnumMacros.scala Outdated Show resolved Hide resolved
macros/src/main/scala-3/enumeratum/ValueEnumMacros.scala Outdated Show resolved Hide resolved
Copy link
Owner

@lloydmeta lloydmeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm holding off on merging until I have time to release a new version.

@lloydmeta lloydmeta merged commit df708af into lloydmeta:master Jul 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants