Skip to content

Move scala.internal.quoted to scala.quoted.internal? #10222

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

Closed
smarter opened this issue Nov 7, 2020 · 5 comments · Fixed by #10281
Closed

Move scala.internal.quoted to scala.quoted.internal? #10222

smarter opened this issue Nov 7, 2020 · 5 comments · Fixed by #10281
Assignees
Milestone

Comments

@smarter
Copy link
Member

smarter commented Nov 7, 2020

If we could avoid adding even more stuff inside scala that would be great, and there's nothing else in scala.internal, wdyt @nicolasstucki ?

@smarter smarter added this to the 3.0.0-RC1 milestone Nov 7, 2020
@smarter
Copy link
Member Author

smarter commented Nov 7, 2020

There's also a dotty.internal which only contains CompileTimeMacros, could that one be a private object where it's used instead?

@nicolasstucki
Copy link
Contributor

Adding it an internal to quoted would mean that each time we import scala.quoted we would import internal. This would not be ideal.

@smarter
Copy link
Member Author

smarter commented Nov 7, 2020

But the compiler adds import scala._ to all Scala files automatically, so we're already importing internal.

@smarter
Copy link
Member Author

smarter commented Nov 7, 2020

The alternative would be to keep the internal stuff as package private in scala.quoted

@nicolasstucki
Copy link
Contributor

Patterns and PickledQuote could fit as package-private in scala.quoted. I'm not sure about CompileTime.

internal.quoted.{Expr,Type} classes exist to allow quoted.{Expr,Type} to have private[scala] constructors. In theory, we could implement those in the compiler but we cannot do it because the compiler is not in the scala package. Maybe we should move the compiler root package dotty to scala.tools.dotty and follow the same naming scheme as in Scala 2 (scala.tools.nsc).

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

Successfully merging a pull request may close this issue.

3 participants