You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# What’s new in the 0.17.0-RC1 technology preview?
33
-
TODO
33
+
## New implicit scoping rules
34
+
We aim to make the implicit scoping rules clean and intuitive. In this release, the scoping rules were refactored to facilitate this goal. As specified in the [code documentation](https://github.com/lampepfl/dotty/pull/6832/files#diff-584b631c45ba6f2d4bc5d803074b8f12R474):
35
+
36
+
The implicit scope of a type `tp` is the smallest set S of object references (i.e. TermRefs
37
+
with Module symbol) such that:
38
+
39
+
- If `tp` is a class reference, S contains a reference to the companion object of the class,
40
+
if it exists, as well as the implicit scopes of all of `tp`'s parent class references.
41
+
- If `tp` is an opaque type alias `p.A` of type `tp'`, S contains a reference to an object `A` defined in the
42
+
same scope as the opaque type, if it exists, as well as the implicit scope of `tp'`.
43
+
- If `tp` is a reference `p.T` to a class or opaque type alias, S also contains all object references
44
+
on the prefix path `p`. Under Scala-2 mode, package objects of package references on `p` also
45
+
count towards the implicit scope.
46
+
- If `tp` is a (non-opaque) alias of `tp'`, S contains the implicit scope of `tp'`.
47
+
- If `tp` is a singleton type, S contains the implicit scope of its underlying type.
48
+
- If `tp` is some other type, its implicit scope is the union of the implicit scopes of
49
+
its parts (parts defined as in the spec).
50
+
51
+
You can learn more from PR [#6832](https://github.com/lampepfl/dotty/pull/6832).
52
+
53
+
## Metaprogramming
54
+
We are making steady progress developing metaprogramming features. The highlights for this release are:
55
+
56
+
- Tasty Reflection's `Reflection` object moved inside `QuoteContext` object. This means that if previously to do Tasty Reflection you had to implicitly depend on `Reflection`, now you need to depend on `QuoteContext`. To know more, see [#6723](https://github.com/lampepfl/dotty/pull/6723).
57
+
- Progress made on quoted patterns – see [#6504](https://github.com/lampepfl/dotty/pull/6504).
58
+
-`code` string interpolator allows to obtain the code a user passes to a macro as a String. See [#6661](https://github.com/lampepfl/dotty/pull/6661). To enable this feature, do the following import: `import scala.compiletime._`.
59
+
60
+
## 2.12 build removed from the CI tests
61
+
2.12 build is removed from the test suite. The 2.12 build compiled and tested the Dotty compiler with the Scala 2.12 compiler. This means that, even though Dotty is bootstrapped (i.e. capable of compiling itself), we were not able to use any of the new Dotty features in the Dotty codebase since these features would not compile with Scala 2.12. The decision to abstain from using the new features was made to give us the time to see if something goes wrong with the bootstrap and the ability to revert to Scala 2.12 if it becomes necessary.
62
+
63
+
The removal of 2.12 build marks the stage in Dotty's life when we start to actively use new Dotty features in our code base, making it incompatible with Scala 2.
64
+
65
+
## Organizational changes
66
+
There were some organizational and infrastructural changes worth mentioning.
67
+
68
+
-[Shapeless 3](https://github.com/milessabin/shapeless/tree/shapeless-3) was added to the community build. This means that all the new Dotty features are now tested for the ability to compile Shapeless 3 with them.
69
+
- The process of submitting issues to the Dotty issue tracker is standardized using a GitHub issue template. We have separate templates for bugs, compiler crashes and language feature requests. The latter are now not allowed in the main Dotty repository, and the template for feature requests redirects users to a separate repo meant solely for such requests.
70
+
- Dotty Knowledge Collection initiative. To improve the documentation of the compiler, we came up with an idea of a separate repo where we will log the raw, unrefined knowledge about the compiler internals. This e.g. can be a quick catch we learnt while working that we believe is worth saving somewhere. To read more about the idea, see the [dotty-knowledge](https://github.com/lampepfl/dotty-knowledge) repo's README.
0 commit comments