Skip to content

Commit

Permalink
Enable errors for deprecations and fix those
Browse files Browse the repository at this point in the history
Bunch of 2.071 deprecations were not noticed previously because dhtproto
was not compiled with -de flag.
  • Loading branch information
mihails-strasuns-sociomantic authored and Gavin Norman committed Mar 5, 2018
1 parent c646488 commit fec1b3f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
1 change: 1 addition & 0 deletions Build.mak
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ override DFLAGS += -w
ifeq ($(DVER),1)
override DFLAGS += -v2 -v2=-static-arr-params -v2=-volatile
else
override DFLAGS += -de
DC:=dmd-transitional
endif

Expand Down
28 changes: 14 additions & 14 deletions src/dhtproto/client/DhtClient.d
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct Put
public struct Put
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -788,7 +788,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct Get
public struct Get
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -826,7 +826,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct Exists
public struct Exists
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -860,7 +860,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct Remove
public struct Remove
{
mixin RequestBase;
mixin Channel; // channel(cstring) method
Expand Down Expand Up @@ -901,7 +901,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetAll
public struct GetAll
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -947,7 +947,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetAllKeys
public struct GetAllKeys
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -991,7 +991,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct Listen
public struct Listen
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -1037,7 +1037,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetChannels
public struct GetChannels
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -1078,7 +1078,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetSize
public struct GetSize
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -1120,7 +1120,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetChannelSize
public struct GetChannelSize
{
mixin RequestBase;
mixin Channel; // channel(cstring) method
Expand Down Expand Up @@ -1155,7 +1155,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct RemoveChannel
public struct RemoveChannel
{
mixin RequestBase;
mixin Channel; // channel(cstring) method
Expand Down Expand Up @@ -1196,7 +1196,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetNumConnections
public struct GetNumConnections
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -1240,7 +1240,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetVersion
public struct GetVersion
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down Expand Up @@ -1282,7 +1282,7 @@ public class DhtClient : IClient
***************************************************************************/

private struct GetResponsibleRange
public struct GetResponsibleRange
{
mixin RequestBase;
mixin IODelegate; // io(T) method
Expand Down
5 changes: 1 addition & 4 deletions src/dhtproto/client/legacy/internal/RequestSetup.d
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ module dhtproto.client.legacy.internal.RequestSetup;

public import swarm.client.RequestSetup;

static import swarm.util.Hash;



/*******************************************************************************
Mixin for the methods use by dht client requests which have an I/O delegate.
Expand Down Expand Up @@ -184,6 +180,7 @@ public template Key ( )
{
import ocean.transition;
import ocean.core.TypeConvert : downcast;
static import swarm.util.Hash;

mixin TypeofThis;
static assert (is(This == struct));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import swarm.client.request.GetChannelSizeRequest;
import swarm.client.request.GetSizeRequest;
import swarm.client.request.RemoveChannelRequest;

import dhtproto.client.legacy.internal.request.model.IDhtRequestResources;
import dhtproto.client.legacy.internal.request.GetVersionRequest;
import dhtproto.client.legacy.internal.request.GetResponsibleRangeRequest;
import dhtproto.client.legacy.internal.request.GetRequest;
Expand All @@ -70,23 +71,23 @@ import dhtproto.client.legacy.DhtConst;
*******************************************************************************/

private alias GetChannelsRequestTemplate!(IRequest,
IRequest.IDhtRequestResources, DhtConst.Command.E.GetChannels)
IDhtRequestResources, DhtConst.Command.E.GetChannels)
GetChannelsRequest;

private alias GetNumConnectionsRequestTemplate!(IRequest,
IRequest.IDhtRequestResources, DhtConst.Command.E.GetNumConnections)
IDhtRequestResources, DhtConst.Command.E.GetNumConnections)
GetNumConnectionsRequest;

private alias GetChannelSizeRequestTemplate!(IChannelRequest,
IRequest.IDhtRequestResources, DhtConst.Command.E.GetChannelSize)
IDhtRequestResources, DhtConst.Command.E.GetChannelSize)
GetChannelSizeRequest;

private alias GetSizeRequestTemplate!(IRequest,
IRequest.IDhtRequestResources, DhtConst.Command.E.GetSize)
IDhtRequestResources, DhtConst.Command.E.GetSize)
GetSizeRequest;

private alias RemoveChannelRequestTemplate!(IChannelRequest,
IRequest.IDhtRequestResources, DhtConst.Command.E.RemoveChannel)
IDhtRequestResources, DhtConst.Command.E.RemoveChannel)
RemoveChannelRequest;


Expand Down
3 changes: 2 additions & 1 deletion src/fakedht/request/Listen.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module fakedht.request.Listen;
import ocean.transition;
import ocean.util.log.Logger;

import swarm.util.Hash;
import Protocol = dhtproto.node.request.Listen;
import fakedht.Storage; // DhtListener

Expand Down Expand Up @@ -142,7 +143,7 @@ public scope class Listen : Protocol.Listen, DhtListener
override protected bool getNextRecord( cstring channel_name, mstring key,
out Const!(void)[] value )
{
assert (key.length == Hash.HashDigits);
assert (key.length == HashDigits);

if (this.remaining_keys.length == 0)
return false;
Expand Down
2 changes: 2 additions & 0 deletions src/turtle/env/Dht.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import ocean.task.Scheduler;
import ocean.task.util.Timer;
import ocean.text.convert.Formatter;

import swarm.Const : NodeItem;

/*******************************************************************************
Aliases to exceptions thrown on illegal operations with dht storage
Expand Down

0 comments on commit fec1b3f

Please sign in to comment.