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

Surface: includes huge dotty/tools dependency to support Tasty #3462

Closed
OndrejSpanel opened this issue Mar 21, 2024 · 2 comments
Closed

Surface: includes huge dotty/tools dependency to support Tasty #3462

OndrejSpanel opened this issue Mar 21, 2024 · 2 comments

Comments

@OndrejSpanel
Copy link
Contributor

When I have used assembly to create a fat jar of my app, I was surprised to see the resulting JAR is much larger. Inspection has revealed this is caused by dotty / tools directory. The directory is present because of following dependencies:

def surfaceJVMDependencies(s: String) = Seq(
  "org.scala-lang" %% "scala3-tasty-inspector" % s,
  "org.scala-lang" %% "scala3-staging"         % s
)

I think those dependencies are there to support TastySurfaceFactory. I think this is quite exotic feature and it is not worth the ~40 MB dependency.

I suggest removing TastySurfaceFactory completely.

@xerial
Copy link
Member

xerial commented Mar 21, 2024

Agreed. These dependencies are used only to support runtime surface generation using the staged-compiler in RuntimeSurfaceFactory, but this approach didn't work as expected and caused many runtime issues such as #1698.

@xerial
Copy link
Member

xerial commented Mar 21, 2024

As the dependency spans across the entire codebase, I'll handle this

xerial added a commit that referenced this issue Mar 21, 2024
…ceFactory

This will reduce the jar size for Scala 3
@xerial xerial closed this as completed in 1dfa2aa Mar 21, 2024
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

No branches or pull requests

2 participants