mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 17:43:32 +03:00
Merge branch 'develop' into i/6103/ames-refactor
This commit is contained in:
commit
02f01cf14c
34
.github/workflows/develop.yml
vendored
Normal file
34
.github/workflows/develop.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Push to develop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'develop'
|
||||
paths:
|
||||
- '.github/workflows/feature.yml'
|
||||
- '.github/workflows/develop.yml'
|
||||
- '.github/workflows/release.yml'
|
||||
- '.github/workflows/master.yml'
|
||||
- '.github/workflows/vere.yml'
|
||||
- 'pkg/arvo/**'
|
||||
- 'pkg/docker-image/**'
|
||||
- 'pkg/ent/**'
|
||||
- 'pkg/ge-additions/**'
|
||||
- 'pkg/libaes_siv/**'
|
||||
- 'pkg/urbit/**'
|
||||
- 'pkg/urcrypt/**'
|
||||
- 'tests/**'
|
||||
- 'bin/**'
|
||||
- 'nix/**'
|
||||
- 'default.nix'
|
||||
|
||||
jobs:
|
||||
call-vere:
|
||||
uses: ./.github/workflows/vere.yml
|
||||
with:
|
||||
pace: 'edge'
|
||||
upload: >-
|
||||
${{
|
||||
(github.ref_name == 'next/vere' && github.ref_type == 'branch')
|
||||
}}
|
||||
secrets: inherit
|
@ -1,25 +1,12 @@
|
||||
name: build
|
||||
name: Feature pull request
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/vere.yml'
|
||||
- 'pkg/arvo/**'
|
||||
- 'pkg/docker-image/**'
|
||||
- 'pkg/ent/**'
|
||||
- 'pkg/ge-additions/**'
|
||||
- 'pkg/libaes_siv/**'
|
||||
- 'pkg/urbit/**'
|
||||
- 'pkg/urcrypt/**'
|
||||
- 'tests/**'
|
||||
- 'bin/**'
|
||||
- 'nix/**'
|
||||
- 'default.nix'
|
||||
- 'vere-version'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/feature.yml'
|
||||
- '.github/workflows/develop.yml'
|
||||
- '.github/workflows/release.yml'
|
||||
- '.github/workflows/master.yml'
|
||||
- '.github/workflows/vere.yml'
|
||||
- 'pkg/arvo/**'
|
||||
- 'pkg/docker-image/**'
|
||||
@ -32,13 +19,12 @@ on:
|
||||
- 'bin/**'
|
||||
- 'nix/**'
|
||||
- 'default.nix'
|
||||
- 'vere-version'
|
||||
|
||||
jobs:
|
||||
call-vere:
|
||||
uses: ./.github/workflows/vere.yml
|
||||
with:
|
||||
pace: 'edge' # XX s/b once?
|
||||
pace: 'edge'
|
||||
upload: >-
|
||||
${{
|
||||
(github.ref_name == 'next/vere' && github.ref_type == 'branch')
|
34
.github/workflows/master.yml
vendored
Normal file
34
.github/workflows/master.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Push to master
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- '.github/workflows/feature.yml'
|
||||
- '.github/workflows/develop.yml'
|
||||
- '.github/workflows/release.yml'
|
||||
- '.github/workflows/master.yml'
|
||||
- '.github/workflows/vere.yml'
|
||||
- 'pkg/arvo/**'
|
||||
- 'pkg/docker-image/**'
|
||||
- 'pkg/ent/**'
|
||||
- 'pkg/ge-additions/**'
|
||||
- 'pkg/libaes_siv/**'
|
||||
- 'pkg/urbit/**'
|
||||
- 'pkg/urcrypt/**'
|
||||
- 'tests/**'
|
||||
- 'bin/**'
|
||||
- 'nix/**'
|
||||
- 'default.nix'
|
||||
|
||||
jobs:
|
||||
call-vere:
|
||||
uses: ./.github/workflows/vere.yml
|
||||
with:
|
||||
pace: 'live'
|
||||
upload: >-
|
||||
${{
|
||||
(github.ref_name == 'next/vere' && github.ref_type == 'branch')
|
||||
}}
|
||||
secrets: inherit
|
34
.github/workflows/release.yml
vendored
Normal file
34
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Push to release branch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'release/*'
|
||||
paths:
|
||||
- '.github/workflows/feature.yml'
|
||||
- '.github/workflows/develop.yml'
|
||||
- '.github/workflows/release.yml'
|
||||
- '.github/workflows/master.yml'
|
||||
- '.github/workflows/vere.yml'
|
||||
- 'pkg/arvo/**'
|
||||
- 'pkg/docker-image/**'
|
||||
- 'pkg/ent/**'
|
||||
- 'pkg/ge-additions/**'
|
||||
- 'pkg/libaes_siv/**'
|
||||
- 'pkg/urbit/**'
|
||||
- 'pkg/urcrypt/**'
|
||||
- 'tests/**'
|
||||
- 'bin/**'
|
||||
- 'nix/**'
|
||||
- 'default.nix'
|
||||
|
||||
jobs:
|
||||
call-vere:
|
||||
uses: ./.github/workflows/vere.yml
|
||||
with:
|
||||
pace: 'soon'
|
||||
upload: >-
|
||||
${{
|
||||
(github.ref_name == 'next/vere' && github.ref_type == 'branch')
|
||||
}}
|
||||
secrets: inherit
|
11
.github/workflows/vere.yml
vendored
11
.github/workflows/vere.yml
vendored
@ -39,11 +39,6 @@ on:
|
||||
- soon
|
||||
- live
|
||||
|
||||
env:
|
||||
UPLOAD_BASE: bootstrap.urbit.org/vere
|
||||
VERE_PACE: ${{ inputs.pace }}
|
||||
VERSION_TYPE: ${{ (inputs.pace == 'soon' || inputs.pace == 'live') && 'real' || 'hash' }}
|
||||
|
||||
jobs:
|
||||
urbit:
|
||||
strategy:
|
||||
@ -78,8 +73,10 @@ jobs:
|
||||
name: run urbit-tests
|
||||
run: |
|
||||
cp -RL tests pkg/arvo/tests
|
||||
vere="$(cat ./vere-version | sed -e 's/\([^ ]*\) \([^ ]*\)/\1\/\2\/vere-\2/g' | tr -d '\n')"
|
||||
url="$(echo https://bootstrap.urbit.org/vere/${vere}-linux-x86_64)"
|
||||
vere=$(curl https://bootstrap.urbit.org/vere/${{ inputs.pace }}/last)
|
||||
echo $vere
|
||||
url="$(echo https://bootstrap.urbit.org/vere/${{ inputs.pace }}/v${vere}/vere-v${vere}-linux-x86_64)"
|
||||
echo $url
|
||||
# put in .jam so it doesn't crash when it gets -A'd in
|
||||
curl -Lo pkg/arvo/vere.jam "$url"
|
||||
chmod +x pkg/arvo/vere.jam
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4066cd90ac7d33b3d96b1b4d611d846d941de6e538c8355047c7cafcadce0851
|
||||
size 6017832
|
||||
oid sha256:9d0ff563027d47436d12f00b7500352ec844a1db7d336b0e5b9cfd5c4c49c66c
|
||||
size 6017943
|
||||
|
@ -17,7 +17,7 @@ in stdenvNoCC.mkDerivation {
|
||||
buildPhase = ''
|
||||
set -xeuo pipefail
|
||||
|
||||
${arvo}/vere.jam ${lib.concatStringsSep " " args} ./pier
|
||||
${arvo}/vere.jam ${lib.concatStringsSep " " args} -c ./pier
|
||||
|
||||
cleanup () {
|
||||
if [ -f ./pier/.vere.lock ]; then
|
||||
|
@ -801,8 +801,8 @@
|
||||
=/ heads=(list [tako desk])
|
||||
%+ turn ~(tap in desks)
|
||||
|= =desk
|
||||
=+ .^(=dome %cv /(scot %p our.bowl)/[desk]/(scot %da now.bowl))
|
||||
=/ =tako (~(got by hit.dome) let.dome)
|
||||
=+ .^(=domo %cv /(scot %p our.bowl)/[desk]/(scot %da now.bowl))
|
||||
=/ =tako (~(got by hit.domo) let.domo)
|
||||
[tako desk]
|
||||
=/ yakis=(set yaki)
|
||||
%- silt
|
||||
|
@ -16,6 +16,6 @@
|
||||
?> ((sane %tas) +<.arg)
|
||||
[-.arg +<.arg]
|
||||
=+ .^(=cone:clay %cx /(scot %p p.bec)//(scot %da now)/domes)
|
||||
=/ =foam:clay (~(gut by cone) [p.bec des] *foam:clay)
|
||||
=+ ((slog ?:(=(%live liv.foam) ~ ['kiln: desk not live' ~])) ~)
|
||||
[%kiln-rein des (~(put by ren.foam) dap &)]
|
||||
=/ =dome:clay (~(gut by cone) [p.bec des] *dome:clay)
|
||||
=+ ((slog ?:(=(%live liv.dome) ~ ['kiln: desk not live' ~])) ~)
|
||||
[%kiln-rein des (~(put by ren.dome) dap &)]
|
||||
|
@ -13,7 +13,7 @@
|
||||
=/ =lobe u.fil.arch
|
||||
=+ .^(=rang %cx /(scot %p p.bec)//(scot %da now)/rang)
|
||||
=+ .^(=cone %cx /(scot %p p.bec)//(scot %da now)/domes)
|
||||
=/ domes=(list [[=ship =desk] foam]) ~(tap by cone)
|
||||
=/ domes=(list [[=ship =desk] dome]) ~(tap by cone)
|
||||
=/ norms
|
||||
|^
|
||||
|- ^- (set [ship desk tako norm path])
|
||||
@ -30,7 +30,7 @@
|
||||
(~(uni in paths) $(aeon +(aeon)))
|
||||
::
|
||||
++ draw-tako
|
||||
|= [=ship =desk foam =tako]
|
||||
|= [=ship =desk dome =tako]
|
||||
^- (set [^ship ^desk ^tako norm path])
|
||||
~+
|
||||
=/ =yaki (~(got by hut.rang) tako)
|
||||
|
@ -8,7 +8,7 @@
|
||||
%- flop ^- tang
|
||||
%- zing
|
||||
%+ turn ~(tap by cone)
|
||||
|= [[=ship =desk] foam]
|
||||
|= [[=ship =desk] dome]
|
||||
:- leaf+"{<ship>}/{<desk>}:"
|
||||
%+ turn ~(tap of nor)
|
||||
|= [=path keep=?]
|
||||
|
@ -807,10 +807,16 @@
|
||||
::
|
||||
++ poke-uninstall
|
||||
|= loc=desk
|
||||
?~ got=(~(get by sources) loc)
|
||||
=+ .^(=rock:tire %cx /(scot %p our)//(scot %da now)/tire)
|
||||
?~ got=(~(get by rock) loc)
|
||||
abet:(spam leaf+"desk does not exist: {<loc>}" ~)
|
||||
?: =(+<:got %dead)
|
||||
abet:(spam leaf+"desk not installed: {<loc>}" ~)
|
||||
~> %slog.(fmt "uninstalling {<loc>}")
|
||||
=. ..on-init (emit %pass /kiln/uninstall %arvo %c %zest loc %dead)
|
||||
(poke-unsync loc u.got)
|
||||
?~ sync=(~(get by sources) loc)
|
||||
abet
|
||||
(poke-unsync loc u.sync)
|
||||
::
|
||||
++ poke-unmount
|
||||
|= mon=kiln-unmount
|
||||
|
@ -1 +1 @@
|
||||
[%zuse 415]
|
||||
[%zuse 414]
|
||||
|
@ -4217,12 +4217,19 @@
|
||||
$(inx +(inx))
|
||||
==
|
||||
|- ^- ?
|
||||
?: =(0 b) &
|
||||
=+ cur=(end 3 b)
|
||||
?: =(inx len) &
|
||||
=+ cur=(cut 3 [inx 1] b)
|
||||
?: &((lth cur 32) !=(10 cur)) |
|
||||
=+ len=(teff cur)
|
||||
?& |(=(1 len) =+(i=1 |-(|(=(i len) &((gte (cut 3 [i 1] b) 128) $(i +(i)))))))
|
||||
$(b (rsh [3 len] b))
|
||||
=+ tef=(teff cur)
|
||||
?& ?| =(1 tef)
|
||||
=+ i=1
|
||||
|- ^- ?
|
||||
?|
|
||||
=(i tef)
|
||||
?& (gte (cut 3 [(add i inx) 1] b) 128)
|
||||
$(i +(i))
|
||||
== == ==
|
||||
$(inx +(inx))
|
||||
==
|
||||
::
|
||||
++ ruth :: biblical sanity
|
||||
@ -5312,7 +5319,7 @@
|
||||
--
|
||||
++ ag
|
||||
|%
|
||||
++ ape |*(fel=rule ;~(pose (cold 0 (just '0')) fel))
|
||||
++ ape |*(fel=rule ;~(pose (cold `@`0 (just '0')) fel))
|
||||
++ bay (ape (bass 16 ;~(plug qeb:ab (star ;~(pfix dog qib:ab)))))
|
||||
++ bip =+ tod=(ape qex:ab)
|
||||
(bass 0x1.0000 ;~(plug tod (stun [7 7] ;~(pfix dog tod))))
|
||||
|
@ -3,7 +3,7 @@
|
||||
!:
|
||||
=> ..part
|
||||
|%
|
||||
++ lull %326
|
||||
++ lull %325
|
||||
:: :: ::
|
||||
:::: :: :: (1) models
|
||||
:: :: ::
|
||||
@ -834,17 +834,34 @@
|
||||
[%worn =ship =desk =tako =norm] :: set commit norm
|
||||
[%seek =ship =desk =cash] :: fetch source blobs
|
||||
== ::
|
||||
+$ cone (map [ship desk] foam) :: domes
|
||||
+$ foam ::
|
||||
$: dome ::
|
||||
tom=(map tako norm) ::
|
||||
nor=norm ::
|
||||
liv=zest ::
|
||||
ren=(map dude:gall ?) ::
|
||||
+$ cone (map [ship desk] dome) :: domes
|
||||
::
|
||||
:: Desk state.
|
||||
::
|
||||
:: Includes a checked-out ankh with current content, most recent version, map
|
||||
:: of all version numbers to commit hashes (commits are in hut.rang), and map
|
||||
:: of labels to version numbers.
|
||||
::
|
||||
:: `mim` is a cache of the content in the directories that are mounted
|
||||
:: to unix. Often, we convert to/from mime without anything really
|
||||
:: having changed; this lets us short-circuit that in some cases.
|
||||
:: Whenever you give an `%ergo`, you must update this.
|
||||
::
|
||||
+$ dome
|
||||
$: let=aeon :: top id
|
||||
hit=(map aeon tako) :: versions by id
|
||||
lab=(map @tas aeon) :: labels
|
||||
tom=(map tako norm) :: tomb policies
|
||||
nor=norm :: default policy
|
||||
mim=(map path mime) :: mime cache
|
||||
fod=flue :: ford cache
|
||||
wic=(map weft yoki) :: commit-in-waiting
|
||||
liv=zest :: running agents
|
||||
ren=rein :: force agents on/off
|
||||
== ::
|
||||
+$ crew (set ship) :: permissions group
|
||||
+$ dict [src=path rul=real] :: effective permission
|
||||
+$ dome :: project state
|
||||
+$ domo :: project state
|
||||
$: let=@ud :: top id
|
||||
hit=(map @ud tako) :: changes by id
|
||||
lab=(map @tas @ud) :: labels
|
||||
@ -1107,6 +1124,30 @@
|
||||
::
|
||||
+$ flow (map leak [refs=@ud =soak])
|
||||
::
|
||||
:: Per-desk ford cache
|
||||
::
|
||||
:: Spill is the set of "roots" we have into the global ford cache.
|
||||
:: We add a root for everything referenced directly or indirectly on
|
||||
:: a desk, then invalidate them on commit only if their dependencies
|
||||
:: change.
|
||||
::
|
||||
:: Sprig is a fast-lookup index over the global ford cache. The only
|
||||
:: goal is to make cache hits fast.
|
||||
::
|
||||
+$ flue [spill=(set leak) sprig=(map mist [=leak =soak])]
|
||||
::
|
||||
:: Ford build without content.
|
||||
::
|
||||
+$ mist
|
||||
$% [%file =path]
|
||||
[%nave =mark]
|
||||
[%dais =mark]
|
||||
[%cast =mars]
|
||||
[%tube =mars]
|
||||
[%vale =path]
|
||||
[%arch =path]
|
||||
==
|
||||
::
|
||||
:: $pile: preprocessed hoon source file
|
||||
::
|
||||
:: /- sur-file :: surface imports from /sur
|
||||
@ -1564,9 +1605,8 @@
|
||||
::
|
||||
[%scry ~]
|
||||
:: respond with the @p the requester is authenticated as
|
||||
:: TODO: put this back in when we burn the next kelvin
|
||||
::
|
||||
:: [%name ~]
|
||||
[%name ~]
|
||||
:: respond with the default file not found page
|
||||
::
|
||||
[%four-oh-four ~]
|
||||
|
@ -138,7 +138,7 @@
|
||||
:: `sto` stores the data needed to merge, and `bas` is the base
|
||||
:: beak for the merge.
|
||||
::
|
||||
+$ melt [bas=beak con=(list [beak germ]) sto=(map beak (unit dome:clay))]
|
||||
+$ melt [bas=beak con=(list [beak germ]) sto=(map beak (unit domo))]
|
||||
::
|
||||
:: Domestic desk state.
|
||||
::
|
||||
@ -153,30 +153,6 @@
|
||||
fiz=melt :: state for mega merges
|
||||
==
|
||||
::
|
||||
:: Desk state.
|
||||
::
|
||||
:: Includes a checked-out ankh with current content, most recent version, map
|
||||
:: of all version numbers to commit hashes (commits are in hut.rang), and map
|
||||
:: of labels to version numbers.
|
||||
::
|
||||
:: `mim` is a cache of the content in the directories that are mounted
|
||||
:: to unix. Often, we convert to/from mime without anything really
|
||||
:: having changed; this lets us short-circuit that in some cases.
|
||||
:: Whenever you give an `%ergo`, you must update this.
|
||||
::
|
||||
+$ dome
|
||||
$: let=aeon :: top id
|
||||
hit=(map aeon tako) :: versions by id
|
||||
lab=(map @tas aeon) :: labels
|
||||
tom=(map tako norm) :: tomb policies
|
||||
nor=norm :: default policy
|
||||
mim=(map path mime) :: mime cache
|
||||
fod=flue :: ford cache
|
||||
wic=(map weft yoki) :: commit-in-waiting
|
||||
liv=zest :: running agents
|
||||
ren=rein :: force agents on/off
|
||||
== ::
|
||||
::
|
||||
:: Over-the-wire backfill request/response
|
||||
::
|
||||
+$ fill
|
||||
@ -191,30 +167,6 @@
|
||||
[%1 peg=(unit page)]
|
||||
==
|
||||
::
|
||||
:: Per-desk ford cache
|
||||
::
|
||||
:: Spill is the set of "roots" we have into the global ford cache.
|
||||
:: We add a root for everything referenced directly or indirectly on
|
||||
:: a desk, then invalidate them on commit only if their dependencies
|
||||
:: change.
|
||||
::
|
||||
:: Sprig is a fast-lookup index over the global ford cache. The only
|
||||
:: goal is to make cache hits fast.
|
||||
::
|
||||
+$ flue [spill=(set leak) sprig=(map mist [=leak =soak])]
|
||||
::
|
||||
:: Ford build without content.
|
||||
::
|
||||
+$ mist
|
||||
$% [%file =path]
|
||||
[%nave =mark]
|
||||
[%dais =mark]
|
||||
[%cast =mars]
|
||||
[%tube =mars]
|
||||
[%vale =path]
|
||||
[%arch =path]
|
||||
==
|
||||
::
|
||||
:: New desk data.
|
||||
::
|
||||
:: Sent to other ships to update them about a particular desk.
|
||||
@ -2289,9 +2241,9 @@
|
||||
|= [bas=beak con=(list [beak germ])]
|
||||
^- melt
|
||||
:+ bas con
|
||||
%- ~(gas by *(map beak (unit dome:clay)))
|
||||
:- [bas *(unit dome:clay)]
|
||||
(turn con |=(a=[beak germ] [-.a *(unit dome:clay)]))
|
||||
%- ~(gas by *(map beak (unit domo)))
|
||||
:- [bas *(unit domo)]
|
||||
(turn con |=(a=[beak germ] [-.a *(unit domo)]))
|
||||
::
|
||||
++ start-fuse
|
||||
|= [bas=beak con=(list [beak germ])]
|
||||
@ -2314,7 +2266,7 @@
|
||||
=/ discarded=tang
|
||||
%+ turn
|
||||
~(tap in sto.fiz)
|
||||
|= [k=beak v=(unit dome:clay)]
|
||||
|= [k=beak v=(unit domo)]
|
||||
^- tank
|
||||
=/ received=tape ?~(v "missing" "received")
|
||||
leaf+"{<(en-beam k ~)>} {received}"
|
||||
@ -2341,17 +2293,17 @@
|
||||
((slog [leaf+"clay: got strange fuse response {<msg>}"]~) ..take-fuse)
|
||||
=. fiz
|
||||
:+ bas.fiz con.fiz
|
||||
(~(put by sto.fiz) bec `!<(dome:clay q.r.u.riot))
|
||||
(~(put by sto.fiz) bec `!<(domo q.r.u.riot))
|
||||
=/ all-done=flag
|
||||
%- ~(all by sto.fiz)
|
||||
|= res=(unit dome:clay)
|
||||
|= res=(unit domo)
|
||||
^- flag
|
||||
!=(res ~)
|
||||
?. all-done
|
||||
..take-fuse
|
||||
=| rag=rang
|
||||
=/ clean-state ..take-fuse
|
||||
=/ initial-dome=dome:clay (need (~(got by sto.fiz) bas.fiz))
|
||||
=/ initial-dome=domo (need (~(got by sto.fiz) bas.fiz))
|
||||
=/ next-yaki=yaki
|
||||
(~(got by hut.ran) (~(got by hit.initial-dome) let.initial-dome))
|
||||
=/ parents=(list tako) ~[(~(got by hit.initial-dome) let.initial-dome)]
|
||||
@ -2362,7 +2314,7 @@
|
||||
=. ..take-fuse (done-fuse clean-state %& ~)
|
||||
(park | & [%| next-yaki(p (flop parents))] rag)
|
||||
=/ [bec=beak g=germ] i.merges
|
||||
=/ ali-dom=dome:clay (need (~(got by sto.fiz) bec))
|
||||
=/ ali-dom=domo (need (~(got by sto.fiz) bec))
|
||||
=/ result (merge-helper p.bec q.bec g ali-dom `next-yaki)
|
||||
?- -.result
|
||||
%|
|
||||
@ -2428,10 +2380,10 @@
|
||||
^+ ..merge
|
||||
?~ riot
|
||||
(done %| %ali-unavailable ~[>[ali-ship ali-desk germ]<])
|
||||
=/ ali-dome=dome:clay
|
||||
=/ ali-dome=domo
|
||||
?: &(?=(@ -.q.q.r.u.riot) !=(~ -.q.q.r.u.riot))
|
||||
!<(dome:clay q.r.u.riot)
|
||||
+:!<([* dome:clay] q.r.u.riot)
|
||||
!<(domo q.r.u.riot)
|
||||
+:!<([* domo] q.r.u.riot)
|
||||
=/ result=(each (unit merge-result) (pair term tang))
|
||||
(merge-helper ali-ship ali-desk germ ali-dome ~)
|
||||
?- -.result
|
||||
@ -2447,7 +2399,7 @@
|
||||
+$ merge-result [conflicts=(set path) new=yoki lat=(map lobe page)]
|
||||
::
|
||||
++ merge-helper
|
||||
|= [=ali=ship =ali=desk =germ ali-dome=dome:clay next-yaki=(unit yaki)]
|
||||
|= [=ali=ship =ali=desk =germ ali-dome=domo next-yaki=(unit yaki)]
|
||||
^- (each (unit merge-result) [term tang])
|
||||
|^
|
||||
^- (each (unit merge-result) [term tang])
|
||||
@ -4324,17 +4276,17 @@
|
||||
::
|
||||
++ read-v
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit [%dome (hypo dome:clay)]))
|
||||
^- (unit (unit [%dome (hypo domo)]))
|
||||
?: (lth yon let.dom)
|
||||
:* ~ ~ %dome -:!>(*dome:clay)
|
||||
^- dome:clay
|
||||
:* ~ ~ %dome -:!>(*domo)
|
||||
^- domo
|
||||
:* let=yon
|
||||
hit=(molt (skim ~(tap by hit.dom) |=([p=@ud *] (lte p yon))))
|
||||
lab=(molt (skim ~(tap by lab.dom) |=([* p=@ud] (lte p yon))))
|
||||
== ==
|
||||
?: (gth yon let.dom)
|
||||
~
|
||||
``[%dome -:!>(*dome:clay) [let hit lab]:dom]
|
||||
``[%dome -:!>(*domo) [let hit lab]:dom]
|
||||
::
|
||||
:: Gets all cases refering to the same revision as the given case.
|
||||
::
|
||||
@ -5654,19 +5606,19 @@
|
||||
%- ~(gas by *cone)
|
||||
%+ turn ~(tap by dos.rom.ruf)
|
||||
|= [=desk =dojo]
|
||||
[[our desk] [[let hit lab] tom nor liv ren]:dom.dojo]
|
||||
[[our desk] dom.dojo]
|
||||
=. domes
|
||||
%- ~(uni by domes)
|
||||
%- ~(gas by *cone)
|
||||
^- (list [[ship desk] foam])
|
||||
^- (list [[ship desk] dome])
|
||||
%- zing
|
||||
^- (list (list [[ship desk] foam]))
|
||||
^- (list (list [[ship desk] dome]))
|
||||
%+ turn ~(tap by hoy.ruf)
|
||||
|= [=ship =rung]
|
||||
^- (list [[^ship desk] foam])
|
||||
^- (list [[^ship desk] dome])
|
||||
%+ turn ~(tap by rus.rung)
|
||||
|= [=desk =rede]
|
||||
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
|
||||
[[ship desk] dom.rede]
|
||||
``[%domes !>(`cone`domes)]
|
||||
::
|
||||
++ cult
|
||||
|
@ -75,32 +75,6 @@
|
||||
::
|
||||
=server-state
|
||||
==
|
||||
::
|
||||
:: +outstanding-connection-new: intermediate type to enable
|
||||
:: /~/name endpoint without
|
||||
:: breaking type change in lull
|
||||
::
|
||||
+$ outstanding-connection-new
|
||||
$: :: action: the action that had matched
|
||||
::
|
||||
action=action-new
|
||||
:: inbound-request: the original request which caused this connection
|
||||
::
|
||||
=inbound-request
|
||||
:: response-header: set when we get our first %start
|
||||
::
|
||||
response-header=(unit response-header:http)
|
||||
:: bytes-sent: the total bytes sent in response
|
||||
::
|
||||
bytes-sent=@ud
|
||||
==
|
||||
:: +action-new: intermediate type to enable /~/name endpoint
|
||||
:: without breaking type change in lull
|
||||
::
|
||||
+$ action-new
|
||||
$% action
|
||||
[%name ~]
|
||||
==
|
||||
:: +server-state: state relating to open inbound HTTP connections
|
||||
::
|
||||
+$ server-state
|
||||
@ -113,13 +87,13 @@
|
||||
:: TODO: It would be nice if we had a path trie. We could decompose
|
||||
:: the :binding into a (map (unit @t) (trie knot =action)).
|
||||
::
|
||||
bindings=(list [=binding =duct action=action-new])
|
||||
bindings=(list [=binding =duct =action])
|
||||
:: cors-registry: state used and managed by the +cors core
|
||||
::
|
||||
=cors-registry
|
||||
:: connections: open http connections not fully complete
|
||||
::
|
||||
connections=(map duct outstanding-connection-new)
|
||||
connections=(map duct outstanding-connection)
|
||||
:: authentication-state: state managed by the +authentication core
|
||||
::
|
||||
=authentication-state
|
||||
@ -606,7 +580,7 @@
|
||||
::
|
||||
=/ act [%app app=%lens]
|
||||
::
|
||||
=/ connection=outstanding-connection-new
|
||||
=/ connection=outstanding-connection
|
||||
[act [& secure address request] ~ 0]
|
||||
::
|
||||
=. connections.state
|
||||
@ -630,13 +604,13 @@
|
||||
(fall (forwarded-for u.forwards) address)
|
||||
::
|
||||
=/ host (get-header:http 'host' headers)
|
||||
=/ [action=action-new suburl=@t]
|
||||
=/ [=action suburl=@t]
|
||||
(get-action-for-binding host url.request)
|
||||
::
|
||||
=/ authenticated (request-is-logged-in:authentication request)
|
||||
:: record that we started an asynchronous response
|
||||
::
|
||||
=/ connection=outstanding-connection-new
|
||||
=/ connection=outstanding-connection
|
||||
[action [authenticated secure address request] ~ 0]
|
||||
=. connections.state
|
||||
(~(put by connections.state) duct connection)
|
||||
@ -1962,7 +1936,7 @@
|
||||
(session-cookie-string u.session-id &)
|
||||
headers.response-header.http-event
|
||||
::
|
||||
=/ connection=outstanding-connection-new
|
||||
=/ connection=outstanding-connection
|
||||
(~(got by connections.state) duct)
|
||||
:: if the request was a simple cors request from an approved origin
|
||||
:: append the necessary cors headers to the response
|
||||
@ -1998,7 +1972,7 @@
|
||||
::
|
||||
=. connections.state
|
||||
%+ ~(jab by connections.state) duct
|
||||
|= connection=outstanding-connection-new
|
||||
|= connection=outstanding-connection
|
||||
=+ size=?~(data.http-event 0 p.u.data.http-event)
|
||||
connection(bytes-sent (add bytes-sent.connection size))
|
||||
::
|
||||
@ -2051,7 +2025,7 @@
|
||||
:: Adds =binding =action if there is no conflicting bindings.
|
||||
::
|
||||
++ add-binding
|
||||
|= [=binding action=action-new]
|
||||
|= [=binding =action]
|
||||
^- [(list move) server-state]
|
||||
=^ success bindings.state
|
||||
:: prevent binding in reserved namespaces
|
||||
@ -2072,7 +2046,7 @@
|
||||
%_ state
|
||||
bindings
|
||||
%+ skip bindings.state
|
||||
|= [item-binding=^binding item-duct=^duct action=action-new]
|
||||
|= [item-binding=^binding item-duct=^duct =action]
|
||||
^- ?
|
||||
&(=(item-binding binding) =(item-duct duct))
|
||||
==
|
||||
@ -2080,7 +2054,7 @@
|
||||
::
|
||||
++ get-action-for-binding
|
||||
|= [raw-host=(unit @t) url=@t]
|
||||
^- [action=action-new suburl=@t]
|
||||
^- [=action suburl=@t]
|
||||
:: process :raw-host
|
||||
::
|
||||
:: If we are missing a 'Host:' header, if that header is a raw IP
|
||||
@ -2193,8 +2167,8 @@
|
||||
:: +insert-binding: add a new binding, replacing any existing at its path
|
||||
::
|
||||
++ insert-binding
|
||||
|= $: new=[=binding =duct action=action-new]
|
||||
bindings=(list [=binding =duct action=action-new])
|
||||
|= $: new=[=binding =duct =action]
|
||||
bindings=(list [=binding =duct =action])
|
||||
==
|
||||
^+ bindings
|
||||
?~ bindings [new]~
|
||||
@ -2257,7 +2231,7 @@
|
||||
::
|
||||
=. bindings.server-state.ax
|
||||
=- (roll - insert-binding)
|
||||
^- (list [binding ^duct action-new])
|
||||
^- (list [binding ^duct action])
|
||||
:~ [[~ /~/login] duct [%authentication ~]]
|
||||
[[~ /~/logout] duct [%logout ~]]
|
||||
[[~ /~/channel] duct [%channel ~]]
|
||||
@ -2635,31 +2609,6 @@
|
||||
--
|
||||
::
|
||||
++ http-server-gate ..$
|
||||
:: +bindings-old: filter /~/name endpoint from bindings
|
||||
::
|
||||
++ bindings-old
|
||||
|= new=(list [b=binding d=duct a=action-new])
|
||||
=| old=(list [binding duct action])
|
||||
|- ^+ old
|
||||
?~ new old
|
||||
=/ l
|
||||
?: ?=([%name ~] a.i.new)
|
||||
old
|
||||
(snoc old [b.i.new d.i.new a.i.new])
|
||||
$(new t.new, old l)
|
||||
:: +connections-old: filter /~/name endpoint from connections
|
||||
::
|
||||
++ connections-old
|
||||
|= new=(map duct outstanding-connection-new)
|
||||
=| old=(map duct outstanding-connection)
|
||||
=/ l=(list [d=duct o=outstanding-connection-new]) ~(tap by new)
|
||||
|- ^+ old
|
||||
?~ l old
|
||||
=/ x
|
||||
?: ?=([%name ~] -.o.i.l)
|
||||
old
|
||||
(~(put by old) d.i.l o.i.l)
|
||||
$(l t.l, old x)
|
||||
:: +load: migrate old state to new state (called on vane reload)
|
||||
::
|
||||
++ load
|
||||
@ -2714,9 +2663,9 @@
|
||||
=* who p.why
|
||||
?: =(tyl /whey)
|
||||
=/ maz=(list mass)
|
||||
:~ bindings+&+(bindings-old bindings.server-state.ax)
|
||||
:~ bindings+&+bindings.server-state.ax
|
||||
auth+&+authentication-state.server-state.ax
|
||||
connections+&+(connections-old connections.server-state.ax)
|
||||
connections+&+connections.server-state.ax
|
||||
channels+&+channel-state.server-state.ax
|
||||
axle+&+ax
|
||||
==
|
||||
@ -2756,8 +2705,8 @@
|
||||
?. ?=(%$ ren)
|
||||
[~ ~]
|
||||
?+ syd [~ ~]
|
||||
%bindings ``noun+!>((bindings-old bindings.server-state.ax))
|
||||
%connections ``noun+!>((connections-old connections.server-state.ax))
|
||||
%bindings ``noun+!>(bindings.server-state.ax)
|
||||
%connections ``noun+!>(connections.server-state.ax)
|
||||
%authentication-state ``noun+!>(authentication-state.server-state.ax)
|
||||
%channel-state ``noun+!>(channel-state.server-state.ax)
|
||||
::
|
||||
|
@ -4,7 +4,7 @@
|
||||
=> ..lull
|
||||
~% %zuse ..part ~
|
||||
|%
|
||||
++ zuse %415
|
||||
++ zuse %414
|
||||
:: :: ::
|
||||
:::: :: :: (2) engines
|
||||
:: :: ::
|
||||
|
@ -14,8 +14,8 @@
|
||||
=/ [b-path=path shallow=flag] ?:(?=([^ *] b) b [`path`b |])
|
||||
=/ a-beam (need (de-beam a-path))
|
||||
=/ b-beam (need (de-beam b-path))
|
||||
;< a-dome=dome bind:m (get-from-clay a-beam dome %v)
|
||||
;< b-dome=dome bind:m (get-from-clay b-beam dome %v)
|
||||
;< a-domo=domo bind:m (get-from-clay a-beam domo %v)
|
||||
;< b-domo=domo bind:m (get-from-clay b-beam domo %v)
|
||||
;< diffs=(list diff-type) bind:m (diff-beams a-beam b-beam)
|
||||
%- pure:m
|
||||
!> ^- tang
|
||||
|
@ -73,9 +73,9 @@
|
||||
?~ sink [hash]~
|
||||
(mergebase-hashes our syd now her.u.sink sud.u.sink)
|
||||
=/ dek (~(got by tyr) syd)
|
||||
=/ =foam (~(got by cone) our syd)
|
||||
=/ =dome (~(got by cone) our syd)
|
||||
=/ [on=(list [@tas ?]) of=(list [@tas ?])]
|
||||
(skid ~(tap by ren.foam) |=([* ?] +<+))
|
||||
(skid ~(tap by ren.dome) |=([* ?] +<+))
|
||||
=/ sat
|
||||
?- zest.dek
|
||||
%live "running"
|
||||
@ -130,7 +130,7 @@
|
||||
=/ syd (scot %tas desk)
|
||||
=/ yon (scot %ud aeon)
|
||||
::
|
||||
=/ dom .^(dome cv/~[her syd yon])
|
||||
=/ dom .^(domo cv/~[her syd yon])
|
||||
=/ tak ~| aeons=~(key by hit.dom)
|
||||
(scot %uv (~(got by hit.dom) aeon))
|
||||
=/ yak .^(yaki cs/~[her syd yon %yaki tak])
|
||||
|
Loading…
Reference in New Issue
Block a user