Skip to content

Rename dotty to scala.tools.dotty #10227

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
nicolasstucki opened this issue Nov 8, 2020 · 5 comments
Closed

Rename dotty to scala.tools.dotty #10227

nicolasstucki opened this issue Nov 8, 2020 · 5 comments

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Nov 8, 2020

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).

This would make it possible to access package-private members of the library within the compiler. There are some use cases within the metaprogramming API where this might help to remove unnecessary classes from the library (see #10222).

@odersky
Copy link
Contributor

odersky commented Nov 8, 2020

But then it would be scala.tools.dotty.tools.dotc. Or would we have scala.tools.dotc directly, and also have repl and backend in scala.tools?

The dotty compiler does not necessarily need to live inside the scala package. For instance javac still lives in com.sun.tools.

@smarter
Copy link
Member

smarter commented Nov 8, 2020

Java doesn't have nested packages though. We want to allow the scala 2 and scala 3 compiler jar to coexist on the same classpath, so if we were to move, we'd have to put everything in scala.dotc or scala.tools.dotc.

@som-snytt
Copy link
Contributor

Plus one for scala.tools.dotc, speaking as someone who just moved code from Scala 2 and had to pick a package.

It's worth adding that Scala 2 has a much richer ecosystem of util packages. I think I'm being sarcastic, but I can't be sure.

Also plus one for scala.tools.repl in the hope that eventually there will be a common front end with variant backend implementations.

As a caveat, "Where does my test file go in Scala 3?" is still a minor research project for me, so my take is necessarily naive.

@dwijnand
Copy link
Member

dwijnand commented Nov 9, 2020

This would make it possible to access package-private members of the library within the compiler.

On the other hand that adds yet-another external users of scala's package privates...

@odersky
Copy link
Contributor

odersky commented Nov 10, 2020

We decided not to act on this right now.

@odersky odersky closed this as completed Nov 10, 2020
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

5 participants