Migrating to the New SchemeTopWhy the Change?Change SummaryContents

Change Summary

So the solution of the problem was to change the meaning of a qualified package clause like

package org.myproject.tests

It now brings only members of tests into scope, not members of the two outer packages containing it. This changes nothing in the way Scala packages nest. Package tests is still a member of package org.myproject. The only thing that changes is what scope is opened by a qualified package clause like the one above.

The second part of the change is to allow the new chained package clause syntax as a more compact alternative to nested packages. So if you want to see members of both package org.myproject and org.myproject.tests in your code, you can use two package clauses:

package org.myproject
package tests

Generally, if your project consists of multiple subpackages, it's a good idea to use a first package clause that names the project as a whole and that is followed by a second package clause naming the current subpackage. That way, you can refer to other subpackages of your project without the often long prefix that indicates the project.

Next: Migrating to the New Scheme


Migrating to the New SchemeTopWhy the Change?Change SummaryContents