Skip to content

http4s client + tagless final style generation #596

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

Merged
merged 4 commits into from
Feb 22, 2023

Conversation

zarthross
Copy link
Contributor

@zarthross zarthross commented Feb 13, 2023

What this PR Does:

  • Add support for tagless style service generation.
  • Add an http4s client with support for 0.21 and 0.23 (I needed these 2, but I could be convinced to add others)

TODO

  • Manually Test CLI client
  • Add maven params for new cli arguments
  • Resolve conflicts
    - [ ] Update Docs (I'll do this if you tell me how 😆 )

@zarthross zarthross marked this pull request as ready for review February 15, 2023 02:44
Copy link
Owner

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zarthross!

@zarthross
Copy link
Contributor Author

@eed3si9n No rush, but do you have an idea on when you might merge and release this change? I'm trying to determine if I need to cut an internal release or not in order to use this feature and knowing what your expected timeline is could save me some time 😄

@eed3si9n eed3si9n merged commit 153e640 into eed3si9n:develop Feb 22, 2023
@eed3si9n
Copy link
Owner

I'll try to release today or tomorrow.

@eed3si9n eed3si9n changed the title Tagless Final Style Generation http4s client + tagless final style generation Feb 22, 2023
@eed3si9n
Copy link
Owner

So I released 1.10.0, but it doesn't seem to generate http4s client when I set to the following:

import Dependencies._

ThisBuild / organization  := "com.example"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.13.10"

lazy val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.3.0"
lazy val scalaParser = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
lazy val jaxbApi = "javax.xml.bind" % "jaxb-api" % "2.3.0"

lazy val root = (project in file("."))
  .enablePlugins(ScalaxbPlugin)
  .settings(
    name := "soap",
    libraryDependencies ++= Seq(scalaXml, scalaParser, jaxbApi),
    Compile / scalaxb / scalaxbPackageName := "generated",
    Compile / scalaxb / scalaxbGenerateDispatchClient := false,
    Compile / scalaxb / scalaxbGenerateHttp4sClient := true,
  )

@zarthross
Copy link
Contributor Author

Thanks for releasing it!!!

Looks like I missed an edge case, you need to explicitly set the scalaxbHttpClientStyle to tagless in order for it to work. If you like I can do a follow up PR to fix that.

scalaxbHttpClientStyle  := HttpClientStyle.Tagless,

@zarthross zarthross deleted the tagless-final branch February 22, 2023 19:54
@eed3si9n
Copy link
Owner

Here's how I followed up - #597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants