Skip to content

Commit

Permalink
Updates for 2.2.0-final.
Browse files Browse the repository at this point in the history
  • Loading branch information
milessabin committed May 26, 2015
1 parent 4405c8a commit 3ad161b
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 29 deletions.
33 changes: 4 additions & 29 deletions README.md
Expand Up @@ -95,7 +95,7 @@ to your settings.

[ci]: https://travis-ci.org/milessabin/shapeless

### shapeless-2.2.0-RC6
### shapeless-2.2.0

Builds are available for Scala 2.11.x and for Scala 2.10.x. The main line of development for
shapeless 2.2.0 is Scala 2.11.6 with Scala 2.10.x supported via the macro paradise compiler plugin.
Expand All @@ -104,7 +104,7 @@ shapeless 2.2.0 is Scala 2.11.6 with Scala 2.10.x supported via the macro paradi
scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.2.0-RC6"
"com.chuusai" %% "shapeless" % "2.2.0"
)
```

Expand All @@ -117,36 +117,11 @@ plugin to your build,
scalaVersion := "2.10.5"

libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.2.0-RC6",
"com.chuusai" %% "shapeless" % "2.2.0",
compilerPlugin("org.scalamacros" % "paradise" % "2.0.1" cross CrossVersion.full)
)
```

### shapeless-2.1.0

Builds are available for Scala 2.11.x and for Scala 2.10.4 and 2.10.5. The main line of development for shapeless
2.1.0 is Scala 2.11.6 with Scala 2.10.x supported via the macro paradise compiler plugin.

```scala
scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.1.0"
)
```

Note that for Scala 2.10.x you must provide an explicit Scala version suffix to your shapeless dependency, and it is
recommended to add the macro paradise plugin to your build, for some macros provided by shapeless to work smoothly,

```scala
scalaVersion := "2.10.5"

libraryDependencies ++= Seq(
"com.chuusai" % "shapeless_2.10.5" % "2.1.0",
compilerPlugin("org.scalamacros" % "paradise_2.10.5" % "2.0.1")
)
```

### Older releases

Please use a current release if possible. If unavoidable, you can find [usage information for older
Expand All @@ -156,7 +131,7 @@ releases][olderusage] on the shapeless wiki.

## Building shapeless

shapeless is built with 0.13.7 or later. SBT 0.13.6 has an [issue][namehashing] related to its new name hashing
shapeless is built with SBT 0.13.7 or later. SBT 0.13.6 has an [issue][namehashing] related to its new name hashing
feature which when compiling shapeless causes SBT to loop indefinitely consuming all heap. Workarounds are to move to
an earlier or later SBT version or disable name hashing by adding,

Expand Down
99 changes: 99 additions & 0 deletions notes/2.2.0.markdown
@@ -0,0 +1,99 @@
This is the final release of [shapeless-2.2.0][shapeless]. These
release notes provide a summary of changes since shapeless 2.1.0.
shapeless 2.2.0 should be source and binary compatible with shapeless
2.1.0, and for migration from shapeless 2.0.0 the earlier [migration
guide from shapeless 2.0.0 to 2.1.0][migration] is still applicable and
is available on the [shapeless wiki][wiki].

shapeless 2.2.0 includes the following new features and enhancements
and a number of [bug fixes][fixes],

* Added support for derivation of type classes for higher-kinded types.
See in particular the new [example][functor] illustrating the
application of this to the automatic derivation of Functor type class
instances for ADTs.

* Generic derivation for coproducts now correctly handles cases where
the type parameters of constructors is a subset and/or permutation of
the type parameters of the data type. This allows correct type class
derivation for types like Cat's `Xor` and `Ior`, and Scalaz's
disjunction.

* Added support for Generic representation of types with repeated
(ie. vararg) constructor arguments.

* There are now `Generic` instances for ADTs with constructors which
are included via multiple inheritance paths.

* The test for "case-class-likeness" has been tightened to exclude some
unexpected types (notably arrays).

* A mechanism providing greater control over the implicit priority of
derived orphan type class instances has been added. This finally
allows shapeless-contrib to be updated to use shapeless-2.2.0.

* All the major types and type classes now extend Serializable for
compatibility with libraries and systems which use Java
serialization (eg. Spark).

* A mechanism allowing expensive implicit definitions to be cached
simply has been added.

* `Witness` instances are now available for the singleton types of
stable values.

* A mechanism to replace Scala's now deprecated auto-tupling has been
added via the [ProductArgs][prodargs] and SingletonProductArgs traits.
This supports some [new examples][basecopy] illustrating a generic
solution to the common problem of functional update of a family of
case classes through their common supertype.

* A `Max` type class has been added for `Nat` types.

* A `fields` method has been added to records and unions.

* Added a useful toString to instances of the Typeable type class.

* Added a useful toString to Sized containers.

* Improved the CSV serialization example.

* Added an example of [merging][merge] instances of one case class into
another.

* A number of tests have been made more portable so that they don't
fail when run under Scala.js due to spurious platform-specifics.

* If you are using Scala 2.10.x it is no longer necessary to provide an
explicit Scala version suffix for your shapeless dependency. You must
still ensure that you are using Scala version 2.10.2 or greater, with
Scala 2.10.5 (or switching to 2.11.x) strongly recommended.

* Reorganized the SBT project modules.
The "shapeless-" prefix has been dropped from all the module names
and it is now possible to drop into the Scala REPL with shapeless
on the classpath using just the "console" command.

A big "Thank You!" to everyone who has contributed to this release,

* Alexander Konovalov ([@alexknvl](https://twitter.com/alexknvl))
* Alexandre Archambault ([@alxarchambault](https://twitter.com/alxarchambault))
* Alistair Johnson
* Dale Wijnand ([@dwijnand](https://twitter.com/dwijnand))
* Denis Mikhaylov [@notxcain](https://twitter.com/@notxcain)
* Jean-Remi Desjardins ([@jrdesjardins](https://twitter.com/jrdesjardins))
* Johnny Everson ([@johnny_everson](https://twitter.com/johnny_everson))
* Pascal Voitot [@mandubian](https://twitter.com/mandubian)
* Sam Halliday [@fommil](https://twitter.com/fommil)
* Simon Hafner ([@reactormonk](https://twitter.com/reactormonk))
* Vladimir Matveev ([@netvlm](https://twitter.com/netvlm))

[shapeless]: https://github.com/milessabin/shapeless
[migration]: https://github.com/milessabin/shapeless/wiki/Migration-guide:-shapeless-2.0.0-to-2.1.0
[wiki]: https://github.com/milessabin/shapeless/wiki
[contrib]: https://github.com/typelevel/shapeless-contrib
[prodargs]: https://github.com/milessabin/shapeless/blob/master/core/src/main/scala/shapeless/hlists.scala#L124
[fixes]: https://github.com/milessabin/shapeless/issues?q=milestone%3Ashapeless-2.2.0+is%3Aclosed
[functor]: https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/functor.scala
[basecopy]: https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/basecopy.scala
[merge]: https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/caseclassmerge.scala

0 comments on commit 3ad161b

Please sign in to comment.