Conversation
9364718 to
ef6dfe1
Compare
ef6dfe1 to
f69ae67
Compare
lzrd
left a comment
There was a problem hiding this comment.
Having a more helpful error message for archives where hiffy net feature is not configured is my only suggestion.
| if !core.is_net() { | ||
| let hiffy = if core.is_net() { | ||
| if let Some(hiffy_task) = hubris.lookup_task("hiffy") | ||
| && hubris.does_task_have_feature(hiffy_task, "net").unwrap() |
There was a problem hiding this comment.
Does/Can this error case give useful guidance to the user? e.g. "hiffy_task is not configured with net feature".
(Looking for other unwraps() that cold be more helpful in common failure cases...)
There was a problem hiding this comment.
That unwrap can't fail once we've found hiffy_task. I've rewritten this to be more clear.
| let buf_size = self | ||
| .hubris | ||
| .manifest | ||
| .get_socket_by_task("hiffy") |
There was a problem hiding this comment.
nit: (symbolic constants vs. literals) HIFFY_TASK_NAME? I know we're not going to change this and the function is get_socket_by_task(), but if there are enough "hiffy" names and symbols in different contexts it helps to know what kind of hiffy we are talking about.
There was a problem hiding this comment.
I'm ambivalent – HIFFY_TASK_NAME is marginally more clear, but replacing "hiffy" with HIFFY_TASK_NAME everywhere in this file just makes a bunch of lines slightly longer (forcing one large block to reflow to the next indent level).
This is the Humility side of oxidecomputer/hubris#2466
It adds a third backend to execute
hiffyprograms over the network; the three backends are nowtask-hiffyon the SPudprpcudprpcover the networkhiffy(new!)hiffyarrays are done over the network using a new sockettask-hiffyon the SPWe abstract over the debugger and network-attached
hiffywith a newenum HiffyWriteto write tohiffyarrays, instead of callingHubrisCorefunctions directly. Network-attachedudprpcremains a special case, because it can only handle a subset of HIF programs (ones that only useSend-flavored functions).