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

Unclear documentation for mdbook test -L #1585

Closed
finegeometer opened this issue Jun 24, 2021 · 0 comments · Fixed by #1586
Closed

Unclear documentation for mdbook test -L #1585

finegeometer opened this issue Jun 24, 2021 · 0 comments · Fixed by #1586

Comments

@finegeometer
Copy link

After reading your documentation, I was led to an incorrect understanding of how to use the --library-path option for mdbook test.

What it says:

The --library-path (-L) option allows you to add directories to the library
search path used by rustdoc when it builds and tests the examples. Multiple
directories can be specified with multiple options (-L foo -L bar) or with a
comma-delimited list (-L foo,bar).

What I thought it meant:

Pass the cargo workspace as an argument. (e.g. -L project/)

What it actually meant:

Pass the compilation artifacts as an argument. (e.g. -L project/target/debug/deps/)

How I found out what it actually meant:

  • I looked through the code, until I determined that it repasses the argument to rustdoc.
  • I looked at the rustdoc guide, which contained an example that corrected my misconception.

It looks like the person who wrote this issue had the same misconception that I did.

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

Successfully merging a pull request may close this issue.

1 participant