mirror of https://github.com/sbt/sbt.git
Fixes compiler-project/macro-config
This commit is contained in:
parent
12ae6e66ff
commit
e1dc83cf08
|
|
@ -13,6 +13,8 @@ This is the RC-1 release of sbt 1.0.
|
||||||
- sbt 0.12 style key dependency operators `<<=`, `<+=`, `<++=` are removed. Please [migrate to :=, +=, and ++=](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html#Migrating+simple+expressions). These operators have been sources of confusion for many users, and have long been removed from 0.13 docs, and have been formally deprecated since sbt 0.13.13.
|
- sbt 0.12 style key dependency operators `<<=`, `<+=`, `<++=` are removed. Please [migrate to :=, +=, and ++=](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html#Migrating+simple+expressions). These operators have been sources of confusion for many users, and have long been removed from 0.13 docs, and have been formally deprecated since sbt 0.13.13.
|
||||||
- Zinc 1 drops support for Scala 2.9 and earlier. Scala 2.10 must use 2.10.2 and above. Scala 2.11 must use 2.11.2 and above. (latest patch releases are recommended)
|
- Zinc 1 drops support for Scala 2.9 and earlier. Scala 2.10 must use 2.10.2 and above. Scala 2.11 must use 2.11.2 and above. (latest patch releases are recommended)
|
||||||
- Many of the case classes are replaced with pseudo case classes generated using Contraband. Migrate `.copy(foo = xxx)` to `withFoo(xxx)`.
|
- Many of the case classes are replaced with pseudo case classes generated using Contraband. Migrate `.copy(foo = xxx)` to `withFoo(xxx)`.
|
||||||
|
- Java classes under the `xsbti.compile` package such as `IncOptions` hides the constructor. Use the factory method `xsbti.compile.Foo.of(...)`.
|
||||||
|
- `config("tooling")` must be directly assigned to a `val`, like `val Tooling = config("tooling")`. This captures the lhs identifier into the configuration so we can use it from the shell later.
|
||||||
- Changes `publishTo` and `otherResolvers` from SettingKeys to TaskKeys. [#2059][2059]/[#2662][2662] by [@dwijnand][@dwijnand]
|
- Changes `publishTo` and `otherResolvers` from SettingKeys to TaskKeys. [#2059][2059]/[#2662][2662] by [@dwijnand][@dwijnand]
|
||||||
- `PathFinder`'s `.***` method is renamed to `.allPaths` method.
|
- `PathFinder`'s `.***` method is renamed to `.allPaths` method.
|
||||||
- Drops sbt 0.12 style hyphen-separated key names (use `publishLocal` instead of `publish-local`).
|
- Drops sbt 0.12 style hyphen-separated key names (use `publishLocal` instead of `publish-local`).
|
||||||
|
|
@ -37,7 +39,6 @@ This is the RC-1 release of sbt 1.0.
|
||||||
- sbt 1.0 uses `ConfigRef` in places where `String` was used to reference configuration, such as `update.value.configuration(...)`. Pass in `Configuration`, which implicitly converts to `ConfigRef`.
|
- sbt 1.0 uses `ConfigRef` in places where `String` was used to reference configuration, such as `update.value.configuration(...)`. Pass in `Configuration`, which implicitly converts to `ConfigRef`.
|
||||||
- Changes `sourceArtifactTypes` and `docArtifactTypes` from `Set[String]` to `Seq[String]` settings.
|
- Changes `sourceArtifactTypes` and `docArtifactTypes` from `Set[String]` to `Seq[String]` settings.
|
||||||
- Renames `ivyScala: IvyScala` to `scalaModuleInfo: ScalaModuleInfo`.
|
- Renames `ivyScala: IvyScala` to `scalaModuleInfo: ScalaModuleInfo`.
|
||||||
- Java classes under the `xsbti.compile` package such as `IncOptions` hides the constructor. Use the factory method `xsbti.compile.Foo.of(...)`.
|
|
||||||
|
|
||||||
The Scala Center is working with Lightbend to provide [an automatic migration tool][sbt-migration-rewrites].
|
The Scala Center is working with Lightbend to provide [an automatic migration tool][sbt-migration-rewrites].
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
// Adds a "macro" configuration for macro dependencies.
|
// Defines "macro" configuration.
|
||||||
// By default, this includes the dependencies of the normal sources.
|
// By default, this includes the dependencies of the normal sources.
|
||||||
// Drop the `extend(Compile)` to include no dependencies (not even scala-library) by default.
|
// Drop the `extend(Compile)` to include no dependencies (not even scala-library) by default.
|
||||||
ivyConfigurations += config("macro").hide.extend(Compile)
|
lazy val Macro = config("macro").hide.extend(Compile)
|
||||||
|
|
||||||
|
// Adds a "macro" configuration for macro dependencies.
|
||||||
|
ivyConfigurations += Macro
|
||||||
|
|
||||||
// add the compiler as a dependency for src/macro/
|
// add the compiler as a dependency for src/macro/
|
||||||
libraryDependencies +=
|
libraryDependencies +=
|
||||||
scalaVersion("org.scala-lang" % "scala-compiler" % _ % "macro").value
|
scalaVersion("org.scala-lang" % "scala-compiler" % _ % Macro).value
|
||||||
|
|
||||||
// adds standard compile, console, package tasks for src/macro/
|
// adds standard compile, console, package tasks for src/macro/
|
||||||
inConfig(config("macro"))(Defaults.configSettings)
|
inConfig(Macro)(Defaults.configSettings)
|
||||||
|
|
||||||
// puts the compiled macro on the classpath for the main sources
|
// puts the compiled macro on the classpath for the main sources
|
||||||
unmanagedClasspath in Compile ++=
|
unmanagedClasspath in Compile ++=
|
||||||
(fullClasspath in config("macro")).value
|
(fullClasspath in Macro).value
|
||||||
|
|
||||||
// includes sources in src/macro/ in the main source package
|
// includes sources in src/macro/ in the main source package
|
||||||
mappings in (Compile, packageSrc) ++=
|
mappings in (Compile, packageSrc) ++=
|
||||||
(mappings in (config("macro"), packageSrc)).value
|
(mappings in (Macro, packageSrc)).value
|
||||||
|
|
||||||
// Includes classes compiled from src/macro/ in the main binary
|
// Includes classes compiled from src/macro/ in the main binary
|
||||||
// This can be omitted if the classes in src/macro/ aren't used at runtime
|
// This can be omitted if the classes in src/macro/ aren't used at runtime
|
||||||
mappings in (Compile, packageBin) ++=
|
mappings in (Compile, packageBin) ++=
|
||||||
(mappings in (config("macro"), packageBin)).value
|
(mappings in (Macro, packageBin)).value
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue