diff options
author | Vincent Ambo <mail@tazj.in> | 2021-12-17T18·17+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-12-17T20·48+0000 |
commit | cecc249c961735c9a9bd0c8d60e5fec7e4ac3b70 (patch) | |
tree | 6213bbdebc699ca3940349a471f80f69676f7cfe /users/wpcarro/keys.nix | |
parent | 564ad52b306bc1a3abe2afa9380bb0552144b23e (diff) |
feat(tools/magrathea): add weirdly overengineered target spec parser r/3287
i'm not sure what happened here, but it works (yes, the fancy target printing is completely unnecessary, but oh well): #;152> (parse-target "foo") #target(foo) #;153> (parse-target "//foo") #target(//foo) #;154> (parse-target "//foo/bar") #target(//foo/bar) #;155> (parse-target "//foo/bar/") #target(//foo/bar) #;156> (parse-target "//foo/bar:baz") #target(//foo/bar:baz) #;157> (parse-target "//foo/bar/:baz") #target(//foo/bar:baz) #;158> (parse-target "//foo/bar:") (error . "unexpected end of input while parsing virtual target") #;159> (parse-target "//foo//") (error . "unexpected root-anchor while parsing normal target") the most notable thing is that trailing slashes are allowed in the physical targets, since people may be autocompleting these on the shell from folder names. Change-Id: I32975ad77fe2a327130dc9574011fe92cce49f84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4393 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/keys.nix')
0 files changed, 0 insertions, 0 deletions