[Proposal] Alternate configuration schema #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'd like to suggest the following configuration schema for
uri_runner
:The idea is that you'd assert each
ActionHandler
separately touri_runner
, which would internally bring them all together; and you'd assert dataspaces to listen forXdgOpen
messages separately, so that (1)uri_runner
doesn't have to have a sturdyref to the dataspace inside it, it can have all its extrinsic authority passed in, and (2) you can listen on multiple dataspaces for requests.Then, you could have a
uri_runner.pr
like this:or even
in order to allow dynamic adding/removal of handlers from the surrounding dataspace.
Another small change that might be worthwhile is to use something like
allowing e.g.
but I'm not sure if this particular little template language pays for itself properly...
This answers a question that I hadn't thought to ask yet, in some other experiments I have asserted lists of items when I should assert each item seperately. I suppose that a rule of thumb would be not to assert lists unless the list items form some context with each other.
Originally I had a dictionary of pattern keys to action values, but that would be inconsistent because there is nothing to stop multiple instances of the uri_runner to match multipe actions to a single pattern.
I was assuming there was an implicitly exposed dataspace over stdio, but with this is what I missing. Now I understand relays better.
This would work but I think the Nim type system would make it complicated to handle. The submatch index is a good idea, I may do that for #4.