-
Notifications
You must be signed in to change notification settings - Fork 77
Description
paths
is pretty useful but the guide is very short. I had three documentation-related issues trying to use paths:
-
There are no sample invocations in the guide. In my test program (twiggy instructions at end of Cargo.toml) I found the function names were long and complex, like
<rand_chacha::chacha::ChaCha12Core as rand_core::block::BlockRngCore>::generate::h9a7082d79612fe9d
. If I type that entire thing in as the function name, including the::h9a708…
part, paths works. But at first I did not realize theh9a7082d79612fe9d
was part of the effective function name and was trying to search for things likegenerate
or<rand_chacha::chacha::ChaCha12Core as rand_core::block::BlockRngCore>::generate
.The guide shows the output of a search for
wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e
, but does not show the invocation used to get the output. Just having seen thetwiggy paths pkg/input.wasm wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e
sample invocation would have helped for me. -
The command line interface subsections (all of them) do not document arguments. I was trying to figure out if there was a way to search substrings or patterns, and it did not occur to me to look in the
--help
because I was looking at the web page and I assumed anything in the--help
would also be in the web page. In fact--help
contains information on arguments whereas the web page does not. I wound up searching the issues before discovering the invaluable--regex
argument. Even a line saying "for information on arguments see twiggy paths --help" or whatever in the command sub-page would have at least kept me from tricking myself into thinking I had seen all the documentation. -
Neither
--help
nor the web page documents the definition of a regex from your program's perspective. For basic regexes this doesn't much matter, but many regex libraries/implementations differ in details or additional features. A link to the docs for whatever regex library you would be adequate.
🙌 Are you interested in implementing this feature?
Unfortunately not sure I understand the program well enough yet to write documentation… :)