enumeratum icon indicating copy to clipboard operation
enumeratum copied to clipboard

Mix scala 2 and 3 macros

Open gregghz opened this issue 1 year ago • 5 comments
trafficstars

This follows the pattern shown here: https://docs.scala-lang.org/scala3/guides/migration/tutorial-macro-mixing.html#:~:text=Introduction,during%20the%20macro%20expansion%20phase

This would allow a mixed scala version project to depend on the scala 3 version of enumeratum and build correctly for both scala 2 modules and scala 3 modules. This is particularly helpful when building with bazel since you can't conditionally include a dependency based on the current scala version the same way you would in sbt.

This was brought up previously by @coreywoodfield here: https://github.com/lloydmeta/enumeratum/issues/300#issuecomment-1363451865 (and he is the author of this PR -- I just rebased the branch).

gregghz avatar May 21 '24 21:05 gregghz

Thanks for the PR but can you please add a description for this that explains why we want this?

lloydmeta avatar May 21 '24 23:05 lloydmeta

@lloydmeta ah, thanks for taking a look. I've updated the description to clarify what's going on.

gregghz avatar May 21 '24 23:05 gregghz

@lloydmeta thanks for your patience with this. I just updated things again to hopefully resolve the build failures. I can't remember, were you manually triggering builds?

gregghz avatar Sep 20 '24 21:09 gregghz

Yea... I think I set something up once that requires me to approve the CI runs 🤦‍♂️

lloydmeta avatar Sep 21 '24 02:09 lloydmeta

:warning: 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 :white_check_mark:

Project coverage is 85.30%. Comparing base (10a084d) to head (69038cf).

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   85.71%   85.30%   -0.41%     
==========================================
  Files          63       65       +2     
  Lines         511      599      +88     
  Branches       34       51      +17     
==========================================
+ Hits          438      511      +73     
- Misses         73       88      +15     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 22 '24 00:09 codecov-commenter