Skip to content

Test ci failure 2 #1714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import scala.reflect.io.Path

import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt.Package.ManifestAttributes

object DottyBuild extends Build {

Expand Down Expand Up @@ -173,9 +172,6 @@ object DottyBuild extends Build {
fork in Test := true,
parallelExecution in Test := false,

// Add git-hash used to package the distribution to the manifest to know it in runtime and report it in REPL
packageOptions += ManifestAttributes(("Git-Hash", VersionUtil.gitHash)),

// http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
javaOptions <++= (dependencyClasspath in Runtime, packageBin in Compile) map { (attList, bin) =>
// put the Scala {library, reflect} in the classpath
Expand Down
4 changes: 2 additions & 2 deletions src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ object Parsers {
val uscoreStart = in.skipToken()
if (isIdent(nme.raw.STAR)) {
in.nextToken()
if (in.token != RPAREN) syntaxError(SeqWildcardPatternPos(), uscoreStart)
if (in.token != RPAREN) syntaxError("`_*' can be used only for last argument", uscoreStart)
Typed(t, atPos(uscoreStart) { Ident(tpnme.WILDCARD_STAR) })
} else {
syntaxErrorOrIncomplete(IncorrectRepeatedParameterSyntax())
Expand Down Expand Up @@ -1424,7 +1424,7 @@ object Parsers {
// `x: _*' is parsed in `ascription'
if (isIdent(nme.raw.STAR)) {
in.nextToken()
if (in.token != RPAREN) syntaxError(SeqWildcardPatternPos(), wildIndent.pos)
if (in.token != RPAREN) syntaxError("`_*' can be used only for last argument", wildIndent.pos)
atPos(wildIndent.pos) { Ident(tpnme.WILDCARD_STAR) }
} else wildIndent
case LPAREN =>
Expand Down
3 changes: 1 addition & 2 deletions src/dotty/tools/dotc/repl/InterpreterLoop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
output.flush()
}

val gitHash = ManifestInfo.attributes.getOrElse("Git-Hash", "unknown")
val version = s".next (pre-alpha, git-hash: $gitHash)"
val version = ".next (pre-alpha)"

/** The main read-eval-print loop for the interpreter. It calls
* `command()` for each line of input.
Expand Down
20 changes: 0 additions & 20 deletions src/dotty/tools/dotc/repl/ManifestInfo.scala

This file was deleted.

23 changes: 0 additions & 23 deletions src/dotty/tools/dotc/reporting/diagnostic/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -789,27 +789,4 @@ object messages {
val msg = "unreachable code"
val explanation = ""
}

case class SeqWildcardPatternPos()(implicit ctx: Context) extends Message(31) {
val kind = "Syntax"
val msg = "`_*' can be used only for last argument"
val explanation = {
val code =
"""def sumOfTheFirstTwo(list: List[Int]): Int = list match {
| case List(first, second, x:_*) => first + second
| case _ => 0
|}"""
hl"""|Sequence wildcard pattern is expected at the end of an argument list.
|This pattern matches any remaining elements in a sequence.
|Consider the following example:
|
|$code
|
|Calling:
|
|${"sumOfTheFirstTwo(List(1, 2, 10))"}
|
|would give 3 as a result"""
}
}
}