Skip to content

Remove shapeless dependency in scala 3#1193

Merged
fthomas merged 1 commit intofthomas:masterfrom
mrdziuban:remove-shapeless-scala-3
Jun 15, 2023
Merged

Remove shapeless dependency in scala 3#1193
fthomas merged 1 commit intofthomas:masterfrom
mrdziuban:remove-shapeless-scala-3

Conversation

@mrdziuban
Copy link
Contributor

Fixes #1173

This removes the shapeless dependency completely from the scala 3 version of each project. Where there was a natural replacement, I swapped it in:

  • shapeless.HNil is now scala.EmptyTuple
  • shapeless.HList is now scala.Tuple
  • shapeless.:: is now scala.*:
  • N <: shapeless.Nat is now N <: Int
  • shapeless.nat._N is now just N, taking advantage of literal types
  • shapeless.Succ is now scala.compiletime.ops.int.S
  • shapeless.Witness.Aux is now scala.ValueOf

There was no logical replacement for shapeless.tag.@@, so I removed code referencing it

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #1193 (00dcf50) into master (10387aa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1193   +/-   ##
=======================================
  Coverage   92.69%   92.69%           
=======================================
  Files          65       65           
  Lines         835      835           
  Branches       26       30    +4     
=======================================
  Hits          774      774           
  Misses         61       61           

Copy link
Owner

@fthomas fthomas left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @mrdziuban!

@fthomas fthomas merged commit e2a1640 into fthomas:master Jun 15, 2023
@mrdziuban mrdziuban deleted the remove-shapeless-scala-3 branch June 15, 2023 11:13
@mrdziuban
Copy link
Contributor Author

Thanks @fthomas! Do you have any idea when you might plan to release a new version with the changes?

@fthomas
Copy link
Owner

fthomas commented Jun 16, 2023

0.11.0 with these changes has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace HList useages with Tuple in scala3 implmentations

2 participants