Upgrade to Pro — share decks privately, control downloads, hide ads and more …

sbt-uglifier

 sbt-uglifier

Lightning Talk @ ScalaMatsuri 2018 After party

8d80c422d5385850366791e27d9ebcf4?s=128

Okada Haruki

March 17, 2018
Tweet

More Decks by Okada Haruki

Other Decks in Technology

Transcript

  1. sbt-ugli er Lightning Talk @ ScalaMatsuri 2018 After party

  2. About Me Haruki Okada twitter/github: @ocadaruma Scala/Java developer

  3. What is sbt-ugli er ? https://github.com/ocadaruma/sbt-ugli er ≠ sbt-uglify Ugli

    es Scala sources
  4. Use cases ?

  5. How does it work ? Surround each Scala source with

    package block Replace newline with whitespace/semicolon Concat all sources
  6. Example Try to uglify scala-csv https://github.com/tototoshi/scala-csv addSbtPlugin("com.mayreh" % "sbt-uglifier" %

    "1.0") $ sbt > uglify
  7. Result

  8. Result > test [info] All tests passed. [info] Passed: Total

    60, Failed 0, Errors 0, Passed 60
  9. Example Try to uglify nscala-time https://github.com/nscala-time/nscala-time $ sbt > uglify

    > test [info] Failed: Total 21, Failed 0, Errors 18, Passed 3 Exception: java.lang.NoSuchMethodError: com.github.nscala_time. ...
  10. Example Seems a bug of Scala https://github.com/scala/bug/issues/10783

  11. Conclusion Let's write a joke plugin and report issues