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

Introduce finch-generic module #716

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

ilya-murzinov
Copy link
Contributor

@ilya-murzinov ilya-murzinov commented Jan 8, 2017

Before:

import io.finch._
val e = Endpoint.derive[Foo].fromParams

After:

import io.finch._
import io.finch.generic_
val e = deriveFor[Foo].fromParams

Resolves #528

@codecov-io
Copy link

codecov-io commented Jan 8, 2017

Codecov Report

Merging #716 into master will increase coverage by 1.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #716      +/-   ##
==========================================
+ Coverage   79.78%   81.01%   +1.22%     
==========================================
  Files          35       37       +2     
  Lines         653      653              
  Branches       18       21       +3     
==========================================
+ Hits          521      529       +8     
+ Misses        132      124       -8
Impacted Files Coverage Δ
core/src/main/scala/io/finch/Endpoint.scala 76.69% <ø> (+1.13%) ⬆️
...c/src/main/scala/io/finch/generic/FromParams.scala 50% <ø> (ø)
...ain/scala/io/finch/generic/GenericDerivation.scala 100% <100%> (ø)
...eric/src/main/scala/io/finch/generic/package.scala 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5584ddb...f6093f9. Read the comment docs.

@ilya-murzinov ilya-murzinov force-pushed the finch-generic branch 2 times, most recently from 8c23bb4 to c2586c9 Compare January 8, 2017 13:55
@ilya-murzinov
Copy link
Contributor Author

@vkostyukov @rpless any chance to get a feedback here?

Copy link
Collaborator

@vkostyukov vkostyukov left a comment

Choose a reason for hiding this comment

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

Thanks @ilya-murzinov! (Sorry it took me a while to review). This LGTM!

/**
* Generically derive a very basic instance of [[Endpoint]] for a given type `A`.
*/
def deriveFor[A]: GenericDerivation[A] = new GenericDerivation[A]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're moving this anyway, how about we change that to deriveEndpoint[A]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@vkostyukov vkostyukov requested a review from rpless March 27, 2017 16:51
Copy link
Collaborator

@rpless rpless left a comment

Choose a reason for hiding this comment

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

Aside from renaming deriveFor, 👍

@vkostyukov
Copy link
Collaborator

Hey @ilya-murzinov! Any chance you'd be able to update this branch today/tomorrow? I was hoping to get the release out and wanted to include these changes there as well.

@ilya-murzinov
Copy link
Contributor Author

ilya-murzinov commented Mar 29, 2017 via email

@ilya-murzinov ilya-murzinov force-pushed the finch-generic branch 2 times, most recently from b5297e0 to b657e37 Compare March 30, 2017 16:59
/**
* Generically derive a very basic instance of [[Endpoint]] for a given type `A`.
*/
def deriveEndpointFor[A]: GenericDerivation[A] = new GenericDerivation[A]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, mind dropping For? Just deriveEndpoint is perfectly fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kinda liked this 'for', but since you insist...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I can see why you might like it and yet I think it doesn't really add much readability. Also, I learn from Circe that has deriveDecoder and deriveEncoder.

@ilya-murzinov ilya-murzinov force-pushed the finch-generic branch 2 times, most recently from a45e9ae to 333e9a1 Compare March 31, 2017 07:53
@vkostyukov vkostyukov merged commit 2a836c0 into finagle:master Mar 31, 2017
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.

4 participants