-
Notifications
You must be signed in to change notification settings - Fork 34
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
Skipping binary dependencies when is not necessary #581
Skipping binary dependencies when is not necessary #581
Conversation
… have http capabilities
Codecov Report
@@ Coverage Diff @@
## master #581 +/- ##
=======================================
Coverage 82.27% 82.27%
=======================================
Files 63 63
Lines 965 965
Branches 14 14
=======================================
Hits 794 794
Misses 171 171
Continue to review full report at Codecov.
|
package higherkindness.mu | ||
import scala.annotation.StaticAnnotation | ||
|
||
package object http { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a package object here instead of a standard one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at
b8be4b7
@@ -17,6 +17,7 @@ | |||
package higherkindness.mu.rpc.http | |||
|
|||
import higherkindness.mu.rpc.protocol._ | |||
import higherkindness.mu.http._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for consistency, we want to have an additional subpackage protocol
, like in the rpc
case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at b8be4b7
@@ -21,6 +21,13 @@ import org.http4s.HttpRoutes | |||
import org.http4s.server.blaze.BlazeServerBuilder | |||
import org.http4s.implicits._ | |||
import org.http4s.server.Router | |||
import scala.annotation.StaticAnnotation | |||
|
|||
object protocol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about an standard package rather than an object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at the name of the file, we already had protocol.scala
(because this was cloned from the rpc part).
This PR closes #575
Now, if you have this service:
Means that you don't want to have any http capability for your service, so
@service
is generating no http stuff. So no http4s dependency is necessary.But if you add
@http
to any operation, like that:Given that the
@http
annotation has been moved tohttp
module, you will need to add themu-http
(with the transitive http4s dependency).