You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying this project out on one of my projects and I ran into this issue. Some of the code snippets in my book use derive macros from bevy like.
use bevy::prelude::*;
#[derive(Default, Component)]
struct ComponentA;
Apparently these macros are written to look for CARGO_MANIFEST_DIR in the env, which wasn't found when compiling with $ mdbook build book, resulting in errors like the following:
- Test: getting-started.md_line_1 (Failed to compile)
--------------- Start of Test Log: getting-started.md_line_1 ---------------
No stdout was captured.
----- Stderr -----
error: proc-macro derive panicked
--> /home/trouv/projects/bevy_ecs_ldtk/book/doctest_cache/keeper_u2A0TkIqkB_MFOpJSd2QQMhrWmM5g-Zm2WlddxCS79Q.rs:25:19
|
25 | #[derive(Default, Component)]
| ^^^^^^^^^
|
= help: message: called `Option::unwrap()` on a `None` value
Setting CARGO_MANIFEST_DIR manually seems to fix the issue for me:
$ CARGO_MANIFEST_DIR=. mdbook build book
Curious if setting this could just be a part of mdbook-keeper since I'm already providing a manifest_dir in the book.toml?
The text was updated successfully, but these errors were encountered:
I've been trying this project out on one of my projects and I ran into this issue. Some of the code snippets in my book use derive macros from
bevy
like.Apparently these macros are written to look for
CARGO_MANIFEST_DIR
in the env, which wasn't found when compiling with$ mdbook build book
, resulting in errors like the following:Setting
CARGO_MANIFEST_DIR
manually seems to fix the issue for me:Curious if setting this could just be a part of
mdbook-keeper
since I'm already providing amanifest_dir
in thebook.toml
?The text was updated successfully, but these errors were encountered: