From baf397117ee5fe9b0535835700aaf1e9a355dcaf Mon Sep 17 00:00:00 2001 From: Juan Vanecek Date: Mon, 12 Aug 2024 13:05:32 -0300 Subject: [PATCH] Move the fixed #flush implementation to an extension loaded only on Pharo < 12 versions --- .../SocketStream.extension.st} | 11 +++------- .../Ansible-Pharo-Pending-Patches/package.st | 1 + .../AmqpConnection.class.st | 22 ++++++++++--------- .../BaselineOfAnsible.class.st | 8 ++++++- 4 files changed, 23 insertions(+), 19 deletions(-) rename source/{Ansible-Protocol-Core/AmqpSocketStream.class.st => Ansible-Pharo-Pending-Patches/SocketStream.extension.st} (68%) create mode 100644 source/Ansible-Pharo-Pending-Patches/package.st diff --git a/source/Ansible-Protocol-Core/AmqpSocketStream.class.st b/source/Ansible-Pharo-Pending-Patches/SocketStream.extension.st similarity index 68% rename from source/Ansible-Protocol-Core/AmqpSocketStream.class.st rename to source/Ansible-Pharo-Pending-Patches/SocketStream.extension.st index 14819b8c..0c766a44 100644 --- a/source/Ansible-Protocol-Core/AmqpSocketStream.class.st +++ b/source/Ansible-Pharo-Pending-Patches/SocketStream.extension.st @@ -1,12 +1,7 @@ -Class { - #name : 'AmqpSocketStream', - #superclass : 'SocketStream', - #category : 'Ansible-Protocol-Core', - #package : 'Ansible-Protocol-Core' -} +Extension { #name : 'SocketStream' } -{ #category : 'control' } -AmqpSocketStream >> flush [ +{ #category : '*Ansible-Pharo-Pending-Patches' } +SocketStream >> flush [ "If the other end is connected and we have something to send, then we send it and reset the outBuffer. If the other end is closed and we are signaling errors, do so." diff --git a/source/Ansible-Pharo-Pending-Patches/package.st b/source/Ansible-Pharo-Pending-Patches/package.st new file mode 100644 index 00000000..eab03e43 --- /dev/null +++ b/source/Ansible-Pharo-Pending-Patches/package.st @@ -0,0 +1 @@ +Package { #name : 'Ansible-Pharo-Pending-Patches' } diff --git a/source/Ansible-Protocol-Core/AmqpConnection.class.st b/source/Ansible-Protocol-Core/AmqpConnection.class.st index 29899a54..c9b828ab 100644 --- a/source/Ansible-Protocol-Core/AmqpConnection.class.st +++ b/source/Ansible-Protocol-Core/AmqpConnection.class.st @@ -268,18 +268,20 @@ AmqpConnection >> nextFrame [ { #category : 'opening' } AmqpConnection >> open [ - codec := AmqpCodec on: ( ( AmqpSocketStream on: socket ) - noTimeout; - binary; - yourself ). + codec := AmqpCodec + on: + ((SocketStream on: socket) + noTimeout; + binary; + yourself). - self - sendProtocolHeader; - startConnection; - tuneConnection; - openConnection. + self + sendProtocolHeader; + startConnection; + tuneConnection; + openConnection. - heartbeatSender startBeatingEvery: parameters heartbeat + heartbeatSender startBeatingEvery: parameters heartbeat ] { #category : 'private-opening' } diff --git a/source/BaselineOfAnsible/BaselineOfAnsible.class.st b/source/BaselineOfAnsible/BaselineOfAnsible.class.st index 5c4779a6..e87c9c39 100644 --- a/source/BaselineOfAnsible/BaselineOfAnsible.class.st +++ b/source/BaselineOfAnsible/BaselineOfAnsible.class.st @@ -55,7 +55,13 @@ BaselineOfAnsible >> setUpDependencies: spec [ { #category : 'baselines' } BaselineOfAnsible >> setUpDeploymentPackages: spec [ - + + spec + for: #('pharo7.x' 'pharo8.x' 'pharo9.x' 'pharo10.x' 'pharo11.x') + do: [ spec + package: 'Ansible-Pharo-Pending-Patches'; + group: 'RabbitMQ' with: 'Ansible-Pharo-Pending-Patches' ]. + spec package: 'Ansible-Protocol-Core'; group: 'Deployment-08' with: 'Ansible-Protocol-Core';