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

Creates target/doc in the wrong directory #38

Closed
dpc opened this issue Mar 23, 2023 · 4 comments
Closed

Creates target/doc in the wrong directory #38

dpc opened this issue Mar 23, 2023 · 4 comments

Comments

@dpc
Copy link

dpc commented Mar 23, 2023

When used in in a sub-crate of a larger workspace, when running cargo test a file is created:

./<sub-crate-dir>/target/doc/mermaid.min.js

instead of expected ./target/doc/mermaid.min.js for the whole workspace.

Seems to be caused by:

let docs_dir = Path::new("./target/doc");

Possibly CARGO_TARGET_DIR should be used instead as per https://doc.rust-lang.org/cargo/reference/environment-variables.html ?

@frehberg
Copy link
Collaborator

thanks for filing the issue. You are right "cargo test" should not generate the file target/doc/mermaid.min.js.

In fact the file should be created only and only if invoking "cargo doc"

No file should be created invoking "cargo test" as the tests do not require the JS package.

frehberg added a commit to frehberg/aquamarine that referenced this issue Apr 6, 2023
@frehberg
Copy link
Collaborator

frehberg commented Apr 14, 2023

Fixing this issue https://github.com/mersinvald/aquamarine/pull/36/commits

  • extract into target/doc/MERMAID_FILE only if target/doc exists (created when calling "cargo doc")
  • do not extract if target/doc/MERMAID_FILE already exists

@frehberg
Copy link
Collaborator

has been fixed in newly released version 0.3.1
https://crates.io/crates/aquamarine/0.3.1

@frehberg
Copy link
Collaborator

as with release aquamarine 0.3.1 this issue has been solved

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

No branches or pull requests

2 participants