You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, building a server requires matching the exact order in which methods and services are defined in the correspoding type. When this type comes from importing a .proto, .avdl, or in the future GraphQL schema, keeping this order is quite difficult. Furthermore, @kutyel has noticed that the error message you get is quite un-informative.
So we need to find a better notation. Right now we are thinking of a blaze-builder-like notation using do, like:
service @"Book"$do
method @"id"...
method @"author"...
Sure, the goal is to get a compile-time error if you miss something. I was also thinking along the lines of RebindableSyntax, but I'm not so happy with the idea, because that makes inference in the rest of the file terrible :(
Unfortunately, I could not get a good error message for the case in which you are missing a method. The reason is that for the inference to work I need to have a functional dependency on ToHandlers. But that dependency precludes me from having this instance.
@arianvp after some discussion with @kutyel, we came with a better API using tuples instead of weird heterogeneous lists. So you can now declare servers in this way:
Right now, building a server requires matching the exact order in which methods and services are defined in the correspoding type. When this type comes from importing a
.proto
,.avdl
, or in the future GraphQL schema, keeping this order is quite difficult. Furthermore, @kutyel has noticed that the error message you get is quite un-informative.So we need to find a better notation. Right now we are thinking of a
blaze-builder
-like notation usingdo
, like:@arianvp you might be interested in this
The text was updated successfully, but these errors were encountered: