Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Remove debugging code from the build code. Do not use SBT internal AP…
…I: <+=.
  • Loading branch information
hvanhovell committed Dec 31, 2015
commit e3e2f72d8080f8e0040be351032c7e3b24289c77
18 changes: 9 additions & 9 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ object SQL {
}

object Hive {

lazy val settings = Seq(
javaOptions += "-XX:MaxPermSize=256m",
// Specially disable assertions since some Hive tests fail them
Expand Down Expand Up @@ -418,9 +419,8 @@ object Hive {
//
// This has been heavily inspired by com.github.stefri.sbt-antlr (0.5.3). It fixes a number of
// build errors in the current plugin.
logLevel in Compile := Level.Debug,
// Create Parser from ANTLR grammar files.
sourceGenerators in Compile <+= Def.task {
sourceGenerators in Compile += Def.task {
val log = streams.value.log

val grammarFileNames = Seq(
Expand All @@ -439,10 +439,10 @@ object Hive {
antlr.setMake(true)

// Add grammar files.
grammarFileNames.flatMap(g => (sourceDir ** g).get).foreach { g =>
val relPath = (g relativeTo sourceDir).get.getPath
log.info("ANTLR: Grammar file '%s' detected.".format(relPath))
antlr.addGrammarFile(relPath)
grammarFileNames.flatMap(gFileName => (sourceDir ** gFileName).get).foreach { gFilePath =>
val relGFilePath = (gFilePath relativeTo sourceDir).get.getPath
log.info("ANTLR: Grammar file '%s' detected.".format(relGFilePath))
antlr.addGrammarFile(relGFilePath)
}

// Generate the parser.
Expand All @@ -453,11 +453,11 @@ object Hive {

// Return all generated java files.
(targetDir ** "*.java").get.toSeq
},
}.taskValue,
// Include ANTLR tokens files.
resourceGenerators in Compile <+= Def.task {
resourceGenerators in Compile += Def.task {
((sourceManaged in Compile).value ** "*.tokens").get.toSeq
}
}.taskValue
)
}

Expand Down