Commit Graph

6317 Commits

Author SHA1 Message Date
drbeefsupreme
0fbdd6808a dprint: refactor some printing logic
for maintainability
2022-11-29 14:23:57 -05:00
drbeefsupreme
df45bfbf84 hoon: ~master-morzod comments on doccords
TODO items from a pairing session
2022-11-23 17:46:53 -05:00
drbeefsupreme
387ae3e780 hoon: remove +vil
leftover from doccords :: syntax change no longer needed
2022-11-23 14:02:13 -05:00
drbeefsupreme
1fed185c29 dprint: refactor +find-item-in-type &co
+find-item-in-type and everything it called was pretty bad spaghetti and
it wasn't clear that it was doing this right thing besides that it
passed tests. this refactors most of that functionality into a door that
has the type and search terms as the sample, and should be much easier
to follow.

the remaining functionality related to arm docs ought to be refactored
as well
2022-11-22 17:59:31 -05:00
drbeefsupreme
1a69393df7 dprint: arms that build cores return core items
this makes it so that when an arm matches a search query in
+find-item-in-type, it checks to see if the arm builds a core with an
arm other than %$. if so, a %core item is returned rather than an %arm
item.

the name of the core will then be considered to be the name of the arm
that builds it
2022-11-21 17:20:28 -05:00
drbeefsupreme
64f64307f3 dprint: +find-item-in-type core name=summary
since cores can't be given names in v0 doccords, this changes the main
search function in lib/dprint to check if the summary of a core
description matches the search term, along with other appropriate
changes downstream of this.

still to be done: use .name in a %core item for either this summary name
or the name of the arm that built the core, if appropriate
2022-11-21 16:04:25 -05:00
drbeefsupreme
244d0d2b24 hoon: change apse:docs to parse as a $note
this is to handle potential future cases where doccords might be kinds
of notes other than %help notes. example: #6085 to document invariants
in clay.

$whit (used for apex:docs/batch comments) also ought to be changed but
im still thinking about what that should look like.
2022-11-18 13:53:10 -05:00
drbeefsupreme
06a7daa16f hoon: change %dict spec to %gist
no semantic changes. %dict was a temporary name
2022-11-16 10:58:10 -05:00
drbeefsupreme
618fc0fe5a Merge branch 'next/arvo' into jon/doccords 2022-11-15 18:34:10 -05:00
drbeefsupreme
c11d11e415 deco: revision to account for :: doccords syntax
see 2d5b29c73b
2022-11-15 18:25:57 -05:00
drbeefsupreme
f4a84caf30 hoon, dprint: remove |% and |@ core names
partial revert of 3d3ea61d53, which introduced core names by completing
an unimplemented feature that was already present in hoon.hoon. we've
decided to remove this for the initial launch since it violates the
principle of least surprise for the name of a core to end up in its
$garb and yet only be used for doccords, as opposed to something like a
wing resolution. it was also confusing that this only worked for |% and
|@.

this breaks two of the tests for the dprint library, which have been
commented out. these tests ought to be restored once dprint is rewritten
in order to implement a different way to refer to cores not built by arms
2022-11-15 18:25:57 -05:00
drbeefsupreme
bd69f09285 gen: add todo item to +help for doccords 2022-11-15 18:25:57 -05:00
drbeefsupreme
5fc3b3fd0f hoon, dprint: change doccords syntax to ::
this constitutes a pretty major rework of how whitespace is handled in
hoon in order to change the doccords syntax from :> and :< to ::.

in summary: throughout the hoon parser (+vast) many instances of +gap
have been replaced by +jump, which first tries to remove whitespace (+leap)
until it arrives at something that can be parsed as a prefix
doccord (+apex:docs:vast). if it does not encounter a doccord, it
instead uses +gap as normal.

if you follow along with the parser, you will notice that every time
jump is called, it then tries to call +apex:docs via +scye or +seam. if
apex:docs succeeds, it will end up consuming a newline at the end,
hiding the fact that there was valid whitespace from the parser. thus
+apex:docs then inserts a newline after successfully parsing a prefix
doccord, which will then be consumed by a subsequent invocation of +gap,
ensuring that there was proper whitespace if the doccord would have been
consumed by +gap instead of +leap.

there are a few other changes:

+hint in the compiler throws out doccords attached to %noun types. this
was already the behavior before doccords, and the change was made before
i understood what i was doing.

similarly for commenting out the %note case in +open:ap - this was an
earlier mistake

postfix comments for chapters are now enabled.

+expx was unused and removed in order to be rid of the
convention-defying +exp1. other unused +ex(p/q)* were commented out.

arms that handle batch comments (+glow and +whap) were refactored

+toad, which was used to change between tall and wide form, tries to
+jump before +gap. since +jump is ;~(pose leap:docs gap), i would have
thought that just using +jump there would be fine, but it fails for some
reason.

some parsers built with |@ were rewritten to use |*

|$ was made so that any doccords put on the spec are converted into hoon
doccords on the $ arm. it wouldn't compile otherwise. there's probably a
more principled way to do this but it works fine for now.
2022-11-15 18:25:29 -05:00
jose
1b4f045499
Merge pull request #6046 from urbit/lf/fix-cork
ames: prevent crashes when corking an alien flow
2022-11-15 08:43:46 +01:00
yosoyubik
3b5110ed1d ames: enqueue %cork in alien-agenda 2022-11-09 16:05:45 +01:00
Liam Fitzgerald
26aac7581a ames: prevent crashes when corking an alien flow
The +on-cork handler asserts that the peer is known to us. This is the
incorrect behaviour, because it will crash when corking a flow to a peer
that is still an %alien. This can happen, for instance, when making a
gall subscription for the first time and then corking it before the
alien naturalises.
2022-11-01 15:50:10 +10:00
Jared Tobin
3c0279af05
tests: add +apt:in test for set w/dupes 2022-10-27 08:50:13 +04:00
dachus
b0dedeecfe fix 2022-10-26 11:26:23 -06:00
dr-frmr
7563937e1f get full userspace desk 2022-09-29 14:43:31 -06:00
dr-frmr
29c10540aa make %swap-files poke use file-ovum properly 2022-09-29 14:29:28 -06:00
fang
bdf9f9d044
Merge pull request #5929 from urbit/jon/remove-dork
clay: remove $dork
2022-09-15 22:23:56 +02:00
fang
92d1b4c300
Merge pull request #5990 from xiphiness/patch-2
dojo dir validation: %ct scry at case da+now if imaginary case 0
2022-09-15 22:23:09 +02:00
fang
16f78af00a
Merge pull request #5982 from urbit/m/eyre-head-down
eyre: look for lowercase last-event-id header
2022-09-15 22:22:32 +02:00
fang
6abe91cd9c
Merge pull request #5808 from dnmfarrell/dnmfarrell/arvo-test-dont-require-a-list
pkg: -test shouldn't require a list of paths
2022-09-15 22:20:15 +02:00
Philip Monk
3eda93cac3
Merge pull request #5360 from urbit/m/new-desk
gen: add |new-desk for creating minimal desks
2022-09-15 11:20:31 -08:00
Edward Amsden
105710d54e
clay: remove stack tracing 2022-09-14 19:28:17 -05:00
Edward Amsden
4f8c851ef7
Don't print a stack trace for read-at-aeon-fail
We shouldn't get a clay stack trace for read-at-aeon-fail because that gives us miles of clay stack trace whenever hoon compilation fails
2022-09-14 19:26:21 -05:00
fang
50ee2eb1c0
Merge pull request #5951 from urbit/pkova/dns-race
dns-address: subscribe before poke and fix wire mismatch
2022-09-07 19:41:14 +02:00
xiphiness
2bc2d5a1bb
dojo dir validation: %ct scry at case da+now if imaginary case 0
PR #5840 mostly fixed #1559, but introduced a new bug. before, you could safely `=dir` into a desk without a case, and it would use the nonexistent case `ud+0` as the beam for dojo state, and switch that out for da+now whenever it tries to resolve the current path. but this check causes it to fail, because `ud+0` is a nonexistent case. this uses he-beam to transform the beam in the conditional to see if the case is 0, and if it is, changes the case to da+now before it scries
2022-09-06 16:24:22 -05:00
fang
108c6253d3
Merge branch 'philip/nuke' into next/arvo 2022-09-06 22:25:19 +02:00
fang
f46d8dd557
Merge pull request #5974 from urbit/m/recork-slower
ames: bump recork timer back up to a day
2022-09-06 22:18:14 +02:00
fang
bc597c25ef
Merge pull request #5978 from urbit/philip/nuke
gall: don't add duplicate nonce in +ap-nuke
2022-09-06 22:17:49 +02:00
fang
7a4034f48a
Merge pull request #5977 from urbit/m/cork-undone
ames, gall: no %done on corks
2022-09-06 22:17:34 +02:00
fang
9c931f844b
Merge pull request #5976 from urbit/m/ames-restir
ames: clean & re-set recork timer during %stir
2022-09-06 22:17:18 +02:00
fang
36dd2f8ace
Merge branch 'next/arvo' into m/recork-slower 2022-09-06 22:16:41 +02:00
fang
e22b198dea
Merge pull request #5972 from urbit/ted/grq-test-2
tests: ames+gall subscribe/kick/resubscribe sequence
2022-09-06 22:15:47 +02:00
fang
fec3c45d30
Merge pull request #5971 from urbit/jb/recork-error
ames: handle failed recork timers
2022-09-06 22:15:12 +02:00
fang
53cc33b291
eyre: look for lowercase last-event-id header
Eyre always gets passed request headers in lowercase, so we should search for
the lowercased version of the header.

Arguably `+get-header` should lowercase keys before comparing them, but that's
a more serious behavioral change.
2022-08-30 16:44:11 +02:00
Philip Monk
4bef3277d5 azimuth: remove :azimuth|kick 2022-08-29 10:57:47 -08:00
Philip Monk
1ce53d06ba gall: don't add duplicate nonce in +ap-nuke
This gets added in +ap-handle-peers.  This caused outgoing subscriptions
to not get cleaned up properly.

Issue introduced in c2d77a5d.
2022-08-25 13:29:51 -08:00
fang
ab75e83398
gall: don't enqueue %cork as outstanding
Ames will no longer send acks. Consider it completed immediately, and
clean up the outstanding queue whenever it's empty.
2022-08-25 18:14:40 +02:00
fang
0e5b3b4107
ames: don't give %done on cork
Locally, %cork is guaranteed to succeed instantly. The requesting vane
doesn't need an ack to safely consider the flow "closed".
2022-08-25 18:13:29 +02:00
Ted Blackman
5fb20a57cb tests: give %cork ack to gall 2022-08-25 16:36:14 +03:00
Ted Blackman
9b2f95b7b3 ames: revert added debug print 2022-08-25 16:36:14 +03:00
Ted Blackman
80c5172490 tests: check for correct subscription nonce 2022-08-25 16:36:14 +03:00
Ted Blackman
5ee16c38a1 tests: ames+gall full subscribe+clog+kick+resubscribe sequence 2022-08-25 16:36:14 +03:00
Ted Blackman
f558ad4348 tests: more steps, subscriber ames now sends %cork 2022-08-25 16:36:14 +03:00
Ted Blackman
59d71ecbc9 tests: remove defunct test library 2022-08-25 16:36:14 +03:00
Ted Blackman
15861150ba /lib/test/ames-gall: clean up lanes 2022-08-25 16:36:14 +03:00
Ted Blackman
c67a358308 tests: helper core to avoid repeated metamorphoses 2022-08-25 16:36:14 +03:00