Closed nemanja-boric-sociomantic closed 6 years ago
I'm not sure about the milestone. This should ideally go into v13.2.x and be released as a bug fix (as the v14.0.x doesn't compile when using GroupRequest and appropriate compiler).
Fails in D1 :disappointed:
./src/dlsproto/client/legacy/internal/helper/GroupRequest.d(117): Error: template dlsproto.client.DlsClient.DlsClient.getRange(Key) does not match any function template declaration
./src/dlsproto/client/legacy/internal/helper/GroupRequest.d(117): Error: template dlsproto.client.DlsClient.DlsClient.getRange(Key) cannot deduce template function from argument types !()(char[7LU],ulong,ulong,void*,void*)
./src/dlsproto/client/legacy/internal/helper/GroupRequest.d(119): Error: template dlsproto.client.legacy.internal.helper.GroupRequest.makeGroupRequest(Request) does not match any function template declaration
./src/dlsproto/client/legacy/internal/helper/GroupRequest.d(119): Error: template dlsproto.client.legacy.internal.helper.GroupRequest.makeGroupRequest(Request) cannot deduce template function from argument types !()(_error_)
Uh, it might be connected just with the unittest (hopefully).
Since DMD 2.071.* the request structs are private for the client.
Wasn't there a PR that made them public?
Just the Neo ones.
But the dhtproto's one are public.
Ahh. We could do the same to the legacy ones?
We could, but the factory function makes that not necessary. I think this is the only place where you need to address these structs by their name, so I think they should still be private, given this workaround.
LGTM
Added release notes.
Since DMD 2.071.* the request structs are private for the client. This means that it's deprecated to refer the request struct when instantiating the GroupRequest template. As an alternative, makeGroupRequest function template that deducts the type of the GroupRequest from the instance parameter is added.