mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
Merge branch 'lf/fix-watch-ack'
This commit is contained in:
commit
6e6f5665ee
@ -114,6 +114,15 @@
|
|||||||
state-3
|
state-3
|
||||||
state-4
|
state-4
|
||||||
==
|
==
|
||||||
|
:: +diplomatic: only renegotiate if versions changed
|
||||||
|
::
|
||||||
|
:: If %.n please leave note as to why renegotiation necessary
|
||||||
|
::
|
||||||
|
:: - Fixing incorrectly held unversioned subscriptions
|
||||||
|
::
|
||||||
|
++ diplomatic
|
||||||
|
^- ?
|
||||||
|
%.n
|
||||||
::
|
::
|
||||||
++ default
|
++ default
|
||||||
|* [pull-hook=* =config]
|
|* [pull-hook=* =config]
|
||||||
@ -239,6 +248,7 @@
|
|||||||
=/ kick=(list card)
|
=/ kick=(list card)
|
||||||
?: ?& =(min-version.config prev-min-version.old)
|
?: ?& =(min-version.config prev-min-version.old)
|
||||||
=(version.config prev-version.old)
|
=(version.config prev-version.old)
|
||||||
|
diplomatic
|
||||||
==
|
==
|
||||||
~
|
~
|
||||||
(poke-self:pass kick+!>(%kick))^~
|
(poke-self:pass kick+!>(%kick))^~
|
||||||
@ -439,6 +449,7 @@
|
|||||||
?~ tan tr-core
|
?~ tan tr-core
|
||||||
?. versioned
|
?. versioned
|
||||||
(tr-ap-og:tr-cleanup |.((on-pull-nack:og rid u.tan)))
|
(tr-ap-og:tr-cleanup |.((on-pull-nack:og rid u.tan)))
|
||||||
|
%- (slog leaf+"versioned nack for {<rid>} in {<dap.bowl>}" u.tan)
|
||||||
=/ pax
|
=/ pax
|
||||||
(kick-mule:virt rid |.((on-pull-kick:og rid)))
|
(kick-mule:virt rid |.((on-pull-kick:og rid)))
|
||||||
?~ pax tr-failed-kick
|
?~ pax tr-failed-kick
|
||||||
@ -463,18 +474,18 @@
|
|||||||
:: subscription
|
:: subscription
|
||||||
tr-core
|
tr-core
|
||||||
(tr-suspend-pub-ver min-version.config)
|
(tr-suspend-pub-ver min-version.config)
|
||||||
=/ =vase
|
=/ =^cage
|
||||||
(convert-to:ver cage)
|
(convert-to:ver cage)
|
||||||
=/ =wire
|
=/ =wire
|
||||||
(make-wire /store)
|
(make-wire /store)
|
||||||
=+ resources=(~(gas in *(set resource)) (resource-for-update:og vase))
|
=+ resources=(~(gas in *(set resource)) (resource-for-update:og q.cage))
|
||||||
?> ?| no-validate.config
|
?> ?| no-validate.config
|
||||||
?& (check-src resources)
|
?& (check-src resources)
|
||||||
(~(has in resources) rid)
|
(~(has in resources) rid)
|
||||||
== ==
|
== ==
|
||||||
=/ =mark
|
=/ =mark
|
||||||
(append-version:ver version.config)
|
(append-version:ver version.config)
|
||||||
(tr-emit (~(poke-our pass wire) store-name.config mark vase))
|
(tr-emit (~(poke-our pass wire) store-name.config cage))
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ tr-kick
|
++ tr-kick
|
||||||
|
@ -73,6 +73,16 @@
|
|||||||
state-1
|
state-1
|
||||||
state-2
|
state-2
|
||||||
==
|
==
|
||||||
|
:: +diplomatic: only renegotiate if versions changed
|
||||||
|
::
|
||||||
|
:: If %.n please leave note as to why renegotiation necessary
|
||||||
|
::
|
||||||
|
:: - Fixing incorrectly held unversioned subscriptions
|
||||||
|
::
|
||||||
|
++ diplomatic
|
||||||
|
^- ?
|
||||||
|
%.n
|
||||||
|
::
|
||||||
++ push-hook
|
++ push-hook
|
||||||
|* =config
|
|* =config
|
||||||
$_ ^|
|
$_ ^|
|
||||||
@ -221,6 +231,7 @@
|
|||||||
|= [prev-min-version=@ud prev-version=@ud]
|
|= [prev-min-version=@ud prev-version=@ud]
|
||||||
?: ?& =(min-version.config prev-min-version)
|
?: ?& =(min-version.config prev-min-version)
|
||||||
=(prev-version version.config)
|
=(prev-version version.config)
|
||||||
|
diplomatic
|
||||||
==
|
==
|
||||||
:: bail on kick if we didn't change versions
|
:: bail on kick if we didn't change versions
|
||||||
~
|
~
|
||||||
@ -291,23 +302,21 @@
|
|||||||
?. (supported:ver mark)
|
?. (supported:ver mark)
|
||||||
:_ this
|
:_ this
|
||||||
(fact-init-kick:io version+!>(min-version.config))
|
(fact-init-kick:io version+!>(min-version.config))
|
||||||
=/ =vase
|
|
||||||
(convert-to:ver mark (initial-watch:og t.t.t.t.t.t.path resource))
|
|
||||||
:_ this
|
:_ this
|
||||||
[%give %fact ~ mark vase]~
|
=- [%give %fact ~ -]~
|
||||||
|
(convert-to:ver mark (initial-watch:og t.t.t.t.t.t.path resource))
|
||||||
::
|
::
|
||||||
++ unversioned
|
++ unversioned
|
||||||
?> ?=([%ship @ @ *] t.path)
|
?> ?=([%ship @ @ *] t.path)
|
||||||
?. =(min-version.config 0)
|
|
||||||
~& >>> "unversioned req from: {<src.bowl>}, nooping"
|
|
||||||
`this
|
|
||||||
=/ =resource
|
=/ =resource
|
||||||
(de-path:resource t.path)
|
(de-path:resource t.path)
|
||||||
=/ =vase
|
=/ =vase
|
||||||
%+ convert-to:ver update-mark.config
|
|
||||||
(initial-watch:og t.t.t.t.path resource)
|
(initial-watch:og t.t.t.t.path resource)
|
||||||
:_ this
|
:_ this
|
||||||
[%give %fact ~ update-mark.config vase]~
|
?. =(min-version.config 0)
|
||||||
|
~& >>> "unversioned req from: {<src.bowl>}, nooping"
|
||||||
|
~
|
||||||
|
[%give %fact ~ (convert-to:ver update-mark.config vase)]~
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ on-agent
|
++ on-agent
|
||||||
@ -461,10 +470,7 @@
|
|||||||
|= [fact-ver=@ud paths=(set path)]
|
|= [fact-ver=@ud paths=(set path)]
|
||||||
=/ =mark
|
=/ =mark
|
||||||
(append-version:ver fact-ver)
|
(append-version:ver fact-ver)
|
||||||
=/ =^cage
|
(fact:io (convert-from:ver mark q.cage) ~(tap in paths))
|
||||||
:- mark
|
|
||||||
(convert-from:ver mark q.cage)
|
|
||||||
(fact:io cage ~(tap in paths))
|
|
||||||
:: TODO: deprecate
|
:: TODO: deprecate
|
||||||
++ unversioned
|
++ unversioned
|
||||||
?. =(min-version.config 0) ~
|
?. =(min-version.config 0) ~
|
||||||
@ -474,18 +480,15 @@
|
|||||||
%- ~(gas in *(set path))
|
%- ~(gas in *(set path))
|
||||||
(turn (incoming-subscriptions prefix) tail)
|
(turn (incoming-subscriptions prefix) tail)
|
||||||
?: =(0 ~(wyt in unversioned)) ~
|
?: =(0 ~(wyt in unversioned)) ~
|
||||||
=/ =^cage
|
(fact:io (convert-from:ver update-mark.config q.cage) ~(tap in unversioned))^~
|
||||||
:- update-mark.config
|
|
||||||
(convert-from:ver update-mark.config q.cage)
|
|
||||||
(fact:io cage ~(tap in unversioned))^~
|
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ forward-update
|
++ forward-update
|
||||||
|= =cage
|
|= =cage
|
||||||
^- (list card:agent:gall)
|
^- (list card:agent:gall)
|
||||||
=- lis
|
=- lis
|
||||||
=/ vas
|
=/ vas=vase
|
||||||
(convert-to:ver cage)
|
q:(convert-to:ver cage)
|
||||||
%+ roll (resource-for-update q.cage)
|
%+ roll (resource-for-update q.cage)
|
||||||
|= [rid=resource [lis=(list card:agent:gall) tf-vas=(unit vase)]]
|
|= [rid=resource [lis=(list card:agent:gall) tf-vas=(unit vase)]]
|
||||||
^- [(list card:agent:gall) (unit vase)]
|
^- [(list card:agent:gall) (unit vase)]
|
||||||
|
@ -29,11 +29,12 @@
|
|||||||
&((gte ver min) (lte ver version))
|
&((gte ver min) (lte ver version))
|
||||||
::
|
::
|
||||||
++ convert-to
|
++ convert-to
|
||||||
|= =cage
|
|= [=mark =vase]
|
||||||
^- vase
|
^- cage
|
||||||
?: =(p.cage current-version)
|
:- current-version
|
||||||
q.cage
|
?: =(mark current-version)
|
||||||
((tube-to p.cage) q.cage)
|
vase
|
||||||
|
((tube-to mark) vase)
|
||||||
::
|
::
|
||||||
++ tube-to
|
++ tube-to
|
||||||
|= =mark
|
|= =mark
|
||||||
@ -44,10 +45,11 @@
|
|||||||
.^(tube:clay %cc (scry:io %home /[current-version]/[mark]))
|
.^(tube:clay %cc (scry:io %home /[current-version]/[mark]))
|
||||||
::
|
::
|
||||||
++ convert-from
|
++ convert-from
|
||||||
|= =cage
|
|= [=mark =vase]
|
||||||
^- vase
|
^- cage
|
||||||
?: =(p.cage current-version)
|
:- mark
|
||||||
q.cage
|
?: =(mark current-version)
|
||||||
((tube-from p.cage) q.cage)
|
vase
|
||||||
|
((tube-from mark) vase)
|
||||||
--
|
--
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user