Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 9d0fa4e

Browse files
committed
Updates post 2.12.1.
1 parent 644086c commit 9d0fa4e

File tree

4 files changed

+244
-126
lines changed

4 files changed

+244
-126
lines changed

README.md

Lines changed: 25 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -40,82 +40,19 @@ interoperability with the rest of the Scala ecosystem.
4040

4141
## Typelevel Scala releases
4242

43-
Currently Typelevel Scala is available as a drop in replacement for Lightbend Scala 2.11.8 and 2.12.0. As soon as
44-
Lightbend Scala 2.11.9 and 2.12.1 are published corresponding releases of Typelevel Scala will be published.
43+
Currently Typelevel Scala is available as a drop in replacement for Lightbend Scala 2.11.8 and 2.12.1. As soon
44+
as Lightbend Scala 2.11.9 is published a corresponding release of Typelevel Scala will be published.
4545

46-
### Typelevel Scala 2.11.8
46+
Full release notes are available,
4747

48-
The Typelevel Scala additions to Lightbend Scala 2.11.8 can be found on the branch
49-
[2.11.8-bin-typelevel][2.11.8-bin-typelevel] of this repository.
48+
+ Typelevel Scala [2.11.8](https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.11.8.md).
49+
+ Typelevel Scala [2.12.1](https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.12.1.md).
5050

51-
Typelevel Scala 2.11.8 offers the following fixes and features over Lightbend Scala 2.11.8,
51+
## Older releases
5252

53-
+ Support for partial unification (ie. a fix for [SI-2712][SI-2712]) — merged in Lightbend Scala 2.12.0-RC1 and
54-
2.11.9
53+
Full release notes are available,
5554

56-
An improvement to type inference for type constructors, enabled by the `-Ypartial-unification` scalac option. This
57-
has many benefits for libraries, such as Cats and Scalaz, which make extensive use of higher-kinded types.
58-
59-
Full details on the [pull request][pr-2712].
60-
+ Support for literal types (aka SIP-23) — proposed for Lightbend Scala 2.12.1.
61-
62-
Implements [literal types][SIP-23]. Enabled by `-Yliteral-types`.
63-
64-
Literals can now appear in type position, designating the corresponding singleton type. A `scala.ValueOf[T]` type
65-
class and corresponding `scala.Predef.valueOf[T]` operator has been added yielding the unique value of types with a
66-
single inhabitant. Support for `scala.Symbol` literal types has been added.
67-
+ A partial fix for SI-7046 — proposed for Lightbend Scala 2.12.1 and merged in 2.11.9.
68-
69-
The macro API call `knownDirectSubclasses` now yields the correct result in most cases and will report an error in
70-
cases where it is unable to yield the correct result.
71-
72-
This is only a partial fix because subclasses defined in local scopes might be missed by `knownDirectSubclasses`. In
73-
mitigation it is very likely that a local subclass would represent an error in any scenario where
74-
`knownDirectSubclasses` might be used. An error will be reported in these cases.
75-
76-
Full details on the [pull request][pr-7046].
77-
+ A fix for SI-9760 — merged in Lightbend Scala 2.12.0-RC1 and 2.11.9.
78-
79-
Higher kinded type arguments are now refined by GADT pattern matching. Details can be found on [the
80-
ticket][SI-9760].
81-
82-
### Typelevel Scala 2.12.0
83-
84-
The Typelevel Scala additions to Lightbend Scala 2.12.0 can be found on the branch
85-
[2.12.0-bin-typelevel][2.12.0-bin-typelevel] of this repository.
86-
87-
Typelevel Scala 2.12.0 offers the following fixes and features over Lightbend Scala 2.12.0,
88-
89-
+ Support for literal types (aka SIP-23) — proposed for Lightbend Scala 2.12.1.
90-
91-
Implements [literal types][SIP-23]. Enabled by `-Yliteral-types`.
92-
93-
Literals can now appear in type position, designating the corresponding singleton type. A `scala.ValueOf[T]` type
94-
class and corresponding `scala.Predef.valueOf[T]` operator has been added yielding the unique value of types with a
95-
single inhabitant. Support for `scala.Symbol` literal types has been added.
96-
+ A partial fix for SI-7046 — proposed for Lightbend Scala 2.12.1.
97-
98-
The macro API call `knownDirectSubclasses` now yields the correct result in most cases and will report an error in
99-
cases where it is unable to yield the correct result.
100-
101-
This is only a partial fix because subclasses defined in local scopes might be missed by `knownDirectSubclasses`. In
102-
mitigation it is very likely that a local subclass would represent an error in any scenario where
103-
`knownDirectSubclasses` might be used. An error will be reported in these cases.
104-
105-
Full details on the [pull request][pr-7046].
106-
107-
The following have already been merged in Lightbend Scala 2.12.x and so are included here automatically,
108-
109-
+ Support for partial unification (ie. a fix for [SI-2712][SI-2712]) — merged in Lightbend Scala 2.12.0-RC1.
110-
111-
An improvement to type inference for type constructors, enabled by the `-Ypartial-unification` scalac option. This
112-
has many benefits for libraries, such as Cats and Scalaz, which make extensive use of higher-kinded types.
113-
114-
Full details on the [pull request][pr-2712].
115-
+ A fix for SI-9760 — merged in Lightbend Scala 2.12.0-RC1.
116-
117-
Higher kinded type arguments are now refined by GADT pattern matching. Details can be found on [the
118-
ticket][SI-9760].
55+
+ Typelevel Scala [2.12.0](https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.12.0.md).
11956

12057
## Should I use Typelevel Scala? In production?
12158

@@ -181,19 +118,17 @@ res7: Int = 23
181118
[coursier]: https://github.com/alexarchambault/coursier
182119
[ammonite]: https://github.com/lihaoyi/Ammonite
183120

184-
## How to use Typelevel Scala
121+
## How to use Typelevel Scala 2.12.1 with SBT
185122

186-
There are just two requirements for using Typelevel Scala in your existing projects,
123+
There are two requirements for using Typelevel Scala in your existing projects,
187124

188-
+ You must be using (or be able to switch to) a corresponding version of Lightbend Scala. Currently this is 2.11.8
189-
and 2.12.0.
190-
+ You must be using (or be able to switch to) SBT 0.13.13 or later. Earlier versions of SBT don't have full
191-
support for using an alternative `scalaOrganization`.
125+
+ You must be using (or be able to switch to) Lightbend Scala 2.12.1.
126+
+ You must be using (or be able to switch to) SBT 0.13.13 or later. Earlier versions of SBT don't have full support
127+
for using an alternative `scalaOrganization`.
192128

193-
If you are using Lightbend Scala 2.11.8 or 2.12.0 and SBT 0.13.13 the following steps will build your project with
194-
Typelevel Scala,
129+
If these conditions are met the following steps will build your project with Typelevel Scala,
195130

196-
+ Update your `project/build.properties` to require SBT 0.13.13,
131+
+ Ensure that your `project/build.properties` specifies SBT 0.13.13,
197132

198133
```
199134
sbt.version=0.13.13
@@ -224,49 +159,14 @@ verify this from the SBT prompt,
224159
>
225160
```
226161

227-
This will immediately provide you with the fixes for [SI-7046][SI-7046] and [SI-9760][SI-9760]. To additionally enable
228-
the the fix for [SI-2712] and the implementation of [SIP-23] you should add either or both of their enabling flags to
229-
`scalacOptions` (or `local.sbt` if that was the path you took earlier),
230-
231-
```
232-
scalacOptions += "-Ypartial-unification" // enable fix for SI-2712
233-
scalacOptions += "-Yliteral-types" // enable SIP-23 implementation
234-
235-
```
236-
237-
Note that Typelevel Scala 2.11.8 replaces the [si2712fix compiler plugin][si2712fix-plugin] — if you are using
162+
Gote that Typelevel Scala 2.11.8 replaces the [si2712fix compiler plugin][si2712fix-plugin] — if you are using
238163
it you should remove it from your build before switching to Typelevel Scala.
239164

240-
Also note that the two compiler flags above should be used in preference to `-Xexperimental` at present — as
241-
well as enabling the above two features `-Xexperimental` also enables some other features which are not typically
242-
desirable.
165+
## How to use Typelevel Scala 2.12.1 with Maven
243166

244-
You now can verify that these features have been enabled from the SBT console,
167+
If you are using maven with the `scala-maven-plugin`, set the `<scalaOrganization>` to `org.typelevel`,
245168

246169
```
247-
> console
248-
[info] Compiling 3 Scala sources to /home/miles/projects/value-wrapper/target/scala-2.11/classes...
249-
[info] Starting scala interpreter...
250-
[info]
251-
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_102).
252-
Type in expressions for evaluation. Or try :help.
253-
254-
scala> val foo: "foo" = "foo" // Use of literal type "foo"
255-
foo: "foo" = foo
256-
257-
scala> import scala.language.higherKinds
258-
import scala.language.higherKinds
259-
260-
scala> def foo[F[_], A](fa: F[A]): String = fa.toString
261-
foo: [F[_], A](fa: F[A])String
262-
263-
scala> foo((x: Int) => x*2) // Function1[Int, Int] unifies with F[_]
264-
res1: String = <function1>
265-
```
266-
267-
If you are using maven with the `scala-maven-plugin`, set the `<scalaOrganization>` to `org.typelevel`:
268-
269-
````
270170
<plugin>
271171
<groupId>net.alchim31.maven</groupId>
272172
<artifactId>scala-maven-plugin</artifactId>
@@ -275,20 +175,20 @@ If you are using maven with the `scala-maven-plugin`, set the `<scalaOrganizatio
275175
<scalaOrganization>org.typelevel</scalaOrganization>
276176
</configuration>
277177
</plugin>
278-
````
178+
```
279179

280180
## Roadmap
281181

282182
The following are high priority issues for Typelevel projects on which progress is likely to be made in 2016,
283183

284-
+ Partial type application.
285-
+ Multiple implicit parameter blocks.
286-
+ Improved compile times for inductive implicits.
287-
+ Improved control over implicit prioritization.
288-
+ Improved error reporting for implicit resolution failures.
184+
+ Partial type application
185+
+ Multiple implicit parameter blocks
186+
+ ~~Improved compile times for inductive implicits~~ &mdash; **Done**
187+
+ Improved control over implicit prioritization
188+
+ ~~Improved error reporting for implicit resolution failures~~ &mdash; **Done**
289189
+ GADT and singleton type bugfixes.
290190
+ Literal syntax for Byte and Short types.
291-
+ Support for alternative `scala.Predef`.
191+
+ ~~Support for alternative `scala.Predef`~~ &mdash; **Done**
292192

293193
In accordance with the policy for inclusion contributions on these issues will be made as pull requests against
294194
Lightbend Scala in the first instance.

notes/2.11.8.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Typelevel Scala 2.11.8
2+
3+
The Typelevel Scala additions to Lightbend Scala 2.11.8 can be found on the branch
4+
[2.11.8-bin-typelevel][2.11.8-bin-typelevel] of this repository.
5+
6+
Typelevel Scala 2.11.8 offers the following fixes and features over Lightbend Scala 2.11.8,
7+
8+
+ Support for partial unification (ie. a fix for [SI-2712][SI-2712]) &mdash; merged in Lightbend Scala 2.12.0-RC1 and
9+
2.11.9
10+
11+
An improvement to type inference for type constructors, enabled by the `-Ypartial-unification` scalac option. This
12+
has many benefits for libraries, such as Cats and Scalaz, which make extensive use of higher-kinded types.
13+
14+
Full details on the [pull request][pr-2712].
15+
+ Support for literal types (aka SIP-23) &mdash; proposed for Lightbend Scala 2.12.1.
16+
17+
Implements [literal types][SIP-23]. Enabled by `-Yliteral-types`.
18+
19+
Literals can now appear in type position, designating the corresponding singleton type. A `scala.ValueOf[T]` type
20+
class and corresponding `scala.Predef.valueOf[T]` operator has been added yielding the unique value of types with a
21+
single inhabitant. Support for `scala.Symbol` literal types has been added.
22+
+ A partial fix for SI-7046 &mdash; proposed for Lightbend Scala 2.12.1 and merged in 2.11.9.
23+
24+
The macro API call `knownDirectSubclasses` now yields the correct result in most cases and will report an error in
25+
cases where it is unable to yield the correct result.
26+
27+
This is only a partial fix because subclasses defined in local scopes might be missed by `knownDirectSubclasses`. In
28+
mitigation it is very likely that a local subclass would represent an error in any scenario where
29+
`knownDirectSubclasses` might be used. An error will be reported in these cases.
30+
31+
Full details on the [pull request][pr-7046].
32+
+ A fix for SI-9760 &mdash; merged in Lightbend Scala 2.12.0-RC1 and 2.11.9.
33+
34+
Higher kinded type arguments are now refined by GADT pattern matching. Details can be found on [the
35+
ticket][SI-9760].
36+
37+
Note that Typelevel Scala 2.11.8 replaces the [si2712fix compiler plugin][si2712fix-plugin] &mdash; if you are using
38+
it you should remove it from your build before switching to Typelevel Scala.
39+
40+
## How to use Typelevel Scala 2.11.8 with SBT
41+
42+
There are two requirements for using Typelevel Scala in your existing projects,
43+
44+
+ You must be using (or be able to switch to) Lightbend Scala 2.11.8.
45+
+ You must be using (or be able to switch to) SBT 0.13.13 or later. Earlier versions of SBT don't have full support
46+
for using an alternative `scalaOrganization`.
47+
48+
If these conditions are met the following steps will build your project with Typelevel Scala,
49+
50+
+ Ensure that your `project/build.properties` specifies SBT 0.13.13,
51+
52+
```
53+
sbt.version=0.13.13
54+
```
55+
56+
+ Add the following to your `build.sbt` immediately next to where you set `scalaVersion`,
57+
58+
```
59+
scalaOrganization in ThisBuild := "org.typelevel"
60+
```
61+
62+
Alternatively, if you want to try Typelevel Scala without modifying your `build.sbt` you can instead create a file
63+
`local.sbt` at the root of your project with the following content,
64+
65+
```
66+
scalaOrganization in ThisBuild := "org.typelevel"
67+
```
68+
69+
This will be merged with your main build definitions and can be added to `.gitignore` or `.git/info/exclude` if so
70+
desired.
71+
72+
Now your build should function as before but using the Typelevel Scala toolchain instead of the Lightbend one. You can
73+
verify this from the SBT prompt,
74+
75+
```
76+
> show scalaOrganization
77+
[info] org.typelevel
78+
>
79+
```
80+
81+
## How to use Typelevel Scala 2.11.8 with Maven
82+
83+
If you are using maven with the `scala-maven-plugin`, set the `<scalaOrganization>` to `org.typelevel`,
84+
85+
```
86+
<plugin>
87+
<groupId>net.alchim31.maven</groupId>
88+
<artifactId>scala-maven-plugin</artifactId>
89+
<version>3.2.1</version>
90+
<configuration>
91+
<scalaOrganization>org.typelevel</scalaOrganization>
92+
</configuration>
93+
</plugin>
94+
```
95+
96+
[SI-2712]: https://issues.scala-lang.org/browse/SI-2712
97+
[pr-2712]: https://github.com/scala/scala/pull/5102
98+
[SI-7046]: https://issues.scala-lang.org/browse/SI-7046
99+
[pr-7046]: https://github.com/scala/scala/pull/5284
100+
[SI-9760]: https://issues.scala-lang.org/browse/SI-9760
101+
[SIP-23]: https://github.com/scala/scala/pull/5310
102+
[2.11.8-bin-typelevel]: https://github.com/typelevel/scala/commits/2.11.8-bin-typelevel

0 commit comments

Comments
 (0)