Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide should fully document paths #706

Open
mcclure opened this issue May 21, 2023 · 1 comment
Open

Guide should fully document paths #706

mcclure opened this issue May 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mcclure
Copy link

mcclure commented May 21, 2023

paths is pretty useful but the guide is very short. I had three documentation-related issues trying to use paths:

  1. 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 the h9a7082d79612fe9d was part of the effective function name and was trying to search for things like generate 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 the twiggy paths pkg/input.wasm wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e sample invocation would have helped for me.

  2. 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.

  3. 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… :)

@AlexEne AlexEne added the enhancement New feature or request label May 22, 2023
@AlexEne
Copy link
Collaborator

AlexEne commented May 22, 2023

Thanks for opening this!

On the PR side, anything helps. So if there are small changes you would have found useful in the guide (or even help arguments), I'm happy to merge them or help you through this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants