These are chat archives for scalikejdbc/ja

8th
Jul 2015
Shunsuke Wada
@letusfly85
Jul 08 2015 03:52
プロジェクトルートでsbtをたちあげて、sbtコンソールからscriptedのタスクを実行できることを確認できました。
scriptedのタスクを実行後しばらくまつと、scalikejdbc-mapper-generatorのno-database

のtetsの定義が実行されはじめ、

crossScalaVersions := List("2.11.7", "2.10.5")
におそらくしたがって、scalaのバージョンを2.11.7と2.10.5にきりかえながらテストを実行してくれました。

その後、なぜか、2.10.4のバージョンでテストがはじまり、こけます。。

[info] [info] Setting version to 2.10.4
[info] [info] Set current project to no-database (in build file:/tmp/sbt_d3c62482/no-database/)
[info] + scalikejdbc-mapper-generator / no-database
Running scalikejdbc-mapper-generator / target
[error] x scalikejdbc-mapper-generator / target
[trace] Stack trace suppressed: run last mapper-generator/*:scripted for the full output.
[error] (mapper-generator/*:scripted) java.io.FileNotFoundException: /tmp/sbt_fe75ab93/target/test (そのようなファイルやディレクトリはありません)
[error] Total time: 27 s, completed 2015/07/08 12:54:20

scalaのバージョンまわりの設定でミスってると思うので、見直しつつ、

publishLocalして cd scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen してそこで実際にsbt立ちあげて試行錯誤、くらいしかないですね

上記もやってみました。
こちらについては、下記をsbtコンソールで順に実行していくと、

https://github.com/scalikejdbc/scalikejdbc/blob/master/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/test

> set (scalikejdbc.mapper.SbtKeys.scalikejdbcGeneratorSettings in Compile) ~= {_.copy(dateTimeClass = scalikejdbc.mapper.DateTimeClass.ZonedDateTime)}
> scalikejdbcGenEcho programmers
> scalikejdbcGenForce programmers
> + test:compile

あたりでエラーになります。

Shunsuke Wada
@letusfly85
Jul 08 2015 03:59

"app.models.Programmers" created.
"app.models.ProgrammersSpec" created.
[success] Total time: 0 s, completed 2015/07/08 12:58:05
>  + test:compile
[info] Setting version to 2.11.7
[info] Set current project to gen (in build file:/home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/)
[info] Updating {file:/home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/}gen...
[info] Resolving jline#jline;2.12.1 ... 
[info] Done updating.
[info] Compiling 2 Scala sources to /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/target/scala-2.11/classes...
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:4: object time is not a member of package java
[error] import java.time.{ZonedDateTime, LocalDate, LocalTime}
[error]             ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:10: not found: type ZonedDateTime
[error]   t1: ZonedDateTime,
[error]       ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:11: not found: type LocalDate
[error]   t2: Option[LocalDate] = None,
[error]              ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:12: not found: type LocalTime
[error]   t3: Option[LocalTime] = None,
[error]              ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:76: not found: type ZonedDateTime
[error]     t1: ZonedDateTime,
[error]         ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:77: not found: type LocalDate
[error]     t2: Option[LocalDate] = None,
[error]                ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:78: not found: type LocalTime
[error]     t3: Option[LocalTime] = None,
[error]                ^
[error] 7 errors found
[error] (compile:compile) Compilation failed
[

"app.models.Programmers" created.
"app.models.ProgrammersSpec" created.
[success] Total time: 0 s, completed 2015/07/08 12:58:05
>  + test:compile
[info] Setting version to 2.11.7
[info] Set current project to gen (in build file:/home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/)
[info] Updating {file:/home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/}gen...
[info] Resolving jline#jline;2.12.1 ... 
[info] Done updating.
[info] Compiling 2 Scala sources to /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/target/scala-2.11/classes...
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:4: object time is not a member of package java
[error] import java.time.{ZonedDateTime, LocalDate, LocalTime}
[error]             ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:10: not found: type ZonedDateTime
[error]   t1: ZonedDateTime,
[error]       ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:11: not found: type LocalDate
[error]   t2: Option[LocalDate] = None,
[error]              ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:12: not found: type LocalTime
[error]   t3: Option[LocalTime] = None,
[error]              ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:76: not found: type ZonedDateTime
[error]     t1: ZonedDateTime,
[error]         ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:77: not found: type LocalDate
[error]     t2: Option[LocalDate] = None,
[error]                ^
[error] /home/wada/repos/scalikejdbc2/scalikejdbc-mapper-generator/src/sbt-test/scalikejdbc-mapper-generator/gen/src/main/scala/app/models/Programmers.scala:78: not found: type LocalTime
[error]     t3: Option[LocalTime] = None,
[error]                ^
[error] 7 errors found
[error] (compile:compile) Compilation failed
Manabu Nakamura
@gakuzzzz
Jul 08 2015 04:03
java.time が見れて無いので Java8 にする必要がありそうですね
Shunsuke Wada
@letusfly85
Jul 08 2015 04:03

きちんとキャッチアップしたいので、2つとも原因等見ていきます。

おかしなことをしている、感想等ありましたらご意見ください。

java.time が見れて無いので Java8 にする必要がありそうですね

ありがとうございます。あ、、、、なるほど。。

Shunsuke Wada
@letusfly85
Jul 08 2015 04:09
よく見ると、travis.ci側でも、scripted-testはjdk8のみが実施となっていました。。
Shunsuke Wada
@letusfly85
Jul 08 2015 04:28

java8をいれて、sbtコンソールを再度立ち上げることでgenフォルダのtestを手打ちですが実施できました。
ありがとうございます。

configurationをみれて、どんなオプションに対応しているのかをもろもろ見ることができました。種類が多いですね。。すごい。。

Manabu Nakamura
@gakuzzzz
Jul 08 2015 04:31
:+1:
kenji yoshida
@xuwei-k
Jul 08 2015 05:11
そういえば話戻る(?)けど、pull reqしてからtravis上でforce pushしても古いjobキャンセルされずにキューに積まれるので面倒(やるとしたらコミッターが明示的に古いjobキャンセルするしかない。pull reqした本人はキャンセルできない)みたいなのもありますね・・・
もうちょっとtravis側なんとかなって欲しい
Shunsuke Wada
@letusfly85
Jul 08 2015 05:12
同感です(><)
kenji yoshida
@xuwei-k
Jul 08 2015 05:13
scalikejdbcのテストが異様に長いのもどうにかしたい(と思いつつ、テスト内容というかDBの種類などを削る以外に、どうにもいい案思いつかないのでこうなってる)