Skip to content
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

Added implicit show for Java URL type #75

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

lyrahalden
Copy link
Contributor

This compiles, but I'm pretty unfamiliar with how Guardrail works, so I'm not sure if there are any other changes I need to make along with it. Just submitting this so we can iterate.

@@ -5,6 +5,7 @@ import cats.syntax.either._
import cats.~>
import com.twilio.guardrail.terms._
import scala.meta._
import java.net.URL
Copy link
Member

Choose a reason for hiding this comment

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

This import isn't necessary, for two reasons:

  1. you've specified the full type in build[java.net.URL]
  2. the line you've added below is inside source""", which is a scala.meta string interpolator; we use the parsed structure that comes out of that string interpolator to write files that will then be compiled later (code generation, to be compiled by future invocations of scalac)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Thanks for the explanation.

@blast-hardcheese blast-hardcheese merged commit 5051861 into guardrail-dev:master Jul 13, 2018
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