Skip to content

Commit df634fe

Browse files
committed
SBT 0.13 build; license; groupId = org.scala-lang.modules
The license is a standard 3-clause BSD license. We're publishing modules under org.scala-lang.modules. This signals they are "just another Scala library": - cross-versioned (cross-versioning under org.scala-lang confuses sbt) - backward binary compatible (but not forward like the core) Compile under Optimize/Deprecation/Features/Lint.
1 parent 44ec412 commit df634fe

29 files changed

+258
-4
lines changed

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Are you tempted to edit this file?
3+
#
4+
# First consider if the changes make sense for all,
5+
# or if they are specific to your workflow/system.
6+
# If it is the latter, you can augment this list with
7+
# entries in .git/info/excludes
8+
#
9+
# see also test/files/.gitignore
10+
#
11+
12+
*.jar
13+
*~
14+
15+
build.properties
16+
17+
# target directories for ant build
18+
/build/
19+
/dists/
20+
21+
# other
22+
/out/
23+
/bin/
24+
/sandbox/
25+
26+
# eclipse, intellij
27+
/.classpath
28+
/.project
29+
/src/intellij/*.iml
30+
/src/intellij/*.ipr
31+
/src/intellij/*.iws
32+
/.cache
33+
/.idea
34+
/.settings
35+
36+
# bak files produced by ./cleanup-commit
37+
*.bak
38+
39+
# Standard symbolic link to build/quick/bin
40+
qbin
41+
42+
# Mac specific, but that is common enough a dev platform to warrant inclusion.
43+
.DS_Store
44+
45+
target/

.mailmap

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Adriaan Moors <[email protected]>
2+
3+
4+
Aleksandar Prokopec <[email protected]>
5+
Aleksandar Prokopec <[email protected]> <[email protected]>
6+
Aleksandar Prokopec <[email protected]> <aleksandar@aleksandar-Latitude-E6500.(none)>
7+
Aleksandar Prokopec <[email protected]> <aleksandar@htpc-axel22.(none)>
8+
Aleksandar Prokopec <[email protected]> <aleksandar@htpc.(none)>
9+
Aleksandar Prokopec <[email protected]> <[email protected]>
10+
Aleksandar Prokopec <[email protected]> <[email protected]>
11+
Alex Cruise <[email protected]>
12+
13+
Antonio Cunei <[email protected]>
14+
15+
Buraq Emir <[email protected]>
16+
Caoyuan Deng <[email protected]>
17+
Chris Hodapp <[email protected]>
18+
Chris James <[email protected]>
19+
Christopher Vogt <[email protected]>
20+
21+
22+
Damien Obristi <[email protected]>
23+
Daniel C. Sobral <[email protected]>
24+
Daniel C. Sobral <[email protected]> <dcs@dcs-132-CK-NF79.(none)>
25+
Daniel Lorch <[email protected]>
26+
Erik Stenman <[email protected]>
27+
Eugene Burmako <[email protected]>
28+
29+
30+
31+
Ilya Sergei <[email protected]>
32+
Ingo Maier <[email protected]>
33+
34+
Josh Suereth <[email protected]>
35+
36+
Julien Eberle <[email protected]>
37+
Kenji Yoshida <[email protected]>
38+
Luc Bourlier <[email protected]>
39+
40+
Luc Bourlier <[email protected]>
41+
Martin Odersky <[email protected]>
42+
43+
Michael Pradel <[email protected]>
44+
Michel Schinz <[email protected]>
45+
Miguel Garcia <[email protected]>
46+
47+
Mirco Dotta <[email protected]>
48+
49+
Moez A. Abdel-Gawad <[email protected]>
50+
Mohsen Lesani <[email protected]>
51+
Nada Amin <[email protected]>
52+
53+
54+
Natallie Baikevich <[email protected]>
55+
Nikolay Mihaylov <[email protected]>
56+
Paolo Giarrusso <[email protected]>
57+
Pavel Pavlov <[email protected]>
58+
Philipp Haller <[email protected]>
59+
60+
Philippe Altherr <[email protected]>
61+
Raphaël Noir <[email protected]>
62+
Roland Kuhn <[email protected]>
63+
Rüdiger Klaehn <[email protected]>
64+
Sebastian Hack <[email protected]>
65+
Simon Ochsenreither <[email protected]>
66+
Stepan Koltsov <[email protected]>
67+
Stéphane Micheloud <[email protected]>
68+
Unknown Committer <[email protected]>
69+
70+
71+
Viktor Klang <[email protected]>
72+
Vincent Cremet <[email protected]>
73+
Vojin Jovanovic <[email protected]>
74+

LICENSE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright (c) 2002-2013 EPFL
2+
Copyright (c) 2011-2013 Typesafe, Inc.
3+
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice,
10+
this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
* Neither the name of the EPFL nor the names of its contributors
15+
may be used to endorse or promote products derived from this software
16+
without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

build.sbt

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
organization := "org.scala-lang.modules"
2+
3+
name := "scala-parser-combinators"
4+
5+
version := "1.0-RC1"
6+
7+
scalaVersion := "2.11.0-M4"
8+
9+
// NOTE: not necessarily equal to scalaVersion
10+
// (e.g., during PR validation, we override scalaVersion to validate,
11+
// but don't rebuild scalacheck, so we don't want to rewire that dependency)
12+
scalaBinaryVersion := "2.11.0-M4"
13+
14+
// don't use for doc scope, scaladoc warnings are not to be reckoned with
15+
scalacOptions in compile ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")
16+
17+
18+
// Generate $name.properties to store our version as well as the scala version used to build
19+
resourceGenerators in Compile <+= Def.task {
20+
val props = new java.util.Properties
21+
props.put("version.number", version.value)
22+
props.put("scala.version.number", scalaVersion.value)
23+
props.put("scala.binary.version.number", scalaBinaryVersion.value)
24+
val file = (resourceManaged in Compile).value / s"${name.value}.properties"
25+
IO.write(props, null, file)
26+
Seq(file)
27+
}
28+
29+
mappings in (Compile, packageBin) += {
30+
(baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties"
31+
}
32+
33+
34+
// maven publishing
35+
publishTo := {
36+
val nexus = "https://oss.sonatype.org/"
37+
if (version.value.trim.endsWith("SNAPSHOT"))
38+
Some("snapshots" at nexus + "content/repositories/snapshots")
39+
else
40+
Some("releases" at nexus + "service/local/staging/deploy/maven2")
41+
}
42+
43+
publishMavenStyle := true
44+
45+
publishArtifact in Test := false
46+
47+
pomIncludeRepository := { _ => false }
48+
49+
pomExtra := (
50+
<url>http://www.scala-lang.org/</url>
51+
<inceptionYear>2002</inceptionYear>
52+
<licenses>
53+
<license>
54+
<distribution>repo</distribution>
55+
<name>BSD 3-Clause</name>
56+
<url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url>
57+
</license>
58+
</licenses>
59+
<scm>
60+
<connection>scm:git:git://github.com/scala/{name.value}.git</connection>
61+
<url>https://github.com/scala/{name.value}</url>
62+
</scm>
63+
<issueManagement>
64+
<system>JIRA</system>
65+
<url>https://issues.scala-lang.org/</url>
66+
</issueManagement>
67+
<developers>
68+
<developer>
69+
<id>epfl</id>
70+
<name>EPFL</name>
71+
</developer>
72+
<developer>
73+
<id>Typesafe</id>
74+
<name>Typesafe, Inc.</name>
75+
</developer>
76+
</developers>
77+
)
78+
79+
// for testing with partest
80+
libraryDependencies += "org.scala-lang.modules" %% "scala-partest-interface" % "0.2" % "test"
81+
82+
// the actual partest the interface calls into -- must be binary version close enough to ours
83+
// so that it can link to the compiler/lib we're using (testing)
84+
libraryDependencies += "org.scala-lang.modules" %% "scala-partest" % "1.0-RC2" % "test"
85+
86+
fork in Test := true
87+
88+
javaOptions in Test += "-Xmx1G"
89+
90+
testFrameworks += new TestFramework("scala.tools.partest.Framework")
91+
92+
definedTests in Test += (
93+
new sbt.TestDefinition(
94+
"partest",
95+
// marker fingerprint since there are no test classes
96+
// to be discovered by sbt:
97+
new sbt.testing.AnnotatedFingerprint {
98+
def isModule = true
99+
def annotationName = "partest"
100+
}, true, Array())
101+
)
102+
103+
104+
// TODO: mima
105+
// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
106+
// import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
107+
// previousArtifact := Some(organization.value %% name.value % binaryReferenceVersion.value)

src/parser-combinators/scala/util/parsing/input/CharArrayReader.scala renamed to src/main/scala/scala/util/parsing/input/CharArrayReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package util.parsing.input
1616
* @author Adriaan Moors
1717
*/
1818
object CharArrayReader {
19-
final val EofCh = '\032'
19+
final val EofCh = '\u001a'
2020
}
2121

2222
/** A character array reader reads a stream of characters (keeping track of their positions)

src/parser-combinators/scala/util/parsing/input/CharSequenceReader.scala renamed to src/main/scala/scala/util/parsing/input/CharSequenceReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ package util.parsing.input
1515
* @author Martin Odersky, Adriaan Moors
1616
*/
1717
object CharSequenceReader {
18-
final val EofCh = '\032'
18+
final val EofCh = '\u001a'
1919
}
2020

2121
/** A character array reader reads a stream of characters (keeping track of their positions)

src/parser-combinators/scala/util/parsing/input/PagedSeqReader.scala renamed to src/main/scala/scala/util/parsing/input/PagedSeqReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import scala.collection.immutable.PagedSeq
1818
* @author Adriaan Moors
1919
*/
2020
object PagedSeqReader {
21-
final val EofCh = '\032'
21+
final val EofCh = '\u001a'
2222
}
2323

2424
/** A character array reader reads a stream of characters (keeping track of their positions)

src/parser-combinators/scala/util/parsing/input/StreamReader.scala renamed to src/main/scala/scala/util/parsing/input/StreamReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import scala.collection.immutable.PagedSeq
1717
* @author Miles Sabin
1818
*/
1919
object StreamReader {
20-
final val EofCh = '\032'
20+
final val EofCh = '\u001a'
2121

2222
/** Create a `StreamReader` from a `java.io.Reader`.
2323
*

0 commit comments

Comments
 (0)