cucapra / dahlia

Time-sensitive affine types for predictable hardware generation
https://capra.cs.cornell.edu/dahlia
MIT License
130 stars 8 forks source link

Migrate to Scala 3.3.1 LTS #421

Closed Mark1626 closed 7 months ago

Mark1626 commented 7 months ago

Summary

  1. Bumped up version of scalatest, fastparse, sbtassembly, scalafmt
  2. Used the compiler opt -new-syntax along with -rewrite to format the code after a successful compile
  3. Changes made in source getClass.getResourceAsStream("/version.properties") -> scala.io.Source.fromResource("version.properties")
  4. The compiler noted that in certain cases where for an Option[T] type only Some[T] was consumed and None was ignored. This has been temporarily marked with @unchecked
  5. Fatjar construction had a considerable change as sbtassembly went up from 0.14.9 to 2.1.5 in build.sbt
  6. The Dotty Compiler cleared minor issues in pattern matching that were marked eg)Parser.scala L418, calyx/Backend.scala
  7. Main function still follows Scala 2 pattern rather than a Scala 3 @main approach
  8. Tested with the existing unit tests and functional tests
  9. The documentation is out of date, should I do this in this PR itself.

Note: Most of this was just a straightforward version update except for point 4 and 5


Let me know your feedback, I'll work on them.

rachitnigam commented 7 months ago

Freaking awesome!! LGTM! Merge it!

Mark1626 commented 7 months ago

Any comments on point 4

rachitnigam commented 7 months ago

How about (once this is merged), opening a new PR immediately where the @unchecked is remove so we can stare at the error message and see which places are obviously incorrect and which places can be handled directly

Mark1626 commented 7 months ago

Sounds good. Do you want me to merge it to master?

rachitnigam commented 7 months ago

Yup! You should have access to hit the green button now!

rachitnigam commented 7 months ago

I generally prefer squash commits BTW