mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 21:02:01 +03:00
Merge branch 'develop' into i/6303/eyre-verbose
This commit is contained in:
commit
cbc178ee76
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Blank Issue
|
||||
about: Other
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,8 +1,8 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Submit a Landscape issue
|
||||
url: https://github.com/urbit/landscape/issues/new/choose
|
||||
about: Issues with Landscape (Tlon's flagship client) should be filed at urbit/landscape. This includes groups, chats, collections, notebooks, and more.
|
||||
url: https://github.com/tloncorp/landscape-apps/issues/new/choose
|
||||
about: Issues with Landscape should be filed at tloncorp/landscape-apps. This includes Groups, Talk, and Landscape proper.
|
||||
- name: urbit-dev mailing list
|
||||
url: https://groups.google.com/a/urbit.org/g/dev
|
||||
about: Developer questions and discussions also take place on the urbit-dev mailing list.
|
||||
|
@ -72,20 +72,27 @@ release branch is cut from `develop` and the process begins again.
|
||||
|
||||
### Tagging
|
||||
|
||||
If it's a very trivial hotfix that you know isn't going to break anything, tag
|
||||
it as `urbit-os-vx.y`. Here 'x' is the major version and 'y' is an OTA patch
|
||||
counter.
|
||||
When we branch release to deploy to `~marnec`, we need to tag it as a release candidate (RC), like `urbit-os-vx.y-rc1`. Here 'x' is the major version and 'y' is an OTA patch counter. After this any change that goes into release gets a new tag that increments the rc.
|
||||
|
||||
Use an annotated tag, i.e.
|
||||
After we ship a release to the live network, add a tag that is not a release candidate, like `urbit-os-vx.y`, to the master branch, since that's what was released.
|
||||
|
||||
#### Applying the Tag Locally
|
||||
|
||||
Use an annotated tag with the `-a` git argument. Make sure to follow
|
||||
the naming convention for RCs and live releases, described above.
|
||||
|
||||
|
||||
To add a tag to the local repo, run this:
|
||||
|
||||
```
|
||||
git tag -a urbit-os-vx.y
|
||||
git tag -a <tagname>
|
||||
```
|
||||
|
||||
The tag format should look something like this:
|
||||
This will bring up an editor, where you should add the release notes,
|
||||
which should look like this:
|
||||
|
||||
```
|
||||
urbit-os-vx.y
|
||||
<tagname>
|
||||
|
||||
This release will be pushed to the network as an over-the-air update.
|
||||
|
||||
@ -98,9 +105,54 @@ Contributions:
|
||||
[..]
|
||||
```
|
||||
|
||||
You can get the "contributions" section by the shortlog between the last release
|
||||
and this release:
|
||||
To fill in the "contributions" section, copy in the shortlog between the last release and this release, obtained by running this command:
|
||||
|
||||
```
|
||||
git shortlog --no-merges LAST_RELEASE..
|
||||
```
|
||||
|
||||
#### Pushing the Tag to the Main Repo
|
||||
|
||||
Once you have added a tag, push it to the main repository using the
|
||||
following command:
|
||||
|
||||
```
|
||||
git push origin <tagname>
|
||||
```
|
||||
|
||||
## Releases
|
||||
|
||||
- [ ] Create a pull request from the relevant release branch (with the format `release/urbit-os-vX.XX`) to `master`.
|
||||
- [ ] ssh into `~zod`
|
||||
- [ ] Check to ensure that nobody else is ssh'd into `~zod`, by running `screen -ls` and verifying no sessions are attached.
|
||||
- [ ] Attach to the screen session using `screen -x`
|
||||
- [ ] Install the contents of the `%kids` desk on `~marnec-dozzod-marzod` into our `%base`: `|merge %base ~marnec-dozzod-marzod %kids, =gem %only-that`
|
||||
- [ ] Check that `~zod` has updated to the latest release. For a Kelvin release, you can run `zuse` in the Dojo. Each non-Kelvin release might its own way of checking whether the update has completed, possibly through checking the `%cz` hash of the `%base` desk matches the hash on `~marnec-dozzod-marzod` by comparing the outputs of `+vat %base` on both ships.
|
||||
- [ ] Merge `~zod`'s `%base` desk into its `%kids` desk to distribute the new code to the network: `|merge %kids our %base, =gem %only-that`
|
||||
- [ ] Before exiting the screen session on `~zod`, make sure the screen session is not left in copy mode for a long period of time, since that will disrupt `~zod`'s operation.
|
||||
|
||||
### Release Communications
|
||||
|
||||
- [ ] Tag the commit that went onto the live network as a release, using GitHub's "Releases" interface. See the "Tagging" section of this document for details.
|
||||
- [ ] Update (add a response) the mailing list post to include the base hash of the new release, and indicate that this has now been deployed to the network.
|
||||
- [ ] Tweet from the `@zodisok` Twitter account linking to the GitHub release.
|
||||
- [ ] Post links to the release in the Urbit Community Development channel and a channel in the UF public group.
|
||||
|
||||
### Post-Release Git Cleanup
|
||||
|
||||
- [ ] Merge `master` back into `develop`.
|
||||
- [ ] Cut a new release branch from `develop`. The branch should have the format `release/urbit-os-vX.XX`
|
||||
|
||||
### Post-Release Checks
|
||||
- [ ] Check that `~marzod` and other distribution stars are receiving the update by running `|ames-sift ~zod` and `|ames-verb %rcv %ges`. You should see lots of packets from `~zod`. Once you have confirmed packets are flowing, run `|ames-sift` and `|ames-verb` with no arguments to reset the verbosity state.
|
||||
- [ ] Check that planets are receiving the update. They should start updating within an hour or so.
|
||||
- [ ] Monitor the Urbit Community Help channel, UF public group channels, and Twitter to make
|
||||
|
||||
### Post-Release Artifacts
|
||||
After waiting at least 24 hours after the release to the network, make and distribute a pill.
|
||||
- [ ] Find a ship on the network (for now, use `~halbex-palheb`, which runs the UF public group) whose sources for `%base` and the standard app desks are mainline, not devstream.
|
||||
- [ ] Ensure the `%cz` hashes of all desks match those on the distribution ships.
|
||||
- [ ] Make a pill by running `.multi-vX-XX/pill +solid %base %garden %webterm %landscape %groups %talk` (replacing `X-XX` with the appropriate version numbers, in this and later steps).
|
||||
- [ ] Boot a fakezod off that pill to make sure the pill is viable.
|
||||
- [ ] Upload the pill to `bootstrap.urbit.org` using the Google Cloud SDK by running: `gsutil cp /path/to/pier/.urb/put/multi-vX-XX.pill gs://bootstrap.urbit.org/urbit-vX.XX.pill` -- note that it should be `vX.XX`, not `vX-XX` as in the original pill filename.
|
||||
- [ ] Boot a ship with the latest binary and check that it downloads the pill from `https://bootstrap.urbit.org/urbit-vX.XX.pill` where you just uploaded it.
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55f1bcccf861b3a2247aabb6ec3349829272ef8c36cfc8a16ff0930aac87a24d
|
||||
size 5748196
|
||||
oid sha256:2035ef65290065edbd99a86f9f5a36978617bc1983131fa474a9a5c0e91dc15d
|
||||
size 5998440
|
||||
|
@ -584,10 +584,11 @@
|
||||
~| [%no-next-domain idx=idx]
|
||||
(head (skim pending |=([turf idx=@ud ?] =(idx ^idx))))
|
||||
:: XX should confirm that :turf points to us
|
||||
:: confirms that domain exists (and an urbit is on :80)
|
||||
:: confirms that domain exists (and an urbit is on the standard port)
|
||||
::
|
||||
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
|
||||
=/ =purl
|
||||
:- [sec=| por=~ host=[%& turf.next]]
|
||||
:- [sec=sec por=~ host=[%& turf.next]]
|
||||
[[ext=~ path=/'~debug'] query=~]
|
||||
=/ =wire
|
||||
(acme-wire try %validate-domain /idx/(scot %ud idx.next))
|
||||
@ -754,9 +755,8 @@
|
||||
?> ?=(%wake sas.u.rod)
|
||||
=* aut u.active.aut.u.rod
|
||||
=/ pat=path /'.well-known'/acme-challenge/[tok.cal.aut]
|
||||
:: note: requires port 80, just as the ACME service will
|
||||
::
|
||||
=/ url=purl [[sec=| por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
|
||||
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
|
||||
=/ url=purl [[sec=sec por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
|
||||
:: =/ url=purl [[sec=| por=`8.081 hos=[%& /localhost]] [ext=~ pat] hed=~]
|
||||
:: XX idx in wire?
|
||||
::
|
||||
|
@ -709,7 +709,7 @@
|
||||
[%hint *] ?+ q.p.a $(a q.a)
|
||||
[%know *]
|
||||
?@ p.q.p.a [(cat 3 '#' mark.p.q.p.a)]~
|
||||
[(rap 3 '#' auth.p.q.p.a (spat type.p.q.p.a) ~)]~
|
||||
[(rap 3 '#' auth.p.q.p.a '+' (spat type.p.q.p.a) ~)]~
|
||||
::
|
||||
[%help *]
|
||||
[summary.crib.p.q.p.a]~
|
||||
|
@ -24,7 +24,7 @@
|
||||
rest=(list desk)
|
||||
==
|
||||
::
|
||||
~
|
||||
prime=_|
|
||||
==
|
||||
:- %pill
|
||||
^- pill:pill
|
||||
@ -39,50 +39,10 @@
|
||||
?~ arg %base
|
||||
?>(?=(@ base.arg) base.arg)
|
||||
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
||||
=/ bas=path
|
||||
(scag 3 sys)
|
||||
=/ dez=(list [desk path])
|
||||
?~ arg ~
|
||||
%+ turn rest.arg
|
||||
|= =desk
|
||||
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
||||
::
|
||||
:: compiler-source: hoon source file producing compiler, `sys/hoon`
|
||||
::
|
||||
=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
|
||||
::
|
||||
:: compiler-twig: compiler as hoon expression
|
||||
::
|
||||
~& %brass-parsing
|
||||
=+ compiler-twig=(rain /sys/hoon/hoon compiler-source)
|
||||
~& %brass-parsed
|
||||
::
|
||||
:: compiler-formula: compiler as nock formula
|
||||
::
|
||||
~& %brass-compiling
|
||||
=+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
|
||||
~& %brass-compiled
|
||||
::
|
||||
:: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
|
||||
::
|
||||
=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
|
||||
::
|
||||
:: boot-ova: startup events
|
||||
::
|
||||
=/ boot-ova=(list)
|
||||
:~ aeon:eden:part
|
||||
boot:eden:part
|
||||
compiler-formula
|
||||
compiler-source
|
||||
arvo-source
|
||||
==
|
||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||
::
|
||||
:+ %pill %brass
|
||||
:+ boot-ova
|
||||
:~ (boot-ovum:pill compiler-source arvo-source)
|
||||
(file-ovum2:pill bas)
|
||||
==
|
||||
%+ turn
|
||||
(snoc dez [%base bas])
|
||||
file-ovum:pill
|
||||
(brass:pill sys dez prime)
|
||||
|
28
pkg/arvo/gen/desk-requests.hoon
Normal file
28
pkg/arvo/gen/desk-requests.hoon
Normal file
@ -0,0 +1,28 @@
|
||||
:: +desk-requests: count pending requests for a desk
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[=desk ~]
|
||||
~
|
||||
==
|
||||
:- %tang
|
||||
^- tang
|
||||
=/ cul=(list [@p rave:clay])
|
||||
%~ tap in
|
||||
.^ (set [@p rave:clay])
|
||||
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
|
||||
==
|
||||
::
|
||||
=/ [loc=_cul inc=_cul]
|
||||
(skid cul |=([=@p rave:clay] =(p p.bec)))
|
||||
=/ syc=_cul
|
||||
=/ nex=@ud
|
||||
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
|
||||
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
|
||||
::
|
||||
%- flop
|
||||
:~ leaf+"total: {<(lent cul)>}"
|
||||
leaf+"- local: {<(lent loc)>}"
|
||||
leaf+"- incoming: {<(lent inc)>}"
|
||||
leaf+" - for next: {<(lent syc)>}"
|
||||
==
|
9
pkg/arvo/gen/hood/close-flows.hoon
Normal file
9
pkg/arvo/gen/hood/close-flows.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
:: |close-flows: corks all stale ames flows
|
||||
::
|
||||
:: It runs in dry mode by default, printing the flows that can be closed.
|
||||
:: To actually close the flows, run with |close-flows, =dry |
|
||||
::
|
||||
:- %say
|
||||
|= [^ arg=~ dry=?]
|
||||
::
|
||||
[%helm-kroc dry]
|
@ -17,60 +17,4 @@
|
||||
=/ sys=path
|
||||
?^ arg top.arg
|
||||
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
|
||||
=/ lib
|
||||
(welp (flop (tail (flop sys))) /lib)
|
||||
::
|
||||
|^ =/ ver
|
||||
=/ sub *(trap vase)
|
||||
=. sub (build-sys sub %hoon)
|
||||
=. sub (build-sys sub %arvo)
|
||||
=. sub (build-sys sub %lull)
|
||||
=. sub (build-sys sub %zuse)
|
||||
=. sub (build-lib sub & %ethereum)
|
||||
=. sub (build-lib sub & %azimuth)
|
||||
(build-lib sub | %vere)
|
||||
=/ nok !.
|
||||
=> *[ver=(trap vase) ~]
|
||||
!= q:$:ver
|
||||
ivory/[nok ver ~]
|
||||
::
|
||||
++ build-sys
|
||||
|= [sub=(trap vase) nam=term] ^- (trap vase)
|
||||
~> %slog.[0 leaf+"ivory: building /sys/{(trip nam)}"]
|
||||
(swat sub (rain /sys/[nam]/hoon .^(@t cx+(welp sys /[nam]/hoon))))
|
||||
::
|
||||
++ build-lib
|
||||
|= [sub=(trap vase) imp=? nam=term] ^- (trap vase)
|
||||
~> %slog.[0 leaf+"ivory: building /lib/{(trip nam)}"]
|
||||
=/ hun=hoon
|
||||
%+ mist /lib/[nam]/hoon
|
||||
.^(@t cx+(welp lib /[nam]/hoon))
|
||||
?. imp (swat sub hun)
|
||||
(swel sub [%ktts nam hun])
|
||||
:: +mist: +rain but skipping past ford runes
|
||||
::
|
||||
++ mist
|
||||
|= [bon=path txt=@]
|
||||
^- hoon
|
||||
=+ vas=vast
|
||||
~| bon
|
||||
%+ scan (trip txt)
|
||||
%- full
|
||||
=; fud
|
||||
(ifix [;~(plug gay fud) gay] tall:vas(wer bon))
|
||||
%- star
|
||||
;~ pose vul
|
||||
%+ ifix [fas (just `@`10)]
|
||||
(star ;~(less (just `@`10) next))
|
||||
==
|
||||
:: +swel: +swat but with +slop
|
||||
::
|
||||
++ swel
|
||||
|= [tap=(trap vase) gen=hoon]
|
||||
^- (trap vase)
|
||||
=/ gun (~(mint ut p:$:tap) %noun gen)
|
||||
=> [tap=tap gun=gun]
|
||||
|. ~+
|
||||
=/ pro q:$:tap
|
||||
[[%cell p.gun p:$:tap] [.*(pro q.gun) pro]]
|
||||
--
|
||||
(ivory:pill sys)
|
||||
|
@ -6,9 +6,15 @@
|
||||
:- %tang
|
||||
%- flop ^- tang
|
||||
=/ pax=path /(scot %p p.bec)/[desk]/(scot %da now)
|
||||
=+ .^([lal=@tas num=@ud] cx+(weld pax /sys/kelvin))
|
||||
=/ welt=(list [@tas @ud])
|
||||
=+ .^(=waft:clay cx+(weld pax /sys/kelvin))
|
||||
%+ sort ~(tap in (waft-to-wefts:clay waft))
|
||||
|= [a=weft b=weft]
|
||||
?: =(lal.a lal.b)
|
||||
(lte num.a num.b)
|
||||
(lte lal.a lal.b)
|
||||
:~ '/sys/kelvin:'
|
||||
leaf/"[{<lal>} {<num>}]"
|
||||
(sell !>(welt))
|
||||
'/desk/bill:'
|
||||
(sell !>(.^((list dude:gall) cx+(weld pax /desk/bill))))
|
||||
==
|
||||
|
@ -28,12 +28,10 @@
|
||||
==
|
||||
::
|
||||
dub=_|
|
||||
prime=_|
|
||||
==
|
||||
:- %pill
|
||||
^- pill:pill
|
||||
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||
:: bas: root path to boot system' desk
|
||||
:: dez: secondary desks and their root paths
|
||||
::
|
||||
=/ sys=path
|
||||
?: ?=([^ *] arg)
|
||||
@ -42,84 +40,10 @@
|
||||
?~ arg %base
|
||||
?>(?=(@ base.arg) base.arg)
|
||||
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
||||
=/ bas=path
|
||||
(scag 3 sys)
|
||||
=/ dez=(list [desk path])
|
||||
?~ arg ~
|
||||
%+ turn rest.arg
|
||||
|= =desk
|
||||
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
||||
::
|
||||
=/ compiler-path (weld sys /hoon)
|
||||
=/ arvo-path (weld sys /arvo)
|
||||
~& %solid-start
|
||||
=/ compiler-src .^(@t %cx (weld compiler-path /hoon))
|
||||
=/ arvo-src .^(@t %cx (weld arvo-path /hoon))
|
||||
=/ arvo-formula
|
||||
~& %solid-loaded
|
||||
=/ compiler-hoon (rain compiler-path compiler-src)
|
||||
?. dub
|
||||
:: compile arvo against hoon, with our current compiler
|
||||
::
|
||||
=/ whole-hoon=hoon
|
||||
[%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
|
||||
~& %solid-parsed
|
||||
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
|
||||
~& %solid-arvo
|
||||
whole-formula
|
||||
:: compile arvo against hoon, with a freshly compiled hoon (via +ride)
|
||||
::
|
||||
~& %solid-parsed
|
||||
=/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
|
||||
~& %solid-compiled
|
||||
=/ whole-src
|
||||
(rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
|
||||
~& %solid-double-loaded
|
||||
=/ whole-formula
|
||||
=< +
|
||||
.* [%noun whole-src]
|
||||
[%8 compiler-formula [%9 2 %10 [6 %0 3] [%0 2]]]
|
||||
~& %solid-double-compiled
|
||||
whole-formula
|
||||
::
|
||||
~& [%solid-kernel `@ux`(mug arvo-formula)]
|
||||
::
|
||||
:: installed: Arvo gate (formal interface) with %zuse and vanes installed
|
||||
::
|
||||
=/ installed
|
||||
=< q
|
||||
%^ spin
|
||||
^- (list ovum)
|
||||
:- (boot-ovum:pill compiler-src arvo-src)
|
||||
%+ turn
|
||||
(snoc (turn dez tail) bas)
|
||||
file-ovum2:pill
|
||||
.*(0 arvo-formula)
|
||||
|= [ovo=ovum ken=*]
|
||||
[~ (slum ken [now ovo])]
|
||||
::
|
||||
:: boot-two: startup formula
|
||||
::
|
||||
:: We evaluate :arvo-formula (for jet registration),
|
||||
:: then ignore the result and produce .installed
|
||||
::
|
||||
=/ boot-two
|
||||
=> *[arvo-formula=^ installed=^ tale=*]
|
||||
!= =+(.*(0 arvo-formula) [installed tale])
|
||||
::
|
||||
:: boot-ova
|
||||
::
|
||||
=/ boot-ova=(list)
|
||||
[aeon:eden:part boot-two arvo-formula installed ~]
|
||||
::
|
||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||
::
|
||||
:: Our kernel event-list is ~, as we've already installed them.
|
||||
:: Our userspace event-list is a list containing a full %clay
|
||||
:: filesystem sync event.
|
||||
::
|
||||
:+ %pill %solid
|
||||
:+ boot-ova ~
|
||||
%+ turn
|
||||
(snoc dez [%base bas])
|
||||
file-ovum:pill
|
||||
(solid:pill sys dez dub now prime)
|
||||
|
141
pkg/arvo/gen/stale-flows.hoon
Normal file
141
pkg/arvo/gen/stale-flows.hoon
Normal file
@ -0,0 +1,141 @@
|
||||
:: +stale-flows: prints number of ames flows that can be closed
|
||||
::
|
||||
:: |stale-flows, =veb %1 :: flows from nacking initial subscriptions
|
||||
:: |stale-flows, =veb %2 :: stale flows that keep (re)trying to connect
|
||||
:: |stale-flows, =veb %21 :: ... per app (only forward)
|
||||
:: |stale-flows, =veb %3 :: stale resubscriptions
|
||||
::
|
||||
=> |%
|
||||
+$ subs (jar path [ship bone @])
|
||||
+$ pags (jar app=term [dst=term =ship =path]) :: per-agent
|
||||
+$ naks (set [ship bone])
|
||||
:: verbosity
|
||||
::
|
||||
+$ veb ?(%0 %1 %2 %21 %3 %31)
|
||||
::
|
||||
++ resubs
|
||||
|= [=subs =veb]
|
||||
^- @
|
||||
::=/ sorted
|
||||
:: %+ sort ~(tap by subs)
|
||||
:: |=([a=(list *) b=(list *)] (lte (lent a) (lent b)))
|
||||
%+ roll ~(tap by subs)::sorted
|
||||
|= [[k=path v=(list [ship bone @])] num=@]
|
||||
~? &(=(%3 veb) (gth (lent v) 1))
|
||||
"#{<(dec (lent v))>} stale resubs on {<k>}"
|
||||
?. (gth (lent v) 1) num
|
||||
(add (lent v) num)
|
||||
--
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ dry=? =veb]
|
||||
==
|
||||
::
|
||||
=/ peers-map
|
||||
.^((map ship ?(%alien %known)) %ax /(scot %p p.bec)//(scot %da now)/peers)
|
||||
::
|
||||
=/ peers=(list ship)
|
||||
%+ murn ~(tap by peers-map)
|
||||
|= [=ship val=?(%alien %known)]
|
||||
?: =(ship p.bec)
|
||||
~ :: this is weird, but we saw it
|
||||
?- val
|
||||
%alien ~
|
||||
%known (some ship)
|
||||
==
|
||||
::
|
||||
=; [[=subs =pags backward=@ forward=@] =naks]
|
||||
:- %tang %- flop
|
||||
%+ weld
|
||||
:~ leaf+"#{<~(wyt in naks)>} flows from %nacking %watches"
|
||||
leaf+"#{<backward>} backward flows with >10 retries"
|
||||
leaf+"#{<forward>} forward flows with >10 retries"
|
||||
leaf+"#{<(resubs subs veb)>} stale resubscriptions"
|
||||
==
|
||||
?. =(%21 veb) ~
|
||||
:- leaf+"----------------------------------"
|
||||
%+ turn %+ sort ~(tap by pags)
|
||||
|= [[* v=(list)] [* w=(list)]]
|
||||
(gth (lent v) (lent w))
|
||||
|= [app=term v=(list [dst=term =ship =path])]
|
||||
:- %leaf
|
||||
%+ weld "#{<(lent v)>} flows for {<app>} with >10 retries"
|
||||
?. =(1 (lent v)) ~
|
||||
?> ?=(^ v)
|
||||
" on {<ship.i.v>} to {<dst.i.v>} at {<path.i.v>}"
|
||||
::
|
||||
%+ roll peers
|
||||
|= [=ship [=subs p=pags b=@ f=@] n=naks]
|
||||
=+ .^ =ship-state:ames
|
||||
%ax /(scot %p p.bec)//(scot %da now)/peers/(scot %p ship)
|
||||
==
|
||||
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
|
||||
::
|
||||
|^ [stale nacks]
|
||||
::
|
||||
++ stale
|
||||
%+ roll ~(tap by snd.peer-state)
|
||||
|= [[=bone message-pump-state:ames] subs=_subs pags=_p backward=_b forward=_f]
|
||||
=, packet-pump-state
|
||||
:- ?~ duct=(~(get by by-bone.ossuary.peer-state) bone) subs
|
||||
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||
subs
|
||||
=/ =wire i.t.u.duct
|
||||
=/ nonce=(unit @) (rush i.t.t.t.t.t.t.t.i.t.u.duct dem)
|
||||
%- ~(add ja subs)
|
||||
:_ [ship bone ?~(nonce 0 u.nonce)] :: 0, 1?
|
||||
?~ nonce wire
|
||||
:: don't include the sub-nonce in the key
|
||||
::
|
||||
(weld (scag 7 wire) (slag 8 wire))
|
||||
%+ roll ~(tap in live)
|
||||
|= [[* [packet-state:ames *]] pags=_pags out=[b=_backward f=_forward]]
|
||||
::
|
||||
:: only forward flows
|
||||
::
|
||||
=? pags &(=(0 (end 0 bone)) (gth retries 10))
|
||||
?~ duct=(~(get by by-bone.ossuary.peer-state) bone)
|
||||
pags
|
||||
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||
pags
|
||||
=/ =wire i.t.u.duct
|
||||
(~(add ja pags) (snag 2 wire) (snag 8 wire) ship (slag 9 wire))
|
||||
::
|
||||
~? &(=(%2 veb) (gth retries 10))
|
||||
=+ arrow=?:(=(0 (end 0 bone)) "<-" "->")
|
||||
"{arrow} ({(cite:title ship)}) bone #{<bone>}, retries: #{<retries>}"
|
||||
:- pags
|
||||
=? out (gth retries 10)
|
||||
?: =(0 (end 0 bone))
|
||||
[b.out +(f.out)]
|
||||
[+(b.out) f.out]
|
||||
out
|
||||
::
|
||||
++ nacks
|
||||
%+ roll ~(tap by rcv.peer-state)
|
||||
|= [[=bone *] nacks=_n]
|
||||
?. &(=(0 (end 0 bone)) =(1 (end 0 (rsh 0 bone))))
|
||||
:: not a naxplanation ack bone
|
||||
::
|
||||
nacks
|
||||
:: by only corking forward flows that have received
|
||||
:: a nack we avoid corking the current subscription
|
||||
::
|
||||
=+ target=(mix 0b10 bone)
|
||||
:: make sure that the nack bone has a forward flow
|
||||
::
|
||||
?~ duct=(~(get by by-bone.ossuary.peer-state) target)
|
||||
nacks
|
||||
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||
nacks
|
||||
=/ =wire i.t.u.duct
|
||||
?> ?=([%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] wire)
|
||||
=/ app=term i.t.t.wire
|
||||
=/ nonce=@
|
||||
=- ?~(- 0 u.-)
|
||||
(rush i.t.t.t.t.t.t.t.wire dem)
|
||||
=/ =path t.t.t.t.t.t.t.t.wire
|
||||
~? =(%1 veb) "[bone={<target>} nonce={<nonce>} agent={<app>}] {<path>}"
|
||||
(~(put in nacks) [ship target])
|
||||
--
|
@ -36,7 +36,7 @@
|
||||
;< ~ bind:m (backoff:strandio try ~h1)
|
||||
;< rep=(unit httr:eyre) bind:m (hiss-request:strandio hiss)
|
||||
?: ?& ?=(^ rep)
|
||||
|(=(200 p.u.rep) =(307 p.u.rep))
|
||||
|(=(200 p.u.rep) =(307 p.u.rep) =(301 p.u.rep))
|
||||
==
|
||||
(pure:m &)
|
||||
?. ?| ?=(~ rep)
|
||||
|
@ -1,4 +1,3 @@
|
||||
/+ pill
|
||||
=* card card:agent:gall
|
||||
|%
|
||||
+$ state state-2
|
||||
@ -246,6 +245,10 @@
|
||||
|= ~ =< abet
|
||||
(emit %pass /helm %arvo %a %stir '')
|
||||
::
|
||||
++ poke-kroc
|
||||
|= dry=? =< abet
|
||||
(emit [%pass /helm/kroc %arvo %a %kroc dry])
|
||||
::
|
||||
++ poke-knob
|
||||
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
|
||||
(emit %pass /helm %arvo %d %knob error-tag level)
|
||||
@ -281,6 +284,7 @@
|
||||
%helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift)
|
||||
%helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb)
|
||||
%helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake)
|
||||
%helm-kroc =;(f (f !<(_+<.f vase)) poke-kroc)
|
||||
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
|
||||
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
|
||||
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)
|
||||
|
@ -1155,11 +1155,18 @@
|
||||
::
|
||||
~> %slog.(fmt "finished downloading update for {here}")
|
||||
=. let +(let)
|
||||
:: If nothing changed, just advance
|
||||
:: If nothing changed, just ensure %kids is up-to-date and advance
|
||||
::
|
||||
?. (get-remote-diff our syd now [her sud (dec let)])
|
||||
~> %slog.(fmt "remote is identical to {here}, skipping")
|
||||
next
|
||||
=< next
|
||||
?~ kid
|
||||
~> %slog.(fmt "remote is identical to {here}, skipping")
|
||||
..abet
|
||||
?. (get-remote-diff our u.kid now [her sud (dec let)])
|
||||
~> %slog.(fmt "remote is identical to {here}, skipping")
|
||||
..abet
|
||||
~> %slog.(fmt "remote is identical to {here}, merging into {<u.kid>}")
|
||||
(merg /kids u.kid)
|
||||
:: Else start merging, but also immediately start listening to
|
||||
:: the next revision. Now, all errors should no-op -- we're
|
||||
:: already waiting for the next revision.
|
||||
@ -1186,7 +1193,7 @@
|
||||
::
|
||||
?~ kid
|
||||
..abet
|
||||
~> %slog.(fmt "kids merge into {<kid>}")
|
||||
~> %slog.(fmt "kids merge into {<u.kid>}")
|
||||
(merg /kids u.kid)
|
||||
::
|
||||
%kids
|
||||
|
@ -352,6 +352,7 @@
|
||||
:: %heed: track peer's responsiveness; gives %clog if slow
|
||||
:: %jilt: stop tracking peer's responsiveness
|
||||
:: %cork: request to delete message flow
|
||||
:: %kroc: request to delete stale message flows
|
||||
:: %plea: request to send message
|
||||
::
|
||||
:: System and Lifecycle Tasks
|
||||
@ -370,6 +371,7 @@
|
||||
[%heed =ship]
|
||||
[%jilt =ship]
|
||||
[%cork =ship]
|
||||
[%kroc dry=?]
|
||||
$>(%plea vane-task)
|
||||
::
|
||||
$>(%born vane-task)
|
||||
@ -436,7 +438,7 @@
|
||||
+$ address @uxaddress
|
||||
:: $verb: verbosity flag for ames
|
||||
::
|
||||
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot)
|
||||
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot %kay)
|
||||
:: $blob: raw atom to or from unix, representing a packet
|
||||
::
|
||||
+$ blob @uxblob
|
||||
@ -786,6 +788,7 @@
|
||||
[%park des=desk yok=yoki ran=rang] :: synchronous commit
|
||||
[%perm des=desk pax=path rit=rite] :: change permissions
|
||||
[%pork ~] :: resume commit
|
||||
[%prep lat=(map lobe page)] :: prime clay store
|
||||
[%rein des=desk ren=rein] :: extra apps
|
||||
[%stir arg=*] :: debug
|
||||
[%tire p=(unit ~)] :: app state subscribe
|
||||
@ -885,6 +888,17 @@
|
||||
+$ norm (axal ?) :: tombstone policy
|
||||
+$ open $-(path vase) :: get prelude
|
||||
+$ page ^page :: export for compat
|
||||
+$ pour :: ford build w/content
|
||||
$% [%file =path]
|
||||
[%nave =mark]
|
||||
[%dais =mark]
|
||||
[%cast =mars]
|
||||
[%tube =mars]
|
||||
:: leafs
|
||||
::
|
||||
[%vale =path =lobe]
|
||||
[%arch =path =(map path lobe)]
|
||||
==
|
||||
+$ rang :: repository
|
||||
$: hut=(map tako yaki) :: changes
|
||||
lat=(map lobe page) :: data
|
||||
@ -919,6 +933,13 @@
|
||||
+$ rule [mod=?(%black %white) who=(set whom)] :: node permission
|
||||
+$ rump [p=care q=case r=@tas s=path] :: relative path
|
||||
+$ saba [p=ship q=@tas r=moar s=dome] :: patch+merge
|
||||
+$ soak :: ford result
|
||||
$% [%cage =cage]
|
||||
[%vase =vase]
|
||||
[%arch dir=(map @ta vase)]
|
||||
[%dais =dais]
|
||||
[%tube =tube]
|
||||
==
|
||||
+$ soba (list [p=path q=miso]) :: delta
|
||||
+$ suba (list [p=path q=misu]) :: delta
|
||||
+$ tako @uvI :: yaki ref
|
||||
@ -1058,6 +1079,31 @@
|
||||
%^ cat 7 (sham [%yaki (roll p add) q t])
|
||||
(sham [%tako (roll p add) q t])
|
||||
[p q has t]
|
||||
::
|
||||
:: $leak: ford cache key
|
||||
::
|
||||
:: This includes all build inputs, including transitive dependencies,
|
||||
:: recursively.
|
||||
::
|
||||
+$ leak
|
||||
$~ [*pour ~]
|
||||
$: =pour
|
||||
deps=(set leak)
|
||||
==
|
||||
::
|
||||
:: $flow: global ford cache
|
||||
::
|
||||
:: Refcount includes references from other items in the cache, and
|
||||
:: from spills in each desk
|
||||
::
|
||||
:: This is optimized for minimizing the number of rebuilds, and given
|
||||
:: that, minimizing the amount of memory used. It is relatively slow
|
||||
:: to lookup, because generating a cache key can be fairly slow (for
|
||||
:: files, it requires parsing; for tubes, it even requires building
|
||||
:: the marks).
|
||||
::
|
||||
+$ flow (map leak [refs=@ud =soak])
|
||||
::
|
||||
:: $pile: preprocessed hoon source file
|
||||
::
|
||||
:: /- sur-file :: surface imports from /sur
|
||||
@ -1177,6 +1223,7 @@
|
||||
$>(%init vane-task) :: after gall ready
|
||||
[%meld ~] :: unify memory
|
||||
[%pack ~] :: compact memory
|
||||
[%seat =desk] :: install desk
|
||||
[%shot ses=@tas task=session-task] :: task for session
|
||||
[%talk p=(list tank)] :: print tanks
|
||||
[%text p=tape] :: print tape
|
||||
@ -2530,6 +2577,9 @@
|
||||
:: TODO: make $yuki an option for %into?
|
||||
::
|
||||
$>(%park task:clay)
|
||||
:: %clay: load blob store
|
||||
::
|
||||
$>(%prep task:clay)
|
||||
:: %eyre: learn ports of live http servers
|
||||
::
|
||||
$>(%live task:eyre)
|
||||
|
@ -102,6 +102,7 @@
|
||||
ges=`?`%.n :: congestion control
|
||||
for=`?`%.n :: packet forwarding
|
||||
rot=`?`%.n :: routing attempts
|
||||
kay=`?`%.n :: is ok/not responding
|
||||
==
|
||||
=>
|
||||
~% %ames ..part ~
|
||||
@ -121,14 +122,14 @@
|
||||
:: +qos-update-text: notice text for if connection state changes
|
||||
::
|
||||
++ qos-update-text
|
||||
|= [=ship old=qos new=qos]
|
||||
|= [=ship old=qos new=qos k=? ships=(set ship)]
|
||||
^- (unit tape)
|
||||
::
|
||||
?+ [-.old -.new] ~
|
||||
[%unborn %live] `"; {(scow %p ship)} is your neighbor"
|
||||
[%dead %live] `"; {(scow %p ship)} is ok"
|
||||
[%live %dead] `"; {(scow %p ship)} not responding still trying"
|
||||
[%unborn %dead] `"; {(scow %p ship)} not responding still trying"
|
||||
[%dead %live] ((trace k ship ships |.("is ok")) ~)
|
||||
[%live %dead] ((trace k ship ships |.("not responding still trying")) ~)
|
||||
[%unborn %dead] ((trace k ship ships |.("not responding still trying")) ~)
|
||||
[%live %unborn] `"; {(scow %p ship)} has sunk"
|
||||
[%dead %unborn] `"; {(scow %p ship)} has sunk"
|
||||
==
|
||||
@ -627,7 +628,7 @@
|
||||
=unix=duct
|
||||
=life
|
||||
crypto-core=acru:ames
|
||||
=bug
|
||||
bug=bug-9
|
||||
==
|
||||
::
|
||||
+$ ship-state-4 ship-state-5
|
||||
@ -656,7 +657,7 @@
|
||||
=unix=duct
|
||||
=life
|
||||
crypto-core=acru:ames
|
||||
=bug
|
||||
bug=bug-9
|
||||
==
|
||||
::
|
||||
+$ ship-state-6
|
||||
@ -685,7 +686,7 @@
|
||||
=unix=duct
|
||||
=life
|
||||
crypto-core=acru:ames
|
||||
=bug
|
||||
bug=bug-9
|
||||
==
|
||||
::
|
||||
+$ ames-state-8
|
||||
@ -693,11 +694,25 @@
|
||||
=unix=duct
|
||||
=life
|
||||
crypto-core=acru:ames
|
||||
=bug
|
||||
bug=bug-9
|
||||
corks=(set wire)
|
||||
==
|
||||
::
|
||||
|
||||
+$ bug-9
|
||||
$: veb=_[`?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n]
|
||||
ships=(set ship)
|
||||
==
|
||||
::
|
||||
+$ ames-state-9
|
||||
$: peers=(map ship ship-state)
|
||||
=unix=duct
|
||||
=life
|
||||
crypto-core=acru:ames
|
||||
bug=bug-9
|
||||
corks=(set wire)
|
||||
snub=(set ship)
|
||||
==
|
||||
::
|
||||
:: $bug: debug printing configuration
|
||||
::
|
||||
:: veb: verbosity toggles
|
||||
@ -860,7 +875,8 @@
|
||||
[%6 ames-state-6]
|
||||
[%7 ames-state-7]
|
||||
[%8 ames-state-8]
|
||||
[%9 ^ames-state]
|
||||
[%9 ames-state-9]
|
||||
[%10 ^ames-state]
|
||||
==
|
||||
::
|
||||
|= [now=@da eny=@ rof=roof]
|
||||
@ -983,7 +999,7 @@
|
||||
:: lifecycle arms; mostly pass-throughs to the contained adult ames
|
||||
::
|
||||
++ scry scry:adult-core
|
||||
++ stay [%9 %larva queued-events ames-state.adult-gate]
|
||||
++ stay [%10 %larva queued-events ames-state.adult-gate]
|
||||
++ load
|
||||
|= $= old
|
||||
$% $: %4
|
||||
@ -1020,8 +1036,15 @@
|
||||
state=ames-state-8
|
||||
==
|
||||
[%adult state=ames-state-8]
|
||||
== ==
|
||||
== ==
|
||||
$: %9
|
||||
$% $: %larva
|
||||
events=(qeu queued-event)
|
||||
state=ames-state-9
|
||||
==
|
||||
[%adult state=ames-state-9]
|
||||
== ==
|
||||
$: %10
|
||||
$% $: %larva
|
||||
events=(qeu queued-event)
|
||||
state=_ames-state.adult-gate
|
||||
@ -1076,12 +1099,22 @@
|
||||
=. queued-events events.old
|
||||
larval-gate
|
||||
::
|
||||
[%9 %adult *] (load:adult-core %9 state.old)
|
||||
[%9 %adult *]
|
||||
=. cached-state `[%9 state.old]
|
||||
~> %slog.0^leaf/"ames: larva reload"
|
||||
larval-gate
|
||||
::
|
||||
[%9 %larva *]
|
||||
~> %slog.0^leaf/"ames: larva: load"
|
||||
=. queued-events events.old
|
||||
larval-gate
|
||||
::
|
||||
[%10 %adult *] (load:adult-core %10 state.old)
|
||||
::
|
||||
[%10 %larva *]
|
||||
~> %slog.1^leaf/"ames: larva: load"
|
||||
=. queued-events events.old
|
||||
=. adult-gate (load:adult-core %9 state.old)
|
||||
=. adult-gate (load:adult-core %10 state.old)
|
||||
larval-gate
|
||||
::
|
||||
==
|
||||
@ -1102,7 +1135,9 @@
|
||||
8+(state-7-to-8:load:adult-core +.u.cached-state)
|
||||
=? u.cached-state ?=(%8 -.u.cached-state)
|
||||
9+(state-8-to-9:load:adult-core +.u.cached-state)
|
||||
?> ?=(%9 -.u.cached-state)
|
||||
=? u.cached-state ?=(%9 -.u.cached-state)
|
||||
10+(state-9-to-10:load:adult-core +.u.cached-state)
|
||||
?> ?=(%10 -.u.cached-state)
|
||||
=. ames-state.adult-gate +.u.cached-state
|
||||
[moz larval-core(cached-state ~)]
|
||||
--
|
||||
@ -1148,6 +1183,7 @@
|
||||
%vega on-vega:event-core
|
||||
%plea (on-plea:event-core [ship plea]:task)
|
||||
%cork (on-cork:event-core ship.task)
|
||||
%kroc (on-kroc:event-core dry.task)
|
||||
==
|
||||
::
|
||||
[moves ames-gate]
|
||||
@ -1178,15 +1214,15 @@
|
||||
[moves ames-gate]
|
||||
:: +stay: extract state before reload
|
||||
::
|
||||
++ stay [%9 %adult ames-state]
|
||||
++ stay [%10 %adult ames-state]
|
||||
:: +load: load in old state after reload
|
||||
::
|
||||
++ load
|
||||
=< |= $= old-state
|
||||
$% [%9 ^ames-state]
|
||||
$% [%10 ^ames-state]
|
||||
==
|
||||
^+ ames-gate
|
||||
?> ?=(%9 -.old-state)
|
||||
?> ?=(%10 -.old-state)
|
||||
ames-gate(ames-state +.old-state)
|
||||
::
|
||||
|%
|
||||
@ -1260,7 +1296,7 @@
|
||||
==
|
||||
++ state-8-to-9
|
||||
|= ames-state=ames-state-8
|
||||
^- ^^ames-state
|
||||
^- ames-state-9
|
||||
:* peers.ames-state
|
||||
unix-duct.ames-state
|
||||
life.ames-state
|
||||
@ -1269,6 +1305,19 @@
|
||||
corks.ames-state
|
||||
*(set ship)
|
||||
==
|
||||
++ state-9-to-10
|
||||
|= ames-state=ames-state-9
|
||||
^- ^^ames-state
|
||||
:* peers.ames-state
|
||||
unix-duct.ames-state
|
||||
life.ames-state
|
||||
crypto-core.ames-state
|
||||
%= bug.ames-state
|
||||
veb [&1 &2 &3 &4 &5 &6 |6 %.n]:veb.bug.ames-state
|
||||
==
|
||||
corks.ames-state
|
||||
snub.ames-state
|
||||
==
|
||||
--
|
||||
:: +scry: dereference namespace
|
||||
::
|
||||
@ -1400,6 +1449,7 @@
|
||||
~% %event-gate ..per-event ~
|
||||
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
||||
=* veb veb.bug.ames-state
|
||||
=| cork-bone=(unit bone) :: modified by +on-kroc
|
||||
~% %event-core ..$ ~
|
||||
|%
|
||||
++ event-core .
|
||||
@ -1507,6 +1557,7 @@
|
||||
%ges acc(ges %.y)
|
||||
%for acc(for %.y)
|
||||
%rot acc(rot %.y)
|
||||
%kay acc(kay %.y)
|
||||
==
|
||||
event-core
|
||||
:: +on-prod: re-send a packet per flow to each of .ships
|
||||
@ -1850,7 +1901,15 @@
|
||||
=/ =peer-state +.u.ship-state
|
||||
=/ =channel [[our ship] now channel-state -.peer-state]
|
||||
::
|
||||
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
||||
=/ [=bone ossuary=_ossuary.peer-state]
|
||||
?^ cork-bone [u.cork-bone ossuary.peer-state]
|
||||
(bind-duct ossuary.peer-state duct)
|
||||
=. ossuary.peer-state ossuary
|
||||
::
|
||||
?. (~(has by by-bone.ossuary.peer-state) bone)
|
||||
%. event-core
|
||||
%^ trace odd.veb ship
|
||||
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
|
||||
::
|
||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||
%- %^ trace msg.veb ship
|
||||
@ -1859,6 +1918,68 @@
|
||||
=/ rcvr [ship her-life.channel]
|
||||
"cork plea {<sndr rcvr bone=bone vane.plea path.plea>}"
|
||||
abet:(on-memo:(make-peer-core peer-state channel) bone plea %plea)
|
||||
:: +on-kroc: cork all flows from failed subscriptions
|
||||
::
|
||||
++ on-kroc
|
||||
|= dry=?
|
||||
^+ event-core
|
||||
::
|
||||
=; [corks=@ core=_event-core]
|
||||
?. dry core
|
||||
%.(core (slog leaf/"ames: #{<corks>} flows can be corked" ~))
|
||||
::
|
||||
%+ roll ~(tap by peers.ames-state)
|
||||
|= [[=ship =ship-state] corks=@ core=_event-core]
|
||||
?. ?=(%known -.ship-state)
|
||||
corks^core
|
||||
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
|
||||
=/ subs=(jar path [bone sub-nonce=@])
|
||||
%+ roll ~(tap by snd.peer-state)
|
||||
|= [[=forward=bone *] subs=(jar path [bone sub-nonce=@])]
|
||||
?: (~(has in closing.peer-state) forward-bone)
|
||||
subs
|
||||
?~ duct=(~(get by by-bone.ossuary.peer-state) forward-bone)
|
||||
subs
|
||||
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||
subs
|
||||
=/ =wire i.t.u.duct
|
||||
=/ nonce=(unit @) (rush (snag 7 wire) dem)
|
||||
%- ~(add ja subs)
|
||||
:: 0 for old pre-nonce subscriptions
|
||||
::
|
||||
:_ [forward-bone ?~(nonce 0 u.nonce)]
|
||||
?~ nonce wire
|
||||
:: don't include the sub-nonce in the key
|
||||
::
|
||||
(weld (scag 7 wire) (slag 8 wire))
|
||||
%+ roll ~(tap by subs)
|
||||
|= [[=wire flows=(list [bone sub-nonce=@])] corks=_corks core=_core]
|
||||
::
|
||||
%- tail
|
||||
%+ roll (sort flows |=([[@ n=@] [@ m=@]] (lte n m)))
|
||||
|= [[=bone nonce=@] resubs=_(lent flows) corks=_corks core=_core]
|
||||
=/ app=term ?>(?=([%gall %use sub=@ *] wire) i.t.t.wire)
|
||||
=/ =path (slag 7 wire)
|
||||
=/ log=tape "[bone={<bone>} agent={<app>} nonce={<nonce>}] {<path>}"
|
||||
=; corkable=?
|
||||
=? corks corkable +(corks)
|
||||
=? core &(corkable !dry) (%*(on-cork core cork-bone `bone) ship)
|
||||
(dec resubs)^corks^core
|
||||
:: checks if this is a stale re-subscription
|
||||
::
|
||||
?. =(resubs 1)
|
||||
%. &
|
||||
(trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
|
||||
:: the current subscription can be safely corked if there
|
||||
:: is a flow with a naxplanation ack on a backward bone
|
||||
::
|
||||
=+ backward-bone=(mix 0b10 bone)
|
||||
?. =(2 (mod backward-bone 4))
|
||||
|
|
||||
?~ (~(get by rcv.peer-state) backward-bone)
|
||||
|
|
||||
%. &
|
||||
(trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
|
||||
:: +on-take-wake: receive wakeup or error notification from behn
|
||||
::
|
||||
++ on-take-wake
|
||||
@ -2016,7 +2137,9 @@
|
||||
=. +.peer-state +:*^peer-state
|
||||
:: print change to quality of service, if any
|
||||
::
|
||||
=/ text=(unit tape) (qos-update-text ship old-qos qos.peer-state)
|
||||
=/ text=(unit tape)
|
||||
%^ qos-update-text ship old-qos
|
||||
[qos.peer-state kay.veb ships.bug.ames-state]
|
||||
::
|
||||
=? event-core ?=(^ text)
|
||||
(emit duct %pass /qos %d %flog %text u.text)
|
||||
@ -2421,7 +2544,10 @@
|
||||
=^ old-qos qos.peer-state [qos.peer-state new-qos]
|
||||
:: if no update worth reporting, we're done
|
||||
::
|
||||
?~ text=(qos-update-text her.channel old-qos new-qos)
|
||||
=/ text
|
||||
%^ qos-update-text her.channel old-qos
|
||||
[new-qos kay.veb ships.bug.ames-state]
|
||||
?~ text
|
||||
peer-core
|
||||
:: print message
|
||||
::
|
||||
|
@ -191,19 +191,6 @@
|
||||
[%1 peg=(unit page)]
|
||||
==
|
||||
::
|
||||
:: Global ford cache
|
||||
::
|
||||
:: Refcount includes references from other items in the cache, and
|
||||
:: from spills in each desk
|
||||
::
|
||||
:: This is optimized for minimizing the number of rebuilds, and given
|
||||
:: that, minimizing the amount of memory used. It is relatively slow
|
||||
:: to lookup, because generating a cache key can be fairly slow (for
|
||||
:: files, it requires parsing; for tubes, it even requires building
|
||||
:: the marks).
|
||||
::
|
||||
+$ flow (map leak [refs=@ud =soak])
|
||||
::
|
||||
:: Per-desk ford cache
|
||||
::
|
||||
:: Spill is the set of "roots" we have into the global ford cache.
|
||||
@ -228,41 +215,6 @@
|
||||
[%arch =path]
|
||||
==
|
||||
::
|
||||
:: Ford build with content.
|
||||
::
|
||||
+$ pour
|
||||
$% [%file =path]
|
||||
[%nave =mark]
|
||||
[%dais =mark]
|
||||
[%cast =mars]
|
||||
[%tube =mars]
|
||||
:: leafs
|
||||
::
|
||||
[%vale =path =lobe]
|
||||
[%arch =path =(map path lobe)]
|
||||
==
|
||||
::
|
||||
:: Ford result.
|
||||
::
|
||||
+$ soak
|
||||
$% [%cage =cage]
|
||||
[%vase =vase]
|
||||
[%arch dir=(map @ta vase)]
|
||||
[%dais =dais]
|
||||
[%tube =tube]
|
||||
==
|
||||
::
|
||||
:: Ford cache key
|
||||
::
|
||||
:: This includes all build inputs, including transitive dependencies,
|
||||
:: recursively.
|
||||
::
|
||||
+$ leak
|
||||
$~ [*pour ~]
|
||||
$: =pour
|
||||
deps=(set leak)
|
||||
==
|
||||
::
|
||||
:: New desk data.
|
||||
::
|
||||
:: Sent to other ships to update them about a particular desk.
|
||||
@ -4208,8 +4160,36 @@
|
||||
:: +read-s: produce miscellaneous
|
||||
::
|
||||
++ read-s
|
||||
|= [yon=aeon pax=path]
|
||||
|= [yon=aeon pax=path =case]
|
||||
^- (unit (unit cage))
|
||||
?: ?=([%subs ~] pax)
|
||||
?. =([%da now] case) ~
|
||||
=| sus=(set ship)
|
||||
=/ doj=(unit dojo) (~(get by dos.rom) syd)
|
||||
?~ doj
|
||||
``noun+!>(sus)
|
||||
=/ wos ~(tap in ~(key by qyx.u.doj))
|
||||
|-
|
||||
?~ wos
|
||||
``noun+!>(sus)
|
||||
?~ for.i.wos
|
||||
$(wos t.wos)
|
||||
%= $
|
||||
wos t.wos
|
||||
sus (~(put in sus) ship.u.for.i.wos)
|
||||
==
|
||||
?: ?=([%bloc ~] pax)
|
||||
:^ ~ ~ %noun
|
||||
:- -:!>(*(map lobe page))
|
||||
^- (map lobe page)
|
||||
%- %~ rep in
|
||||
%- reachable-takos
|
||||
(~(got by hit.dom) let.dom)
|
||||
|= [t=tako o=(map lobe page)]
|
||||
%- ~(gas by o)
|
||||
%+ turn
|
||||
~(val by q:(~(got by hut.ran) t))
|
||||
|=(l=lobe [l (~(got by lat.ran) l)])
|
||||
?. ?=([@ * *] pax)
|
||||
`~
|
||||
?+ i.pax `~
|
||||
@ -4463,7 +4443,7 @@
|
||||
%f (read-f yon path.mun)
|
||||
%p [(read-p path.mun) ..park]
|
||||
%r (read-r yon path.mun)
|
||||
%s [(read-s yon path.mun) ..park]
|
||||
%s [(read-s yon path.mun case.mun) ..park]
|
||||
%t [(read-t yon path.mun) ..park]
|
||||
%u [(read-u yon path.mun) ..park]
|
||||
%v [(read-v yon path.mun) ..park]
|
||||
@ -4913,6 +4893,9 @@
|
||||
=/ den ((de now rof hen ruf) our syd)
|
||||
abet:(park:den & & yoki *rang)
|
||||
[mos ..^$]
|
||||
::
|
||||
%prep
|
||||
[~ ..^$(lat.ran.ruf (~(uni by lat.req) lat.ran.ruf))]
|
||||
::
|
||||
%perm
|
||||
=^ mos ruf
|
||||
@ -5647,6 +5630,8 @@
|
||||
%sweep ``[%sweep !>(sweep)]
|
||||
%rang ``[%rang !>(ran.ruf)]
|
||||
%tomb ``[%flag !>((tomb t.path))]
|
||||
%cult ``[%cult !>((cult t.path))]
|
||||
%flow ``[%flow !>(fad.ruf)]
|
||||
%domes domes
|
||||
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
|
||||
%tyre ``[%tyre !>(tyr.ruf)]
|
||||
@ -5672,6 +5657,22 @@
|
||||
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
|
||||
``[%domes !>(`cone`domes)]
|
||||
::
|
||||
++ cult
|
||||
|= =path
|
||||
^- (set [@p rave])
|
||||
%- %~ run in
|
||||
%~ key by
|
||||
?~ path *^cult
|
||||
qyx:(~(gut by dos.rom.ruf) i.path *dojo)
|
||||
|= wove
|
||||
:- ship:(fall for [ship=our @ud])
|
||||
?- -.rove
|
||||
%sing rove
|
||||
%next [%next mood.rove]
|
||||
%mult [%mult mool.rove]
|
||||
%many [%many [track moat]:rove]
|
||||
==
|
||||
::
|
||||
:: True if file is accessible
|
||||
::
|
||||
++ tomb
|
||||
|
@ -107,6 +107,11 @@
|
||||
%pack (dump kyz)
|
||||
%crop (dump trim+p.kyz)
|
||||
%verb (pass /verb %$ kyz)
|
||||
::
|
||||
%seat
|
||||
%^ pass /seat %g
|
||||
:+ %deal [our our]
|
||||
[%hood %poke %kiln-install !>([desk.kyz our desk.kyz])]
|
||||
==
|
||||
::
|
||||
++ crud
|
||||
|
@ -2726,13 +2726,11 @@
|
||||
=* domains domains.server-state.ax
|
||||
=* ports ports.server-state.ax
|
||||
=/ =host:eyre [%& ?^(domains n.domains /localhost)]
|
||||
=/ secure=? &(?=(^ secure.ports) !?=(hoke:eyre host))
|
||||
=/ port=(unit @ud)
|
||||
?. secure
|
||||
?. ?=(^ secure.ports)
|
||||
?:(=(80 insecure.ports) ~ `insecure.ports)
|
||||
?> ?=(^ secure.ports)
|
||||
?:(=(443 u.secure.ports) ~ secure.ports)
|
||||
``[secure port host]
|
||||
``[?=(^ secure.ports) port host]
|
||||
==
|
||||
==
|
||||
--
|
||||
|
319
pkg/autoprop/app/autoprop.hoon
Normal file
319
pkg/autoprop/app/autoprop.hoon
Normal file
@ -0,0 +1,319 @@
|
||||
:: autoprop: make pills & props when desk contents change
|
||||
::
|
||||
:: auto-build a new .urb/put/latest-solid.pill:
|
||||
:: +latest-solid solid %kids %garden
|
||||
::
|
||||
:: stop auto-building latest-solid:
|
||||
:: -latest-solid
|
||||
::
|
||||
:: auto-build a new .urb/put/somedesk.jam:
|
||||
:: +some-desk desk %somedesk
|
||||
::
|
||||
:: see currently configured build tasks:
|
||||
:: ?
|
||||
::
|
||||
:: run task right now:
|
||||
:: !latest-solid
|
||||
::
|
||||
/+ libpill=pill, shoe, verb, dbug, default-agent
|
||||
::
|
||||
=, clay
|
||||
::
|
||||
|%
|
||||
+$ state-0
|
||||
$: %0
|
||||
make=(map @ta [next=(unit @da) =task]) :: things to make
|
||||
hear=(set desk) :: observed desks
|
||||
vers=path :: runtime version
|
||||
sole=sole-id :: the way out
|
||||
==
|
||||
::
|
||||
+$ sole-id sole-id:sole:shoe
|
||||
::
|
||||
+$ task
|
||||
$% pill
|
||||
prop
|
||||
==
|
||||
::
|
||||
+$ pill
|
||||
$% [%ivory base=desk]
|
||||
[%solid base=desk etc=(set desk)]
|
||||
[%brass base=desk etc=(set desk)]
|
||||
==
|
||||
::
|
||||
+$ prop
|
||||
$% [%desk =desk]
|
||||
==
|
||||
::
|
||||
+$ command
|
||||
$% [%put name=@ta =task] :: configure pill build
|
||||
[%del name=@ta] :: remove pill build
|
||||
[%see ~] :: help & current config
|
||||
[%run name=@ta] :: force build
|
||||
==
|
||||
::
|
||||
+$ card card:shoe
|
||||
::
|
||||
++ delay ~d5
|
||||
--
|
||||
=| state-0
|
||||
=* state -
|
||||
::
|
||||
%+ verb |
|
||||
%- agent:dbug
|
||||
^- agent:gall
|
||||
%- (agent:shoe command)
|
||||
^- (shoe:shoe command)
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
def ~(. (default-agent this %|) bowl)
|
||||
des ~(. (default:shoe this command) bowl)
|
||||
rev rev:.^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
|
||||
::
|
||||
++ on-init
|
||||
^- (quip card _this)
|
||||
:_ this(vers rev)
|
||||
[%pass /vers %arvo %b %wait (add now.bowl ~m5)]~
|
||||
::
|
||||
++ on-save !>(state)
|
||||
++ on-load
|
||||
|= old=vase
|
||||
^- (quip card _this)
|
||||
[~ this(state !<(state-0 old))]
|
||||
::
|
||||
++ command-parser
|
||||
|= =sole-id
|
||||
^+ |~(nail *(like [? command]))
|
||||
%+ pick
|
||||
(cold [%see ~] wut)
|
||||
|^ ;~ pose
|
||||
(stag %put ;~(plug (ifix [lus ace] sym) ;~(pose pil pro)))
|
||||
;~(plug (cold %del hep) sym)
|
||||
;~(plug (cold %run zap) sym)
|
||||
==
|
||||
::
|
||||
++ pil
|
||||
;~ pose
|
||||
;~(plug (perk %ivory ~) ;~(pfix ace des))
|
||||
;~(plug (perk %solid ~) ;~(pfix ace dez))
|
||||
;~(plug (perk %brass ~) ;~(pfix ace dez))
|
||||
==
|
||||
::
|
||||
++ pro
|
||||
;~(plug (perk %desk ~) ;~(pfix ace des))
|
||||
::
|
||||
++ des
|
||||
;~(pfix cen sym)
|
||||
::
|
||||
++ dez
|
||||
;~ plug
|
||||
des
|
||||
;~ pose
|
||||
;~(pfix ace (cook ~(gas in *(set desk)) (more ace des)))
|
||||
(easy ~)
|
||||
==
|
||||
==
|
||||
--
|
||||
::
|
||||
++ on-command
|
||||
|= [=sole-id =command]
|
||||
^- (quip card _this)
|
||||
?- -.command
|
||||
%put
|
||||
=* task task.command
|
||||
=/ targ=(set desk)
|
||||
?- -.task
|
||||
%ivory [base.task ~ ~]
|
||||
?(%solid %brass) (~(put in etc.task) base.task)
|
||||
%desk [desk.task ~ ~]
|
||||
==
|
||||
=/ news (~(dif in targ) hear)
|
||||
=. hear (~(uni in hear) targ)
|
||||
=. make (~(put by make) name.command `now.bowl task.command)
|
||||
:_ this
|
||||
%+ turn ~(tap in news)
|
||||
|= =desk
|
||||
:+ %pass /desk/[desk]
|
||||
[%arvo %c %warp our.bowl desk `[%next %z da+now.bowl /]]
|
||||
::
|
||||
%del
|
||||
::NOTE deletion from hear, if necessary, handled in +on-arvo
|
||||
[~ this(make (~(del by make) name.command))]
|
||||
::
|
||||
%see
|
||||
:_ this
|
||||
^- (list card)
|
||||
=- [%shoe [sole-id]~ %sole %mor -]~
|
||||
^- (list sole-effect:shoe)
|
||||
:- [%txt "to add: +task-name type %args"]
|
||||
:- [%txt " where type is one of: solid, brass, ivory, desk"]
|
||||
:- [%txt "to del: -task-name"]
|
||||
:- [%txt "to run: !task-name"]
|
||||
?: =(~ make)
|
||||
[%txt "no builds configured"]~
|
||||
:- [%txt "--"]
|
||||
:- [%txt "builds:"]
|
||||
%+ turn ~(tap by make)
|
||||
|= [name=@ta next=(unit @da) =task]
|
||||
:- %txt
|
||||
%- trip
|
||||
%+ rap 3
|
||||
:* name ' ('
|
||||
?~(next 'up to date' (scot %da u.next))
|
||||
') : +' -.task ' %'
|
||||
::
|
||||
?- -.task
|
||||
%ivory [base.task ~]
|
||||
?(%solid %brass) :- base.task
|
||||
?: =(~ etc.task) ~
|
||||
[' %' (join ' %' ~(tap in etc.task))]
|
||||
%desk [desk.task ~]
|
||||
== ==
|
||||
::
|
||||
%run
|
||||
=* name name.command
|
||||
=+ (~(got by make) name)
|
||||
:_ =- this(make (~(jab by make) name -))
|
||||
|=([next=(unit @da) =^task] [~ task])
|
||||
::TODO just poke hood instead?
|
||||
=; sag=sole-effect:shoe
|
||||
:_ ~
|
||||
:+ %shoe [sole]~
|
||||
:+ %sole %mor
|
||||
:~ [%txt "{(trip dap.bowl)} built {(trip name)}"]
|
||||
sag
|
||||
==
|
||||
|^ =* base base.task
|
||||
:+ %sag
|
||||
=/ ver=@ta
|
||||
=+ .^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
|
||||
?. ?=([%vere @ ~] rev)
|
||||
(rap 3 (join '-' rev))
|
||||
(fall (slaw %ta i.t.rev) i.t.rev)
|
||||
?- -.task
|
||||
?(%solid %brass %ivory) /[dap.bowl]/[ver]/[name]/pill
|
||||
%desk /[dap.bowl]/[ver]/[name]/jam
|
||||
==
|
||||
?- -.task
|
||||
%ivory (ivory:libpill (sys base))
|
||||
::
|
||||
?(%solid %brass)
|
||||
=/ dez=(list [desk path])
|
||||
%+ turn ~(tap in etc.task)
|
||||
|=(d=desk [d (bek d)])
|
||||
?- -.task
|
||||
%solid (solid:libpill (sys base) dez | now.bowl &)
|
||||
%brass (brass:libpill (sys base) dez &)
|
||||
==
|
||||
::
|
||||
%desk
|
||||
=* desk desk.task
|
||||
(install:events:libpill desk (byk desk) &)
|
||||
==
|
||||
::
|
||||
++ sys
|
||||
|= d=desk
|
||||
`path`(snoc (bek d) %sys)
|
||||
::
|
||||
++ byk
|
||||
|= d=desk
|
||||
`beak`[our.bowl d da+now.bowl]
|
||||
::
|
||||
++ bek
|
||||
|= d=desk
|
||||
`path`(en-beam (byk d) /)
|
||||
--
|
||||
==
|
||||
::
|
||||
++ on-arvo
|
||||
|= [=wire sign=sign-arvo]
|
||||
^- (quip card _this)
|
||||
?: ?=([%build ~] wire)
|
||||
:: on-wake, build all tasks whose time has come
|
||||
::
|
||||
?> ?=(%wake +<.sign)
|
||||
=/ tasks=(list @ta)
|
||||
%+ murn ~(tap by make)
|
||||
|= [name=@ta next=(unit @da) task]
|
||||
?~ next ~
|
||||
?:((lte u.next now.bowl) (some name) ~)
|
||||
?^ error.sign
|
||||
((slog 'on-wake build failed' >tasks< u.error.sign) ~ this)
|
||||
::
|
||||
=| cards=(list card)
|
||||
|-
|
||||
?~ tasks [cards this]
|
||||
=^ caz this (on-command sole %run i.tasks)
|
||||
$(tasks t.tasks, cards (weld cards caz))
|
||||
::
|
||||
?: ?=([%vers ~] wire)
|
||||
:: on-wake, republish props if we're on a new runtime
|
||||
::
|
||||
?> ?=(%wake +<.sign)
|
||||
=/ next=card
|
||||
[%pass /vers %arvo %b %wait (add now.bowl ~m5)]
|
||||
?^ error.sign
|
||||
%- (slog 'on-wake vers failed' u.error.sign)
|
||||
[[next]~ this]
|
||||
?: =(rev vers) [[next]~ this]
|
||||
=/ tasks=(list @ta) ~(tap in ~(key by make))
|
||||
=| cards=(list card)
|
||||
|-
|
||||
?~ tasks [[next cards] this]
|
||||
=^ caz this (on-command sole %run i.tasks)
|
||||
$(tasks t.tasks, cards (weld cards caz))
|
||||
::
|
||||
?> ?=([%desk @ ~] wire)
|
||||
=* desk i.t.wire
|
||||
?. ?=(%writ +<.sign)
|
||||
~& [dap.bowl %unexpected-sign +<.sign]
|
||||
[~ this]
|
||||
:: on-writ, bump build timers for all affected tasks
|
||||
::
|
||||
=/ tasks=(list @ta)
|
||||
%+ murn ~(tap by make)
|
||||
|= [name=@ta (unit @da) =task]
|
||||
=- ?:(- (some name) ~)
|
||||
?- -.task
|
||||
%ivory =(desk base.task)
|
||||
?(%solid %brass) |(=(desk base.task) (~(has in etc.task) desk))
|
||||
%desk =(desk desk.task)
|
||||
==
|
||||
?: =(~ tasks)
|
||||
[~ this(hear (~(del in hear) desk))]
|
||||
::
|
||||
=/ next=@da (add now.bowl delay)
|
||||
:_ :: delay next build for affected tasks
|
||||
::
|
||||
|- ?~ tasks this
|
||||
=. make
|
||||
%+ ~(jab by make) i.tasks
|
||||
|=([(unit @da) =task] [`next task])
|
||||
$(tasks t.tasks)
|
||||
:~ :: watch for the next change on this desk
|
||||
::
|
||||
:+ %pass /desk/[desk]
|
||||
[%arvo %c %warp our.bowl desk `[%next %z da+now.bowl /]]
|
||||
::
|
||||
:: set a timer for building affected tasks
|
||||
::
|
||||
[%pass /build %arvo %b %wait next]
|
||||
==
|
||||
::
|
||||
++ on-connect
|
||||
|= =sole-id
|
||||
^- (quip card _this)
|
||||
::TODO actually should just poke drum to write
|
||||
[~ this(sole sole-id)]
|
||||
::
|
||||
++ can-connect |=(* =(src our):bowl)
|
||||
++ on-disconnect on-disconnect:des
|
||||
++ tab-list tab-list:des
|
||||
::
|
||||
++ on-poke on-poke:def
|
||||
++ on-watch on-watch:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-agent on-agent:def
|
||||
++ on-fail on-fail:def
|
||||
--
|
3
pkg/autoprop/desk.bill
Normal file
3
pkg/autoprop/desk.bill
Normal file
@ -0,0 +1,3 @@
|
||||
:~ %autoprop
|
||||
==
|
||||
|
1
pkg/autoprop/lib/dbug.hoon
Symbolic link
1
pkg/autoprop/lib/dbug.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/dbug.hoon
|
1
pkg/autoprop/lib/default-agent.hoon
Symbolic link
1
pkg/autoprop/lib/default-agent.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/default-agent.hoon
|
1
pkg/autoprop/lib/dice.hoon
Symbolic link
1
pkg/autoprop/lib/dice.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../arvo/lib/dice.hoon
|
1
pkg/autoprop/lib/ethereum.hoon
Symbolic link
1
pkg/autoprop/lib/ethereum.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../arvo/lib/ethereum.hoon
|
1
pkg/autoprop/lib/language-server/complete.hoon
Symbolic link
1
pkg/autoprop/lib/language-server/complete.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/complete.hoon
|
1
pkg/autoprop/lib/language-server/parser.hoon
Symbolic link
1
pkg/autoprop/lib/language-server/parser.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/parser.hoon
|
1
pkg/autoprop/lib/naive.hoon
Symbolic link
1
pkg/autoprop/lib/naive.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../arvo/lib/naive.hoon
|
1
pkg/autoprop/lib/pill.hoon
Symbolic link
1
pkg/autoprop/lib/pill.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/pill.hoon
|
1
pkg/autoprop/lib/shoe.hoon
Symbolic link
1
pkg/autoprop/lib/shoe.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/shoe.hoon
|
1
pkg/autoprop/lib/skeleton.hoon
Symbolic link
1
pkg/autoprop/lib/skeleton.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/skeleton.hoon
|
1
pkg/autoprop/lib/sole.hoon
Symbolic link
1
pkg/autoprop/lib/sole.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/sole.hoon
|
1
pkg/autoprop/lib/tiny.hoon
Symbolic link
1
pkg/autoprop/lib/tiny.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../arvo/lib/tiny.hoon
|
1
pkg/autoprop/lib/verb.hoon
Symbolic link
1
pkg/autoprop/lib/verb.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/verb.hoon
|
1
pkg/autoprop/mar/bill.hoon
Symbolic link
1
pkg/autoprop/mar/bill.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/bill.hoon
|
1
pkg/autoprop/mar/hoon.hoon
Symbolic link
1
pkg/autoprop/mar/hoon.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/hoon.hoon
|
1
pkg/autoprop/mar/kelvin.hoon
Symbolic link
1
pkg/autoprop/mar/kelvin.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/kelvin.hoon
|
1
pkg/autoprop/mar/mime.hoon
Symbolic link
1
pkg/autoprop/mar/mime.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/mime.hoon
|
1
pkg/autoprop/mar/noun.hoon
Symbolic link
1
pkg/autoprop/mar/noun.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/noun.hoon
|
1
pkg/autoprop/mar/ship.hoon
Symbolic link
1
pkg/autoprop/mar/ship.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/ship.hoon
|
1
pkg/autoprop/mar/txt-diff.hoon
Symbolic link
1
pkg/autoprop/mar/txt-diff.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/txt-diff.hoon
|
1
pkg/autoprop/mar/txt.hoon
Symbolic link
1
pkg/autoprop/mar/txt.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/txt.hoon
|
1
pkg/autoprop/sur/dice.hoon
Symbolic link
1
pkg/autoprop/sur/dice.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../arvo/sur/dice.hoon
|
1
pkg/autoprop/sur/language-server.hoon
Symbolic link
1
pkg/autoprop/sur/language-server.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/language-server.hoon
|
1
pkg/autoprop/sur/sole.hoon
Symbolic link
1
pkg/autoprop/sur/sole.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/sole.hoon
|
1
pkg/autoprop/sur/verb.hoon
Symbolic link
1
pkg/autoprop/sur/verb.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/verb.hoon
|
1
pkg/autoprop/sys.kelvin
Normal file
1
pkg/autoprop/sys.kelvin
Normal file
@ -0,0 +1 @@
|
||||
[%zuse 415]
|
@ -64,7 +64,11 @@
|
||||
%- ~(gas by *(map path (each page lobe:clay)))
|
||||
(turn hav |=([=path =page] [path &+page]))
|
||||
[/c/sync [%park des &+yuki *rang:clay]]
|
||||
=| hav=(list [path page])
|
||||
(file-pages bas sal)
|
||||
::
|
||||
++ file-pages
|
||||
|= [bas=path sal=(list spur)]
|
||||
=| hav=(list [path page:clay])
|
||||
|- ^+ hav
|
||||
?~ sal ~
|
||||
=. hav $(sal t.sal)
|
||||
@ -97,6 +101,16 @@
|
||||
::
|
||||
++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
|
||||
::
|
||||
++ prep-ovum
|
||||
|= dez=(list path)
|
||||
^- unix-event
|
||||
=- ~& clay-blobs+~(wyt by -)
|
||||
[/c/inflate [%prep -]]
|
||||
%+ roll dez
|
||||
|= [bas=path out=(map lobe:clay page:clay)]
|
||||
%- ~(uni by out)
|
||||
.^(_out %cs (snoc bas %bloc))
|
||||
::
|
||||
:: +user-files: all userspace hoon files
|
||||
::
|
||||
++ user-files
|
||||
@ -135,4 +149,218 @@
|
||||
|- ^+ hav
|
||||
?~ all hav
|
||||
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
||||
::
|
||||
::TODO include %prep task in solid and brass?
|
||||
++ solid
|
||||
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||
:: dez: secondary desks and their root paths
|
||||
::
|
||||
|= [sys=path dez=(list [desk path]) dub=? now=@da prime=?]
|
||||
^- pill
|
||||
=/ bas=path (scag 3 sys)
|
||||
=/ compiler-path (weld sys /hoon)
|
||||
=/ arvo-path (weld sys /arvo)
|
||||
~& %solid-start
|
||||
=/ compiler-src .^(@t %cx (weld compiler-path /hoon))
|
||||
=/ arvo-src .^(@t %cx (weld arvo-path /hoon))
|
||||
=/ arvo-formula
|
||||
~& %solid-loaded
|
||||
=/ compiler-hoon (rain compiler-path compiler-src)
|
||||
?. dub
|
||||
:: compile arvo against hoon, with our current compiler
|
||||
::
|
||||
=/ whole-hoon=hoon
|
||||
[%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
|
||||
~& %solid-parsed
|
||||
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
|
||||
~& %solid-arvo
|
||||
whole-formula
|
||||
:: compile arvo against hoon, with a freshly compiled hoon (via +ride)
|
||||
::
|
||||
~& %solid-parsed
|
||||
=/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
|
||||
~& %solid-compiled
|
||||
=/ whole-src
|
||||
(rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
|
||||
~& %solid-double-loaded
|
||||
=/ whole-formula
|
||||
=< +
|
||||
.* [%noun whole-src]
|
||||
[%8 compiler-formula [%9 2 %10 [6 %0 3] [%0 2]]]
|
||||
~& %solid-double-compiled
|
||||
whole-formula
|
||||
::
|
||||
~& [%solid-kernel `@ux`(mug arvo-formula)]
|
||||
::
|
||||
:: installed: Arvo gate (formal interface) with %zuse and vanes installed
|
||||
::
|
||||
=/ installed
|
||||
=< q
|
||||
%^ spin
|
||||
^- (list ovum)
|
||||
:- (boot-ovum:pill compiler-src arvo-src)
|
||||
%+ turn
|
||||
(snoc (turn dez tail) bas)
|
||||
file-ovum2:pill
|
||||
.*(0 arvo-formula)
|
||||
|= [ovo=ovum ken=*]
|
||||
[~ (slum ken [now ovo])]
|
||||
::
|
||||
:: boot-two: startup formula
|
||||
::
|
||||
:: We evaluate :arvo-formula (for jet registration),
|
||||
:: then ignore the result and produce .installed
|
||||
::
|
||||
=/ boot-two
|
||||
=> *[arvo-formula=^ installed=^ tale=*]
|
||||
!= =+(.*(0 arvo-formula) [installed tale])
|
||||
::
|
||||
:: boot-ova
|
||||
::
|
||||
=/ boot-ova=(list)
|
||||
[aeon:eden:part boot-two arvo-formula installed ~]
|
||||
::
|
||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||
::
|
||||
:: Our kernel event-list is ~, as we've already installed them.
|
||||
:: Our userspace event-list is a list containing a full %clay
|
||||
:: filesystem sync event.
|
||||
::
|
||||
:+ %pill %solid
|
||||
:+ boot-ova ~
|
||||
=. dez (snoc dez [%base bas])
|
||||
%+ weld
|
||||
(turn dez file-ovum)
|
||||
?. prime ~
|
||||
[(prep-ovum (turn dez tail))]~
|
||||
::
|
||||
++ brass
|
||||
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||
:: dez: secondary desks and their root paths
|
||||
::
|
||||
|= [sys=path dez=(list [desk path]) prime=?]
|
||||
^- pill
|
||||
=/ bas=path (scag 3 sys)
|
||||
:: compiler-source: hoon source file producing compiler, `sys/hoon`
|
||||
::
|
||||
=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
|
||||
::
|
||||
:: compiler-twig: compiler as hoon expression
|
||||
::
|
||||
~& %brass-parsing
|
||||
=+ compiler-twig=(rain /sys/hoon/hoon compiler-source)
|
||||
~& %brass-parsed
|
||||
::
|
||||
:: compiler-formula: compiler as nock formula
|
||||
::
|
||||
~& %brass-compiling
|
||||
=+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
|
||||
~& %brass-compiled
|
||||
::
|
||||
:: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
|
||||
::
|
||||
=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
|
||||
::
|
||||
:: boot-ova: startup events
|
||||
::
|
||||
=/ boot-ova=(list)
|
||||
:~ aeon:eden:part
|
||||
boot:eden:part
|
||||
compiler-formula
|
||||
compiler-source
|
||||
arvo-source
|
||||
==
|
||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||
::
|
||||
:+ %pill %brass
|
||||
:+ boot-ova
|
||||
:~ (boot-ovum:pill compiler-source arvo-source)
|
||||
(file-ovum2:pill bas)
|
||||
==
|
||||
=. dez (snoc dez [%base bas])
|
||||
%+ weld
|
||||
(turn dez file-ovum)
|
||||
?. prime ~
|
||||
[(prep-ovum (turn dez tail))]~
|
||||
::
|
||||
++ ivory
|
||||
|= sys=path
|
||||
^- pill
|
||||
=/ lib (snoc (scag 3 sys) %lib)
|
||||
|^ =/ ver
|
||||
=/ sub *(trap vase)
|
||||
=. sub (build-sys sub %hoon)
|
||||
=. sub (build-sys sub %arvo)
|
||||
=. sub (build-sys sub %lull)
|
||||
=. sub (build-sys sub %zuse)
|
||||
=. sub (build-lib sub & %ethereum)
|
||||
=. sub (build-lib sub & %azimuth)
|
||||
(build-lib sub | %vere)
|
||||
=/ nok !.
|
||||
=> *[ver=(trap vase) ~]
|
||||
!= q:$:ver
|
||||
ivory/[nok ver ~]
|
||||
::
|
||||
++ build-sys
|
||||
|= [sub=(trap vase) nam=term] ^- (trap vase)
|
||||
~> %slog.[0 leaf+"ivory: building /sys/{(trip nam)}"]
|
||||
(swat sub (rain /sys/[nam]/hoon .^(@t cx+(welp sys /[nam]/hoon))))
|
||||
::
|
||||
++ build-lib
|
||||
|= [sub=(trap vase) imp=? nam=term] ^- (trap vase)
|
||||
~> %slog.[0 leaf+"ivory: building /lib/{(trip nam)}"]
|
||||
=/ hun=hoon
|
||||
%+ mist /lib/[nam]/hoon
|
||||
.^(@t cx+(welp lib /[nam]/hoon))
|
||||
?. imp (swat sub hun)
|
||||
(swel sub [%ktts nam hun])
|
||||
:: +mist: +rain but skipping past ford runes
|
||||
::
|
||||
++ mist
|
||||
|= [bon=path txt=@]
|
||||
^- hoon
|
||||
=+ vas=vast
|
||||
~| bon
|
||||
%+ scan (trip txt)
|
||||
%- full
|
||||
=; fud
|
||||
(ifix [;~(plug gay fud) gay] tall:vas(wer bon))
|
||||
%- star
|
||||
;~ pose vul
|
||||
%+ ifix [fas (just `@`10)]
|
||||
(star ;~(less (just `@`10) next))
|
||||
==
|
||||
:: +swel: +swat but with +slop
|
||||
::
|
||||
++ swel
|
||||
|= [tap=(trap vase) gen=hoon]
|
||||
^- (trap vase)
|
||||
=/ gun (~(mint ut p:$:tap) %noun gen)
|
||||
=> [tap=tap gun=gun]
|
||||
|. ~+
|
||||
=/ pro q:$:tap
|
||||
[[%cell p.gun p:$:tap] [.*(pro q.gun) pro]]
|
||||
--
|
||||
::
|
||||
++ events
|
||||
|%
|
||||
+$ prop [%prop meta tier (list ovum)]
|
||||
+$ meta term
|
||||
+$ tier ?(%fore %hind) :: before or after userspace
|
||||
::
|
||||
++ install
|
||||
|= [as=desk =beak pri=?]
|
||||
^- prop
|
||||
:^ %prop (rap 3 %install '-' as ~) %hind
|
||||
::TODO will exclude non-:directories files, such as /changelog/txt
|
||||
=- (murn - same)
|
||||
^- (list (unit ovum))
|
||||
:~ `(file-ovum as (en-beam beak /))
|
||||
::
|
||||
?. pri ~
|
||||
`(prep-ovum (en-beam beak /) ~)
|
||||
::
|
||||
`[/d/install/[as] [%seat as]]
|
||||
==
|
||||
--
|
||||
--
|
||||
|
@ -58,15 +58,15 @@ export const showBlit = (term: Terminal, blit: Blit) => {
|
||||
|
||||
export const showSlog = (term: Terminal, slog: string) => {
|
||||
// set scroll region to exclude the bottom line,
|
||||
// scroll up one line,
|
||||
// move cursor to start of the newly created whitespace,
|
||||
// move cursor to bottom left of the scroll region,
|
||||
// print a newline to move everything up a line,
|
||||
// set text to grey,
|
||||
// print the slog,
|
||||
// restore color, scroll region, and cursor.
|
||||
//
|
||||
term.write(csi('r', 1, term.rows - 1)
|
||||
+ csi('S', 1)
|
||||
+ csi('H', term.rows - 1, 1)
|
||||
+ '\n'
|
||||
+ csi('m', 90)
|
||||
+ slog
|
||||
+ csi('m', 0)
|
||||
|
@ -1,9 +1,9 @@
|
||||
:~ title+'Terminal'
|
||||
info+'A web interface to your Urbit\'s command line.'
|
||||
color+0x2e.4347
|
||||
glob-http+['https://bootstrap.urbit.org/glob-0v5.hvjci.n7c4h.1onl6.34g14.fut7c.glob' 0v5.hvjci.n7c4h.1onl6.34g14.fut7c]
|
||||
glob-http+['https://bootstrap.urbit.org/glob-0vep1vb.e09fv.h88mg.endg6.3mip6.glob' 0vep1vb.e09fv.h88mg.endg6.3mip6]
|
||||
base+'webterm'
|
||||
version+[1 1 0]
|
||||
version+[1 1 1]
|
||||
website+'https://tlon.io'
|
||||
license+'MIT'
|
||||
==
|
||||
|
@ -24,6 +24,14 @@
|
||||
++ test-hint-xray
|
||||
~> %xray.[1 leaf+"test-hint-xray ~"]
|
||||
~
|
||||
:: test that these memory-report hints
|
||||
:: are safe to run or ignore
|
||||
++ test-hilt-meme
|
||||
~> %meme
|
||||
~
|
||||
++ test-hint-meme
|
||||
~> %meme.[1 leaf+"test-hint-meme ~"]
|
||||
~
|
||||
:: test that the hilt bout hint
|
||||
:: is safe to run or ignore
|
||||
++ test-hilt-bout
|
||||
|
Loading…
Reference in New Issue
Block a user