Code Monkey home page Code Monkey logo

Comments (7)

mdedetrich avatar mdedetrich commented on May 30, 2024

I can put it up now, but I was thinking of switching from dispatch to the new akka-http client (and also possibly using circe instead of play-json due to play-json's bad support for 2.12).

I can release right now as a 0.1.0 and then release 0.2.0 with these changes, or another option is to wait until I make the changes and you can continue using the snapshot.

What do you think?

from stripe-scala.

leonardehrenfried avatar leonardehrenfried commented on May 30, 2024

Is there anything wrong with play-json for 2.12 - other than it not being available? (There is a milestone release here: https://mvnrepository.com/artifact/com.typesafe.play/play-json_2.12/2.6.0-M1) 2.12 support is planned for play 2.6 but that's still a few weeks (months?) away.

I'm asking because switching from play-json to circe is probably a large amount of work.

Regarding the dispatch dependency: I thought you're working on a 2.12 release. How is that coming along?

All in all, I'm really like play-json and dispatch and would be hesitant to move away from them even though they are no longer the hot new thing.

from stripe-scala.

leonardehrenfried avatar leonardehrenfried commented on May 30, 2024

Also, I just remembered one thing I'd like to do before a Maven Central release: Run the integration tests on travis.

That would mean to create a test Stripe account against which the integrations tests are being run and to store those credentials encrypted in Travis. I've read about how to do this but have never actually done that.

from stripe-scala.

mdedetrich avatar mdedetrich commented on May 30, 2024

Is there anything wrong with play-json for 2.12 - other than it not being available? (There is a milestone release here: https://mvnrepository.com/artifact/com.typesafe.play/play-json_2.12/2.6.0-M1) 2.12 support is planned for play 2.6 but that's still a few weeks (months?) away.

I'm asking because switching from play-json to circe is probably a large amount of work.

I am still on the fence about this one, however there are a few things that make circe more desirable (I have been using circe at work).

  • It has encoders/decoders for case classes converting automatically to snake_case regardless of the size of the case class. This would actually remove a huge amount of boilerplate currently in stripe-scala
  • The latest release uses scala Either instead of Xor which means its a lot nicer for users
  • It has a better number type (they use their own custom one) which could make a difference for really large figures
  • Probably most importantly, its not tied to play release cycle. We are actually going to be stuck a bit on Play 2.5, and there is no 2.12 for play 2.5 (it may be done, but its not certain for now because of some of play's 2.5 dependencies). I actually think that Circe having its own release cycle seperate from Play means there are going to be less issues in integrating stripe-scala into existing code
  • Its compiled for scala-js. Even though stripe is a server side, I see merit in having stripe-scala-models which contains just the stripe case class models and cross compiling that for scala-js, and then having stripe-scala just use those models.

The main downside is the dependency on Cats, maybe I should see if I can give shadowing another look

Regarding the dispatch dependency: I thought you're working on a 2.12 release. How is that coming along?

Im currently waiting for sonatype permissions to come through. Generally though, I want to use akka-http because its going to be much better maintained (although I am trying to get dispatch into Scala 2.12.0, I don't have the time to maintain and improve the library. I am doing this more for the community)

Moving to akka-http would also remove the scala-uri dependency as they have their own uri type

Luckily we have tests, so if we go ahead with these changes we can test if anything breaks. Also I am willing to put in the effort to do this, its largely mechanical.

Also, I just remembered one thing I'd like to do before a Maven Central release: Run the integration tests on travis.

That would mean to create a test Stripe account against which the integrations tests are being run and to store those credentials encrypted in Travis. I've read about how to do this but have never actually done that.

Yup, I also want to integrate mima plus other things

from stripe-scala.

leonardehrenfried avatar leonardehrenfried commented on May 30, 2024

I've been thinking about this and I think we should deploy a version 0.0.1 (or whatever) as it is now with support for 2.11 only.

Sooner or later we will either decide to switch to circe or play-json 2.6 will come along. I don't think that we need to have all issues resolved before this becomes a useful thing. In actual fact, it's powering my clients payment integration for over a month now without a hitch.

from stripe-scala.

mdedetrich avatar mdedetrich commented on May 30, 2024

Sure thing, and I agree with that. Will deploy a v0.1.0 today and I can start working on the changes in 0.2.

I will do the akka changeover first, since I think that is most important for now and then I will consider the JSON changes. I will also look into shading, so its easier for other libraries to use. One of the issues with using Circe is it depends on Cats, where as play-json doesn't have this problem.

from stripe-scala.

mdedetrich avatar mdedetrich commented on May 30, 2024

@leonardehrenfried Have just released 0.1.0 on maven. Should be downloadable in 30 minutes (if its not then let me know)

I have also added you as a collaborator on the github project. Will make another commit to bump the version to 0.2.0-SNAPSHOT and will start work on the features I talked about in seperate branches

from stripe-scala.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.