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

add play json module #1946

Merged
merged 9 commits into from Aug 13, 2018

Conversation

Projects
None yet
3 participants
@julien-truffaut
Contributor

julien-truffaut commented Jul 11, 2018

No description provided.

julien
@julien-truffaut

This comment has been minimized.

Contributor

julien-truffaut commented Jul 11, 2018

How can I disable mima for this new module?

[error] (play-json / mimaPreviousClassfiles) sbt.librarymanagement.ResolveException: unresolved dependency: org.http4s#http4s-play-json_2.12;0.18.15: not found

julien added some commits Jul 12, 2018

julien
julien
julien
julien
@julien-truffaut

This comment has been minimized.

Contributor

julien-truffaut commented Jul 12, 2018

I fixed mima and other formatting issue. However, I don't know why the last build is hanging:

https://travis-ci.org/http4s/http4s/jobs/403105677

@julien-truffaut

This comment has been minimized.

Contributor

julien-truffaut commented Jul 17, 2018

I may need some help to investigate the build failure, I don't really know where to look atm

@rossabaker

This comment has been minimized.

Member

rossabaker commented Jul 18, 2018

Wow. That's surprising. Does the 2.11 build fail locally?

@julien-truffaut

This comment has been minimized.

Contributor

julien-truffaut commented Jul 19, 2018

@rossabaker probably the problem is that I can't seem to run the test locally, I tried both: sbt ci and sbt test in 2.12 and 2.11 but I always get:

[error] (okhttp-client / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] (client / Test / test) sbt.TestsFailedException: Tests unsuccessful

should I run another command?

@rossabaker

This comment has been minimized.

Member

rossabaker commented Aug 11, 2018

I'm not sure what client tests you saw fail, but I used to get client failures on OSX with regard to resolving localhost. I solved these by moving back to Linux. 🐧

I saw a linker error when running play/test. Poking around at the jawn build, it looks like that was built against play-json-3.5 for Scala 2.11 on the version of jawn we use. Lining that up works for me locally. If we upgrade jawn in 0.19, it looks like we can get on the latest play-json for both Scala versions.

@rossabaker rossabaker added this to the 0.18.16 milestone Aug 11, 2018

@julien-truffaut

This comment has been minimized.

Contributor

julien-truffaut commented Aug 13, 2018

Thank Ross for having a look.

FYI, I am getting test failures for JavaNetClient and OkHttpClient:

[info] JavaNetClientSpec
[error] ! Execute GET: /simple (166 ms)
[error]  java.io.IOException: Server returned HTTP response code: 502 for URL: http://julien-HP-Z240-SFF-Workstation:37849/simple (null:-1)

It might be related to my work network. I will try from home.

Regarding you config change, it seems that sbt doesn't accept playJsonVersion being a function:

[error] /home/travis/build/http4s/http4s/project/Http4sPlugin.scala:320:105: missing argument list for method playJsonVersion in object Http4sPlugin
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `playJsonVersion _` or `playJsonVersion(_)` instead of `playJsonVersion`.
[error]   def playJson(sbv: String)                 = "com.typesafe.play"      %% "play-json"                 % playJsonVersion

I get the same error locally.

@rossabaker

This comment has been minimized.

Member

rossabaker commented Aug 13, 2018

Ugh. I had it passing, and got a couple commits tangled, and untangled them, and pushed the wrong state. Sorry about that. Looking again.

@rossabaker

Build passes finally. We missed a couple copy-and-paste issues on implicit names.

* Derive [[EntityDecoder]] if implicit [[Reads]] is in the scope without need to explicitly call `jsonOf`
*/
trait PlayEntityDecoder {
implicit def circeEntityDecoder[F[_]: Sync, A: Reads]: EntityDecoder[F, A] = jsonOf[F, A]

This comment has been minimized.

@rossabaker

rossabaker Aug 13, 2018

Member

Should not call this circe.

* Derive [[EntityEncoder]] if implicit [[Writes]] is in the scope without need to explicitly call `jsonEncoderOf`
*/
trait PlayEntityEncoder {
implicit def circeEntityEncoder[F[_]: Applicative, A: Writes]: EntityEncoder[F, A] =

This comment has been minimized.

@rossabaker

rossabaker Aug 13, 2018

Member

Should not call this circe.

This comment has been minimized.

@julien-truffaut

julien-truffaut Aug 13, 2018

Contributor

thanks I will fix this

@rossabaker rossabaker merged commit ec2ec6f into http4s:release-0.18.x Aug 13, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment