Releases: sociomantic-tsunami/swarm
v6.1.0: Compatibility fixes for upstream compilers
This release clears up deprecations triggered by upstream compilers up to v2.093.1,
the most recent at the time of this release, deprecations triggered by Ocean v5.4.0,
and cleared up the code from the D2 transition.
New features
Added swarm.neo.connection.RequestOnConnBase : RequestOnConnBase.Payload.addPointer
swarm.neo.connection.RequestOnConnBase
This function was added as a possible future replacement of the less secure add
function.
Since add
takes its argument by ref, it would trigger a deprecation with recent compilers.
add
has been fixed to forward to addPointer
and will now longer issue deprecations.
Bug fixed
Fix synchronization for RecordStream
src/swarm/util/RecordStream.d
The stream must be only suspended if the method suspend has been currently
called.
This is required since ISuspendableThrottler (from ocean v5) ensures that
the suspend state of an ISuspendable instance when added to a throttler is
consistent with the throttler state.
Without this patch-fix if a RecordStream is added as suspendable to
a throttler then it will try to process the stream because suspended()
was checking for the running state of the fiber and that would make an
application crash in the best case or having unexpected behaviour.
To avoid this situation the suspended()
implementation now only
checks if the stream is suspended meaning that suspend() has been
currently called.
Deprecated features
Deprecated function swarm.neo.util.Util : appendSlices
swarm.neo.util.Util
This function isn't used by any of the *proto or *node.
It does an unsafe operation (appending the length to a buffer)
which shouldn't work and triggers a deprecation with recent compilers.
Deprecated shell module swarm.util.Verify
swarm.util.Verify
This module was publicly importing ocean.core.Verify
for any user
that used ocean >= 3.4.
Replace the swarm
import with a direct import to ocean.core.Verify
.
v6.0.2
https://github.com/sociomantic-tsunami/swarm/milestone/66
Issues Fixed
Fix synchronization for RecordStream
src/swarm/util/RecordStream.d
The stream must be only suspended if the method suspend has been currently called.
This is required since ISuspendableThrottler (from ocean v5) ensures that the suspend state of an ISuspendable instance when added to a throttler is consistent with the throttler state.
Without this patch-fix if a RecordStream is added as suspendable to a throttler then it will try to process the stream because suspended()
was checking for the running state of the fiber and that would make an application crash in the best case or having unexpected behaviour.
To avoid this situation the suspended()
implementation now only checks if the stream is suspended meaning that suspend() has been currently called.
v6.0.1
https://github.com/sociomantic-tsunami/swarm/milestone/65?closed=1
- Remove use of deprecated FieldName template #403
v6.0.0
https://github.com/sociomantic-tsunami/swarm/milestone/37?closed=1
Migration Instructions
Module swarm.neo.util.AcquiredResources
has been removed
swarm.neo.util.AcquiredResources
Please use ocean.util.container.pool.AcquiredResources
instead.
Module swarm.neo.util.ByteCountHistogram
has been removed
swarm.neo.util.ByteCountHistogram
Please use ocean.math.BinaryHistogram
instead.
swarm.neo.node.IRequestHandler
is replaced by swarm.neo.node.IRequest
swarm.neo.node.IRequestHandler
, swarm.neo.node.IRequest
swarm.neo.node.IRequestHandler
module has been renamed to
swarm.neo.node.IRequest
, and contains only the IRequest
interface now,
since the IRequestHandler
interface has been removed post deprecation.
UseNodeDg
delegate alias now returns RequestOnConn.NodeState
swarm.neo.client.RequestHandlers
, swarm.neo.client.RequestOnConn
Previously, the swarm.neo.client.RequestHandlers.UseNodeDg
delegate signature
had bool
as its return type, which indicated success or failure of connection
to a node, without specifying the failure reason.
This delegate signature now has RequestOnConn.NodeState
as its return type,
which is an enumerated state, indicating success, or failure, specifying if the
failure happened for the said node being absent or due to a connection failure.
EventDispatcher.receive
passes received data as const(void)[]
The delegate parameter of the EventDispatcher.receive()
method now takes
an array of const values, instead of a const array.
Module swarm.neo.util.TimeHistogram
has been removed
swarm.neo.util.TimeHistogram
Please use ocean.math.TimeHistogram
instead.
Module swarm.neo.util.AcquiredResources
has been removed
swarm.neo.util.VoidBufferAsArrayOf
Please use ocean.util.container.VoidBufferAsArrayOf
instead.
EventDispatcher.shutdownWithProtocolError
now throws instead of returning
swarm.neo.connection.RequestOnConnBase
The method EventDispatcher.shutdownWithProtocolError
used to return an
exception with the expectation that the caller will throw it. The behaviour has
now changed such that EventDispatcher.shutdownWithProtocolError
throws this
exception directly. This simplifies usage of the method.
Deprecations
handlePending method deprecated
swarm.client.helper.SuspendableThrottler
The handlePending() was used to initiate a state-change. These state
changes are used in requests using the SuspendableRequestCore which is
superseded by the BatchRequestCore.
v6.0.0-rc.3
Fixes discovered in testing *proto repos.
v6.0.0-rc.2
Fixes discovered in testing dhtproto.
v6.0.0-rc.1
Migration Instructions
Module swarm.neo.util.AcquiredResources
has been removed
swarm.neo.util.AcquiredResources
Please use ocean.util.container.VoidBufferAsArrayOf
instead.
Module swarm.neo.util.ByteCountHistogram
has been removed
swarm.neo.util.ByteCountHistogram
Please use ocean.math.BinaryHistogram
instead.
swarm.neo.node.IRequestHandler
is replaced by swarm.neo.node.IRequest
swarm.neo.node.IRequestHandler
, swarm.neo.node.IRequest
swarm.neo.node.IRequestHandler
module has been renamed to
swarm.neo.node.IRequest
, and contains only the IRequest
interface now,
since the IRequestHandler
interface has been removed post deprecation.
UseNodeDg
delegate alias now returns RequestOnConn.NodeState
swarm.neo.client.RequestHandlers
, swarm.neo.client.RequestOnConn
Previously, the swarm.neo.client.RequestHandlers.UseNodeDg
delegate signature
had bool
as its return type, which indicated success or failure of connection
to a node, without specifying the failure reason.
This delegate signature now has RequestOnConn.NodeState
as its return type,
which is an enumerated state, indicating success, or failure, specifying if the
failure happened for the said node being absent or due to a connection failure.
EventDispatcher.receive
passes received data as const(void)[]
The delegate parameter of the EventDispatcher.receive()
method now takes
an array of const values, instead of a const array.
Module swarm.neo.util.TimeHistogram
has been removed
swarm.neo.util.TimeHistogram
Please use ocean.math.TimeHistogram
instead.
EventDispatcher.shutdownWithProtocolError
now throws instead of returning
swarm.neo.connection.RequestOnConnBase
The method EventDispatcher.shutdownWithProtocolError
used to return an
exception with the expectation that the caller will throw it. The behaviour has
now changed such that EventDispatcher.shutdownWithProtocolError
throws this
exception directly. This simplifies usage of the method.
Deprecations
handlePending method deprecated
swarm.client.helper.SuspendableThrottler
The handlePending() was used to initiate a state-change. These state
changes are used in requests using the SuspendableRequestCore which is
superseded by the BatchRequestCore.
v5.4.0 auto-converted to D2
v5.4.0
Deprecations
FieldSizeSum
template deprecated
swarm.neo.util.FieldSizeSum
The SizeofTuple
template in ocean.core.Traits
does the same thing.
Non-neo node base classes now deprecated
swarm.node.model.Node
, swarm.node.model.ChannelsNode
The neo-capable base classes in swarm.node.model.NeoNode
and
swarm.node.model.NeoChannelsNode
should be used instead.