mirror of https://github.com/sbt/sbt.git
commit
bf12a995e4
|
|
@ -30,7 +30,7 @@ object Compiler {
|
|||
|
||||
/** Inputs necessary to run the incremental compiler. */
|
||||
// final case class Inputs(compilers: Compilers, config: Options, incSetup: IncSetup)
|
||||
// /** The inputs for the copiler *and* the previous analysis of source dependecnies. */
|
||||
// /** The inputs for the compiler *and* the previous analysis of source dependencies. */
|
||||
// final case class InputsWithPrevious(inputs: Inputs, previousAnalysis: PreviousAnalysis)
|
||||
// final case class Options(classpath: Seq[File], sources: Seq[File], classesDirectory: File, options: Seq[String], javacOptions: Seq[String], maxErrors: Int, sourcePositionMapper: Position => Position, order: CompileOrder)
|
||||
// final case class IncSetup(analysisMap: File => Option[Analysis], definesClass: DefinesClass, skip: Boolean, cacheFile: File, cache: GlobalsCache, incOptions: IncOptions)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import sjsonnew.JsonFormat
|
|||
/**
|
||||
* A command channel represents an IO device such as network socket or human
|
||||
* that can issue command or listen for some outputs.
|
||||
* We can think of a command channel to be an abstration of the terminal window.
|
||||
* We can think of a command channel to be an abstraction of the terminal window.
|
||||
*/
|
||||
abstract class CommandChannel {
|
||||
private val commandQueue: ConcurrentLinkedQueue[Exec] = new ConcurrentLinkedQueue()
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import sjsonnew.JsonFormat
|
|||
/**
|
||||
* The command exchange merges multiple command channels (e.g. network and console),
|
||||
* and acts as the central multiplexing point.
|
||||
* Instead of blocking on JLine.readLine, the server commmand will block on
|
||||
* Instead of blocking on JLine.readLine, the server command will block on
|
||||
* this exchange, which could serve command request from either of the channel.
|
||||
*/
|
||||
private[sbt] final class CommandExchange {
|
||||
|
|
@ -139,7 +139,7 @@ private[sbt] final class CommandExchange {
|
|||
}
|
||||
}
|
||||
|
||||
// fanout publisEvent
|
||||
// fanout publishEvent
|
||||
def publishEventMessage(event: EventMessage): Unit =
|
||||
{
|
||||
val toDel: ListBuffer[CommandChannel] = ListBuffer.empty
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ private[sbt] sealed trait ServerInstance {
|
|||
|
||||
private[sbt] object Server {
|
||||
def start(host: String, port: Int, onIncomingSocket: Socket => Unit,
|
||||
/*onIncommingCommand: CommandMessage => Unit,*/ log: Logger): ServerInstance =
|
||||
/*onIncomingCommand: CommandMessage => Unit,*/ log: Logger): ServerInstance =
|
||||
new ServerInstance {
|
||||
|
||||
// val lock = new AnyRef {}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ private[sbt] final class Previous(streams: Streams, referenced: IMap[ScopedTaskK
|
|||
}
|
||||
}
|
||||
|
||||
/** Used by the .previous runtime implemention to get the previous value for task `key`. */
|
||||
/** Used by the .previous runtime implementation to get the previous value for task `key`. */
|
||||
private def get[T](key: ScopedKey[Task[T]]): Option[T] =
|
||||
map.get(key).flatMap(_.previousValue)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ object Scoped {
|
|||
implicit def inputScopedToKey[T](s: InputKey[T]): ScopedKey[InputTask[T]] = ScopedKey(s.scope, s.key)
|
||||
|
||||
/**
|
||||
* Mixin trait for adding convenience vocabulary associated with specifiying the [[Scope]] of a setting.
|
||||
* Mixin trait for adding convenience vocabulary associated with specifying the [[Scope]] of a setting.
|
||||
* Allows specification of the Scope or part of the [[Scope]] of a setting being referenced.
|
||||
* @example
|
||||
* {{{
|
||||
|
|
@ -180,7 +180,7 @@ object Scoped {
|
|||
}
|
||||
|
||||
/**
|
||||
* Wraps an [[sbt.Def.Initialize]] instance to provide `map` and `flatMap` symantics.
|
||||
* Wraps an [[sbt.Def.Initialize]] instance to provide `map` and `flatMap` semantics.
|
||||
*/
|
||||
final class RichInitialize[S](init: Initialize[S]) {
|
||||
def map[T](f: S => T): Initialize[Task[T]] = init(s => mktask(f(s)))
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ trait RunningTaskEngine {
|
|||
def cancelAndShutdown(): Unit
|
||||
}
|
||||
/**
|
||||
* A startegy for being able to cancle tasks.
|
||||
* A strategy for being able to cancle tasks.
|
||||
*
|
||||
* Implementations of this trait determine what will trigger `cancel()` for
|
||||
* the task engine, providing in the `start` method.
|
||||
|
|
|
|||
|
|
@ -178,11 +178,11 @@ object Plugins extends PluginsFunctions {
|
|||
timed("Plugins.deducer#function", log) {
|
||||
def explicitlyDisabled(p: AutoPlugin): Boolean = hasExclude(requestedPlugins, p)
|
||||
val alwaysEnabled: List[AutoPlugin] = defined.filter(_.isAlwaysEnabled).filterNot(explicitlyDisabled)
|
||||
val knowlege0: Set[Atom] = ((flatten(requestedPlugins) ++ alwaysEnabled) collect {
|
||||
val knowledge0: Set[Atom] = ((flatten(requestedPlugins) ++ alwaysEnabled) collect {
|
||||
case x: AutoPlugin => Atom(x.label)
|
||||
}).toSet
|
||||
val clauses = Clauses((allRequirementsClause ::: allEnabledByClause) filterNot { _.head subsetOf knowlege0 })
|
||||
log.debug(s"deducing auto plugins based on known facts ${knowlege0.toString} and clauses ${clauses.toString}")
|
||||
val clauses = Clauses((allRequirementsClause ::: allEnabledByClause) filterNot { _.head subsetOf knowledge0 })
|
||||
log.debug(s"deducing auto plugins based on known facts ${knowledge0.toString} and clauses ${clauses.toString}")
|
||||
Logic.reduce(clauses, (flattenConvert(requestedPlugins) ++ convertAll(alwaysEnabled)).toSet) match {
|
||||
case Left(problem) => throw AutoPluginException(problem)
|
||||
case Right(results) =>
|
||||
|
|
@ -194,7 +194,7 @@ object Plugins extends PluginsFunctions {
|
|||
val forbidden: Set[AutoPlugin] = (selectedPlugins flatMap { Plugins.asExclusions }).toSet
|
||||
val c = selectedPlugins.toSet & forbidden
|
||||
if (c.nonEmpty) {
|
||||
exlusionConflictError(requestedPlugins, selectedPlugins, c.toSeq sortBy { _.label })
|
||||
exclusionConflictError(requestedPlugins, selectedPlugins, c.toSeq sortBy { _.label })
|
||||
}
|
||||
val retval = topologicalSort(selectedPlugins, log)
|
||||
// log.debug(s" :: sorted deduced result: ${retval.toString}")
|
||||
|
|
@ -219,7 +219,7 @@ object Plugins extends PluginsFunctions {
|
|||
}
|
||||
private[sbt] def translateMessage(e: LogicException) = e match {
|
||||
case ic: InitialContradictions => s"Contradiction in selected plugins. These plugins were both included and excluded: ${literalsString(ic.literals.toSeq)}"
|
||||
case io: InitialOverlap => s"Cannot directly enable plugins. Plugins are enabled when their required plugins are satisifed. The directly selected plugins were: ${literalsString(io.literals.toSeq)}"
|
||||
case io: InitialOverlap => s"Cannot directly enable plugins. Plugins are enabled when their required plugins are satisfied. The directly selected plugins were: ${literalsString(io.literals.toSeq)}"
|
||||
case cn: CyclicNegation => s"Cycles in plugin requirements cannot involve excludes. The problematic cycle is: ${literalsString(cn.cycle)}"
|
||||
}
|
||||
private[this] def literalsString(lits: Seq[Literal]): String =
|
||||
|
|
@ -232,7 +232,7 @@ object Plugins extends PluginsFunctions {
|
|||
val message = s"Plugin$ns provided by multiple AutoPlugins:$nl${dupStrings.mkString(nl)}"
|
||||
throw AutoPluginException(message)
|
||||
}
|
||||
private[this] def exlusionConflictError(requested: Plugins, selected: Seq[AutoPlugin], conflicting: Seq[AutoPlugin]): Unit = {
|
||||
private[this] def exclusionConflictError(requested: Plugins, selected: Seq[AutoPlugin], conflicting: Seq[AutoPlugin]): Unit = {
|
||||
def listConflicts(ns: Seq[AutoPlugin]) = (ns map { c =>
|
||||
val reasons = (if (flatten(requested) contains c) List("requested")
|
||||
else Nil) ++
|
||||
|
|
@ -342,7 +342,7 @@ ${listConflicts(conflicting)}""")
|
|||
}
|
||||
private[this] def convertAll(ns: Seq[Basic]): Seq[Literal] = ns map convertBasic
|
||||
|
||||
/** True if the trigger clause `n` is satisifed by `model`. */
|
||||
/** True if the trigger clause `n` is satisfied by `model`. */
|
||||
def satisfied(n: Plugins, model: Set[AutoPlugin]): Boolean =
|
||||
flatten(n) forall {
|
||||
case Exclude(a) => !model(a)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import sbt.librarymanagement.Configuration
|
|||
|
||||
import Def._
|
||||
|
||||
/** This reprsents a `Setting` expression configured by the sbt DSL. */
|
||||
/** This represents a `Setting` expression configured by the sbt DSL. */
|
||||
sealed trait DslEntry {
|
||||
/** Called by the parser. Sets the position where this entry was defined in the build.sbt file. */
|
||||
def withPos(pos: RangePosition): DslEntry
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ private[sbt] object EvaluateConfigurations {
|
|||
* @param eval The evaluating scala compiler instance we use to handle evaluating scala configuration.
|
||||
* @param file The file we've parsed
|
||||
* @param imports The default imports to use in this .sbt configuration
|
||||
* @param lines The lines of the configurtion we'd like to evaluate.
|
||||
* @param lines The lines of the configuration we'd like to evaluate.
|
||||
*
|
||||
* @return Just the Setting[_] instances defined in the .sbt file.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ private[sbt] object Load {
|
|||
// intended in the AddSettings.AutoPlugins filter.
|
||||
def autoPluginSettings(f: AutoPlugins) =
|
||||
projectPlugins.filter(f.include).flatMap(_.projectSettings)
|
||||
// Grab all the settigns we already loaded from sbt files
|
||||
// Grab all the settings we already loaded from sbt files
|
||||
def settings(files: Seq[File]): Seq[Setting[_]] =
|
||||
for {
|
||||
file <- files
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ object LogManager {
|
|||
defaultLogger(data, state, task, screen(task, state), backed(to), relay(()), extra(task).toList)
|
||||
}
|
||||
|
||||
// This is the main function that is used to generat the logger for tasks.
|
||||
// This is the main function that is used to generate the logger for tasks.
|
||||
def defaultLogger(data: Settings[Scope], state: State, task: ScopedKey[_],
|
||||
console: Appender, backed: Appender, relay: Appender, extra: List[Appender]): Logger =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ object PluginDiscovery {
|
|||
"sbt.plugins.JUnitXmlReportPlugin" -> sbt.plugins.JUnitXmlReportPlugin,
|
||||
"sbt.plugins.Giter8TemplatePlugin" -> sbt.plugins.Giter8TemplatePlugin
|
||||
)
|
||||
val detectedAutoPugins = discover[AutoPlugin](AutoPlugins)
|
||||
val allAutoPlugins = (defaultAutoPlugins ++ detectedAutoPugins.modules) map {
|
||||
val detectedAutoPlugins = discover[AutoPlugin](AutoPlugins)
|
||||
val allAutoPlugins = (defaultAutoPlugins ++ detectedAutoPlugins.modules) map {
|
||||
case (name, value) =>
|
||||
DetectedAutoPlugin(name, value, sbt.Plugins.hasAutoImportGetter(value, loader))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ private[sbt] object PluginsDebug {
|
|||
val blockingExcludes = initialExcludes & minRequiredPlugins
|
||||
|
||||
// The model that results when the minimal plugins are enabled and the minimal plugins are excluded.
|
||||
// This can include more plugins than just `minRequiredPlugins` because the plguins required for `plugin`
|
||||
// This can include more plugins than just `minRequiredPlugins` because the plugins required for `plugin`
|
||||
// might activate other plugins as well.
|
||||
val incrementalInputs = and(includeAll(minRequiredPlugins ++ initialPlugins), excludeAll(minAbsentPlugins ++ initialExcludes -- minRequiredPlugins))
|
||||
val incrementalModel = context.deducePlugin(incrementalInputs, context.log).toSet
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ final case class SessionSettings(currentBuild: URI, currentProject: Map[URI, Str
|
|||
/**
|
||||
* Appends a set of raw Setting[_] objects to the current session.
|
||||
* @param ss The raw settings to include
|
||||
* @return A new SessionSettings with the appeneded settings.
|
||||
* @return A new SessionSettings with the appended settings.
|
||||
*/
|
||||
def appendRaw(ss: Seq[Setting[_]]): SessionSettings = copy(rawAppend = rawAppend ++ ss)
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ private[sbt] object SettingCompletions {
|
|||
|
||||
/**
|
||||
* Parser that provides tab completion for the main argument to the `set` command.
|
||||
* `settings` are the evaluated settings for the build, `rawKeyMap` maps the hypenated key identifier to the key object,
|
||||
* `settings` are the evaluated settings for the build, `rawKeyMap` maps the hyphenated key identifier to the key object,
|
||||
* and `context` is the current project.
|
||||
* The tab completion will try to present the most relevant information first, with additional descriptions or keys available
|
||||
* when there are fewer choices or tab is pressed multiple times.
|
||||
|
|
@ -267,7 +267,7 @@ private[sbt] object SettingCompletions {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms the hypenated key label `k` into camel-case and quotes it with backticks if it is a Scala keyword.
|
||||
* Transforms the hyphenated key label `k` into camel-case and quotes it with backticks if it is a Scala keyword.
|
||||
* This is intended to be an estimate of the Scala identifier that may be used to reference the keyword in the default sbt context.
|
||||
*/
|
||||
def keyScalaID(k: String): String = Util.quoteIfKeyword(Util.hyphenToCamel(k))
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ private[sbt] object SbtParser {
|
|||
}
|
||||
|
||||
/**
|
||||
* This method soley exists to add scaladoc to members in SbtParser which
|
||||
* This method solely exists to add scaladoc to members in SbtParser which
|
||||
* are defined using pattern matching.
|
||||
*/
|
||||
sealed trait ParsedSbtFileExpressions {
|
||||
/** The set of parsed import expressions. */
|
||||
def imports: Seq[(String, Int)]
|
||||
|
||||
/** The set of parsed defintions and/or sbt build settings. */
|
||||
/** The set of parsed definitions and/or sbt build settings. */
|
||||
def settings: Seq[(String, LineRange)]
|
||||
|
||||
/** The set of scala tree's for parsed definitions/settings and the underlying string representation.. */
|
||||
|
|
@ -55,7 +55,7 @@ sealed trait ParsedSbtFileExpressions {
|
|||
*/
|
||||
private[sbt] case class SbtParser(file: File, lines: Seq[String]) extends ParsedSbtFileExpressions {
|
||||
//settingsTrees,modifiedContent needed for "session save"
|
||||
// TODO - We should look into splitting out "defintiions" vs. "settings" here instead of further string lookups, since we have the
|
||||
// TODO - We should look into splitting out "definitions" vs. "settings" here instead of further string lookups, since we have the
|
||||
// parsed trees.
|
||||
val (imports, settings, settingsTrees) = splitExpressions(file, lines)
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`, sbt will
|
|||
))
|
||||
)
|
||||
|
||||
The `exportToInternal` setting allows the dependee subprojects to opt out of the internal tracking, which might be useful if you want to track most subprojects except for a few. The intersection of the `trackInternalDependencies` and `exportToInternal` settings will be used to determine the actual track level. Here's an example to opt-out one project:
|
||||
The `exportToInternal` setting allows the dependent subprojects to opt out of the internal tracking, which might be useful if you want to track most subprojects except for a few. The intersection of the `trackInternalDependencies` and `exportToInternal` settings will be used to determine the actual track level. Here's an example to opt-out one project:
|
||||
|
||||
lazy val dontTrackMe = (project in file("dontTrackMe")).
|
||||
settings(
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
- Discovered main classes will be sorted. [#1180][1180] by [@kretes][@kretes]
|
||||
- Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. [#1702][1702] by [@jsuereth][@jsuereth]
|
||||
- `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n]
|
||||
- Better abstration to track new kinds of dependencies for incremental compiler. [#1340][1340] by [@Duhemm][@Duhemm]
|
||||
- Better abstraction to track new kinds of dependencies for incremental compiler. [#1340][1340] by [@Duhemm][@Duhemm]
|
||||
- Source dependency uses `--depth 1` for git clone. [#1787][1787] by [@xuwei-k][@xuwei-k]
|
||||
- Facilitate nicer ways of declaring project settings. See below. [#1902][1902] by [@dwijnand][@dwijnand]
|
||||
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
- Fixes sporadic ConcurrentModificationException from JUnitXmlTestsListener. [#1881][1881] by [@aerskine][@aerskine]
|
||||
- Fixes handling of ANSI CSI codes. [#1885][1885] by [@jsuereth][@jsuereth]
|
||||
- Exempt org.scala-lang:scala-actors-migration and org.scala-lang:scala-pickling from scala binary version checks. [#1818][1818]/[#1899][1899] by [@dwijnand][@dwijnand]
|
||||
- Fixes cached resolution handling of internal depdendencies. [#1711][1711] by [@eed3si9n][@eed3si9n]
|
||||
- Fixes cached resolution handling of internal dependencies. [#1711][1711] by [@eed3si9n][@eed3si9n]
|
||||
- Fixes cached resolution being too verbose. [#1752][1752] by [@eed3si9n][@eed3si9n]
|
||||
- Fixes cached resolution not evicting modules transitively. [#1760][1760] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
- Adds help message for `inspect actual`. [#1651][1651]/[#1990][1990] by [@dwijnand][@dwijnand]
|
||||
- Supports excluding tests in `testOnly`/`testQuick` with `-`, for example `-MySpec`.
|
||||
[#1970][1970] by [@matthewfarwell][@matthewfarwell]
|
||||
- Adds more diagnostic info for underfined settings.
|
||||
- Adds more diagnostic info for undefined settings.
|
||||
[#2008][2008]/[#2009][2009] by [@DavidPerezIngeniero][@DavidPerezIngeniero]
|
||||
- Adds an `Extracted.runInputTask` helper to assist with imperatively executing input tasks. [#2006][2006] by [@jroper][@jroper]
|
||||
- Renames `distinct` method on `PathFinder` to `distinctName`. [#1973][1973] by [@eed3si9n][@eed3si9n]
|
||||
|
|
@ -141,7 +141,7 @@ and `A2` and `B1` are also is in the graph. This is fixed by sorting the graph p
|
|||
when it creates classloaders to call Scala Compilers.
|
||||
sbt 0.13.9 will call GC on a set interval (default: 60s).
|
||||
It will also call GC right before cross building.
|
||||
This behavior can diabled using by setting false to `forcegc`
|
||||
This behavior can disabled using by setting false to `forcegc`
|
||||
setting or `sbt.task.forcegc` flag.
|
||||
|
||||
[#1773][1773] by [@eed3si9n][@eed3si9n]
|
||||
|
|
@ -158,7 +158,7 @@ This problem surfaced as:
|
|||
- Version range not working for artifacts hosted on Bintray. [#2005][2005]
|
||||
- Potentially other `SNAPSHOT` related issues.
|
||||
|
||||
sbt 0.13.9 fixes this by relaxing the Maven compatiblity check, so it will read `maven-metadata.xml`. [#2075][2075] by [@eed3si9n][@eed3si9n]
|
||||
sbt 0.13.9 fixes this by relaxing the Maven compatibility check, so it will read `maven-metadata.xml`. [#2075][2075] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
### Contributors
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ case class CustomOutput(output: OutputStream) extends OutputStrategy
|
|||
import java.lang.{ ProcessBuilder => JProcessBuilder }
|
||||
|
||||
/**
|
||||
* Represents a commad that can be forked.
|
||||
* Represents a command that can be forked.
|
||||
*
|
||||
* @param commandName The java-like binary to fork. This is expected to exist in bin/ of the Java home directory.
|
||||
* @param runnerClass If Some, this will be prepended to the `arguments` passed to the `apply` or `fork` methods.
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ private final class TrapExit(delegateManager: SecurityManager) extends SecurityM
|
|||
|
||||
/**
|
||||
* Represents an isolated application as simulated by [[TrapExit]].
|
||||
* `execute` is the application code to evalute.
|
||||
* `execute` is the application code to evaluate.
|
||||
* `log` is used for debug logging.
|
||||
*/
|
||||
private final class App(val execute: xsbti.F0[Unit], val log: Logger) extends Runnable {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ lazy val numConfigClasses = taskKey[Int]("counts number of config classes")
|
|||
|
||||
lazy val configClassCountFile = settingKey[File]("File where we write the # of config classes")
|
||||
|
||||
lazy val saveNumConfigClasses = taskKey[Unit]("Saves the number of config clases")
|
||||
lazy val saveNumConfigClasses = taskKey[Unit]("Saves the number of config classes")
|
||||
|
||||
lazy val checkNumConfigClasses = taskKey[Unit]("Checks the number of config clases")
|
||||
lazy val checkNumConfigClasses = taskKey[Unit]("Checks the number of config classes")
|
||||
|
||||
lazy val checkDifferentConfigClasses = taskKey[Unit]("Checks that the number of config classes are different.")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
TaskKey[Unit]("checkName", "") := {
|
||||
assert(name.value == "hello-world", "Name is not hello-worled, failed to set!")
|
||||
assert(name.value == "hello-world", "Name is not hello-world, failed to set!")
|
||||
}
|
||||
|
||||
val notExistingThing = settingKey[Int]("Something new")
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@
|
|||
$ touch retrieve
|
||||
> reload
|
||||
|
||||
# verify that artifact with extension, type, and classifier can be retreieved
|
||||
# verify that artifact with extension, type, and classifier can be retrieved
|
||||
> check
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ $ copy-file changes/def/Def.java b/Def.java
|
|||
|
||||
|
||||
# Resolve from local again. This will succeed, but the jars
|
||||
# won't be on the classpath if the resolver isn't ignoredy.
|
||||
# won't be on the classpath if the resolver isn't ignored.
|
||||
|
||||
$ delete build.sbt
|
||||
$ delete b/Def.java
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ TaskKey[Unit]("check-last-update-time") := (streams map { (s) =>
|
|||
val exists = fullUpdateOutput.exists()
|
||||
s.log.info(s"Amount of time since last full update: $timeDiff")
|
||||
if (exists && timeDiff > 5000) {
|
||||
sys.error("Full update not perfomed")
|
||||
sys.error("Full update not performed")
|
||||
}
|
||||
}).value
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
> library/publishM2
|
||||
|
||||
# should suceed because local Ivy repository works
|
||||
# should succeed because local Ivy repository works
|
||||
> main/update
|
||||
|
||||
# should succeed when local Maven repository is added
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ lazy val root = (project in file(".")).
|
|||
cacheDir / "org.apache.geronimo.specs" / "geronimo-jta_1.1_spec" / "ivy-1.1.1.xml"
|
||||
val lines = IO.read(xmlFile)
|
||||
if(lines.isEmpty) sys.error(s"Unable to read $xmlFile, could not resolve geronimo...")
|
||||
// Note: We do not do this if the maven plguin is enabled, because there is no rewrite of ivy.xml, extra attribtues
|
||||
// Note: We do not do this if the maven plugin is enabled, because there is no rewrite of ivy.xml, extra attributes
|
||||
// are handled in a different mechanism. This is a hacky mechanism to detect that.
|
||||
val isMavenResolver = updateOptions.value.resolverConverter != PartialFunction.empty
|
||||
if(!isMavenResolver) assert(lines contains "xmlns:e", s"Failed to appropriately modify ivy.xml file for sbt extra attributes!\n$lines")
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ resolvers += Resolver.file("buggy", (baseDirectory in LocalRootProject).value /
|
|||
|
||||
libraryDependencies += "org.typelevel" %% "cats" % "0.6.0"
|
||||
|
||||
val checkDependencies = taskKey[Unit]("Checks that dependcies are correct.")
|
||||
val checkDependencies = taskKey[Unit]("Checks that dependencies are correct.")
|
||||
|
||||
checkDependencies := {
|
||||
val expected: Set[ModuleID] = Set(
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ resolvers += {
|
|||
}
|
||||
libraryDependencies += "exclude.test" % "app" % "1.0.0"
|
||||
|
||||
val checkDependencies = taskKey[Unit]("Checks that dependcies are correct.")
|
||||
val checkDependencies = taskKey[Unit]("Checks that dependencies are correct.")
|
||||
|
||||
checkDependencies := {
|
||||
val hasBadJar = (fullClasspath in Compile).value.exists { jar => jar.data.getName contains "bottom-1.0.0.jar"}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sbt.internal.inc.Analysis
|
||||
import complete.DefaultParsers._
|
||||
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
|
||||
|
||||
checkIterations := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sbt.internal.inc.Analysis
|
||||
import complete.DefaultParsers._
|
||||
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
|
||||
|
||||
checkIterations := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sbt.internal.inc.Analysis
|
||||
import complete.DefaultParsers._
|
||||
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
|
||||
|
||||
checkIterations := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sbt.internal.inc.Analysis
|
||||
import complete.DefaultParsers._
|
||||
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
|
||||
|
||||
checkIterations := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import complete.DefaultParsers._
|
|||
|
||||
crossTarget in Compile := target.value
|
||||
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
|
||||
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
|
||||
|
||||
checkIterations := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import sbt.internal.inc.Analysis
|
|||
|
||||
logLevel := Level.Debug
|
||||
|
||||
// disable sbt's heauristic which recompiles everything in case
|
||||
// disable sbt's heuristic which recompiles everything in case
|
||||
// some fraction (e.g. 50%) of files is scheduled to be recompiled
|
||||
// in this test we want precise information about recompiled files
|
||||
// which that heuristic would distort
|
||||
|
|
@ -34,7 +34,7 @@ TaskKey[Unit]("checkCompilations") := {
|
|||
recompiledFilesInIteration(0, Set("X.scala", "Y.scala"))
|
||||
// A.scala is changed and recompiled
|
||||
recompiledFilesInIteration(1, Set("A.scala"))
|
||||
// change in A.scala causes recompilation of B.scala, C.scala, D.scala which depend on transtiviely
|
||||
// change in A.scala causes recompilation of B.scala, C.scala, D.scala which depend on transitively
|
||||
// and by inheritance on A.scala
|
||||
// X.scala is also recompiled because it depends by member reference on B.scala
|
||||
// Note that Y.scala is not recompiled because it depends just on X through member reference dependency
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import org.scalatest.FunSuite
|
|||
|
||||
class SBT543 extends FunSuite {
|
||||
class MyCustomException(message: String) extends RuntimeException(message)
|
||||
test("throws a custom excpetion") {
|
||||
test("throws a custom exception") {
|
||||
throw new MyCustomException("this is a custom exception")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import ConcurrentRestrictions.{ Tag, TagMap, tagsKey }
|
|||
// Action, Task, and Info are intentionally invariant in their type parameter.
|
||||
// Various natural transformations used, such as PMap, require invariant type constructors for correctness
|
||||
|
||||
/** Defines a task compuation*/
|
||||
/** Defines a task computation*/
|
||||
sealed trait Action[T] {
|
||||
// TODO: remove after deprecated InputTask constructors are removed
|
||||
private[sbt] def mapTask(f: Task ~> Task): Action[T]
|
||||
|
|
|
|||
Loading…
Reference in New Issue