Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 0460786

Browse files
authored
Merge pull request #10 from sparsetech/feat/scala213
Add support for Scala 2.13
2 parents 9cc0ac2 + d606482 commit 0460786

File tree

20 files changed

+114
-42
lines changed

20 files changed

+114
-42
lines changed

.drone.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ kind: pipeline
22
name: default
33
steps:
44
- name: build
5-
image: tindzk/seed:0.1.1
5+
image: tindzk/seed:0.1.4
66
pull: always
77
commands:
88
- blp-server &
99
- seed --build=build211.toml bloop
1010
- bloop compile toml-native-test
1111
- bloop test toml-js toml-jvm
12+
- sleep 5
1213
- rm -rf .bloop build
1314
- seed --build=build212.toml bloop
1415
- bloop test toml-js toml-jvm
16+
- sleep 5
17+
- rm -rf .bloop build
18+
- seed --build=build213.toml bloop
19+
- bloop test toml-js toml-jvm

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: java
22
env:
33
- TRAVIS_SCALA_VERSION=2.11.11
44
- TRAVIS_SCALA_VERSION=2.12.8
5+
- TRAVIS_SCALA_VERSION=2.13.0
56
jdk:
67
- oraclejdk8
78

@@ -24,6 +25,6 @@ before_script:
2425
script:
2526
- set -x &&
2627
if [[ "$TRAVIS_SCALA_VERSION" == 2.11.* ]]; then testNative=tomlNative/test; else testNative=""; fi &&
27-
curl -o csbt https://raw.githubusercontent.com/coursier/sbt-launcher/master/csbt &&
28+
curl -L -o csbt https://github.com/coursier/sbt-launcher/releases/download/v1.2.14/csbt &&
2829
chmod +x csbt &&
29-
./csbt --add-coursier=true ++$TRAVIS_SCALA_VERSION tomlJVM/test tomlJS/test $testNative
30+
COURSIER_SBT_LAUNCHER_ADD_PLUGIN=true ./csbt ++$TRAVIS_SCALA_VERSION tomlJVM/test tomlJS/test $testNative

build.sbt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
33

44
val Scala2_11 = "2.11.12"
55
val Scala2_12 = "2.12.8"
6-
val FastParse = "1.0.0"
6+
val Scala2_13 = "2.13.0"
7+
val FastParse = "1.0.1"
78
val Shapeless = "2.3.3"
89
val ScalaCheck = "1.14.0"
9-
val ScalaTest = "3.0.5"
10+
val ScalaTest = "3.0.8"
1011
val ScalaTestNative = "3.2.0-SNAP10"
1112

1213
val SharedSettings = Seq(
1314
name := "toml-scala",
1415
organization := "tech.sparse",
1516

16-
scalaVersion := Scala2_12,
17-
crossScalaVersions := Seq(Scala2_12, Scala2_11),
17+
scalaVersion := Scala2_13,
18+
crossScalaVersions := Seq(Scala2_13, Scala2_12, Scala2_11),
1819

1920
pomExtra :=
2021
<url>https://github.com/sparsetech/toml-scala</url>
@@ -47,8 +48,8 @@ lazy val toml =
4748
.settings(SharedSettings)
4849
.settings(
4950
libraryDependencies ++= Seq(
50-
"com.lihaoyi" %%% "fastparse" % FastParse,
51-
"com.chuusai" %%% "shapeless" % Shapeless
51+
"org.scalameta" %%% "fastparse" % FastParse,
52+
"com.chuusai" %%% "shapeless" % Shapeless
5253
)
5354
)
5455
.jsSettings(

build.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build212.toml
1+
build213.toml

build211.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
scalaVersion = "2.11.12"
3-
scalaJsVersion = "0.6.26"
4-
scalaNativeVersion = "0.3.8"
3+
scalaJsVersion = "0.6.28"
4+
scalaNativeVersion = "0.3.9"
55
scalaOptions = [
66
"-encoding", "UTF-8",
77
"-unchecked",
@@ -21,7 +21,7 @@ root = "shared"
2121
sources = ["shared/src/main/scala"]
2222
targets = ["js", "jvm", "native"]
2323
scalaDeps = [
24-
["com.lihaoyi", "fastparse", "1.0.0"],
24+
["org.scalameta", "fastparse", "1.0.1"],
2525
["com.chuusai", "shapeless", "2.3.3"]
2626
]
2727

@@ -32,7 +32,7 @@ sources = ["jvm/src/main/scala"]
3232
[module.toml.test.jvm]
3333
sources = ["shared/src/test/scala", "jvm/src/test/scala"]
3434
scalaDeps = [
35-
["org.scalatest" , "scalatest" , "3.0.5" ],
35+
["org.scalatest" , "scalatest" , "3.0.8" ],
3636
["org.scalacheck", "scalacheck", "1.14.0"]
3737
]
3838

@@ -43,7 +43,7 @@ sources = ["js/src/main/scala"]
4343
[module.toml.test.js]
4444
sources = ["shared/src/test/scala"]
4545
scalaDeps = [
46-
["org.scalatest" , "scalatest" , "3.0.5" ],
46+
["org.scalatest" , "scalatest" , "3.0.8" ],
4747
["org.scalacheck", "scalacheck", "1.14.0"]
4848
]
4949

build212.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
scalaVersion = "2.12.8"
3-
scalaJsVersion = "0.6.26"
4-
scalaNativeVersion = "0.3.8"
3+
scalaJsVersion = "0.6.28"
4+
scalaNativeVersion = "0.3.9"
55
scalaOptions = [
66
"-encoding", "UTF-8",
77
"-unchecked",
@@ -21,7 +21,7 @@ root = "shared"
2121
sources = ["shared/src/main/scala"]
2222
targets = ["js", "jvm", "native"]
2323
scalaDeps = [
24-
["com.lihaoyi", "fastparse", "1.0.0"],
24+
["org.scalameta", "fastparse", "1.0.1"],
2525
["com.chuusai", "shapeless", "2.3.3"]
2626
]
2727

@@ -32,7 +32,7 @@ sources = ["jvm/src/main/scala"]
3232
[module.toml.test.jvm]
3333
sources = ["shared/src/test/scala", "jvm/src/test/scala"]
3434
scalaDeps = [
35-
["org.scalatest" , "scalatest" , "3.0.5" ],
35+
["org.scalatest" , "scalatest" , "3.0.8" ],
3636
["org.scalacheck", "scalacheck", "1.14.0"]
3737
]
3838

@@ -43,7 +43,7 @@ sources = ["js/src/main/scala"]
4343
[module.toml.test.js]
4444
sources = ["shared/src/test/scala"]
4545
scalaDeps = [
46-
["org.scalatest" , "scalatest" , "3.0.5" ],
46+
["org.scalatest" , "scalatest" , "3.0.8" ],
4747
["org.scalacheck", "scalacheck", "1.14.0"]
4848
]
4949

build213.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[project]
2+
scalaVersion = "2.13.0"
3+
scalaJsVersion = "0.6.28"
4+
scalaNativeVersion = "0.3.9"
5+
scalaOptions = [
6+
"-encoding", "UTF-8",
7+
"-unchecked",
8+
"-deprecation",
9+
"-Ywarn-numeric-widen",
10+
"-feature"
11+
]
12+
testFrameworks = [
13+
"org.scalatest.tools.Framework",
14+
"org.scalacheck.ScalaCheckFramework"
15+
]
16+
17+
[module.toml]
18+
root = "shared"
19+
sources = ["shared/src/main/scala"]
20+
targets = ["js", "jvm", "native"]
21+
scalaDeps = [
22+
["org.scalameta", "fastparse", "1.0.1"],
23+
["com.chuusai", "shapeless", "2.3.3"]
24+
]
25+
26+
[module.toml.jvm]
27+
root = "jvm"
28+
sources = ["jvm/src/main/scala"]
29+
30+
[module.toml.test.jvm]
31+
sources = ["shared/src/test/scala", "jvm/src/test/scala"]
32+
scalaDeps = [
33+
["org.scalatest" , "scalatest" , "3.0.8" ],
34+
["org.scalacheck", "scalacheck", "1.14.0"]
35+
]
36+
37+
[module.toml.js]
38+
root = "js"
39+
sources = ["js/src/main/scala"]
40+
41+
[module.toml.test.js]
42+
sources = ["shared/src/test/scala"]
43+
scalaDeps = [
44+
["org.scalatest" , "scalatest" , "3.0.8" ],
45+
["org.scalacheck", "scalacheck", "1.14.0"]
46+
]
47+
48+
[module.toml.native]
49+
root = "native"
50+
scalaVersion = "2.11.12"
51+
sources = ["native/src/main/scala"]
52+
53+
[module.toml.test.native]
54+
# Exclude GeneratedSpec.scala and Generators.scala
55+
sources = [
56+
"shared/src/test/scala/toml/CodecSpec.scala",
57+
"shared/src/test/scala/toml/EmbedSpec.scala",
58+
"shared/src/test/scala/toml/GenerationSpec.scala",
59+
"shared/src/test/scala/toml/RulesSpec.scala",
60+
"shared/src/test/scala/toml/TestHelpers.scala",
61+
]
62+
scalaDeps = [
63+
["org.scalatest", "scalatest", "3.2.0-SNAP10"]
64+
]

js/src/main/scala/toml/PlatformRules.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package toml
22

3-
import fastparse.all._
3+
import scala.meta.internal.fastparse.all._
44

55
trait PlatformRules {
66
val date = StringIn().map(_ => null.asInstanceOf[Value])

jvm/src/main/scala/toml/PlatformRules.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package toml
22

33
import java.time._
44

5-
import fastparse.all._
5+
import scala.meta.internal.fastparse.all._
66

77
trait PlatformRules { this: Rules.type =>
88
private val TenPowers =

jvm/src/test/scala/toml/DateGenSpec.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package toml
22

33
import org.scalatest.prop._
44
import org.scalatest.{Matchers, PropSpec}
5+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
56

6-
import fastparse.all._
7-
import fastparse.core.Parsed.{Failure, Success}
7+
import scala.meta.internal.fastparse.all._
8+
import scala.meta.internal.fastparse.core.Parsed.{Failure, Success}
89

9-
class DateGenSpec extends PropSpec with PropertyChecks with Matchers {
10+
class DateGenSpec extends PropSpec with ScalaCheckPropertyChecks with Matchers {
1011
import TestHelpers._
1112

1213
property("parse dates following the RFC 3339 spec (`date` parser)") {

0 commit comments

Comments
 (0)