foundry
foundry copied to clipboard
`forge doc --build --root <PATH>` --prefix not found error
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (28b2ae6 2023-03-04T00:10:50.272293Z)
What command(s) is the bug in?
forge docs
Operating System
macOS (Intel)
Describe the bug
forge docs
subcommand states the support of --root
argument.
However, when trying to provide one, the execution fails:
I get the same error too, when running the command: forge doc --build --out ./documentation
I just hit this running the following command:
forge doc --out ./_site
Interestingly this does not occur when I remove the dot-slash as a workaround:
forge doc --out _site
In our case, we realized the issue is that the root of our forge
project is not the git
root. We have the forge project in the ./contracts
folder. Our workaround for the issue is to add remappings to the root of the git repository, and then run forge doc
for the full repo. This is not ideal, since we may have multiple forge projects in the same repo in the future, and would like the ability to build the docs separately.
https://github.com/risc0/risc0-ethereum/pull/111/files
I spent some time trying to figure out exactly where this error is coming from, but have so far not figured it out. The fact that this mitigation works is some new evidence, but I haven't had a chance yet to re-investigate.