bevyengine / bevyengine/bevy

`BevyManifest` behaves wrong in doctest

Open
#10,645 2 comments 0 reactions 0 assignees View on GitHub
C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

`main` branch

## What you did

Did a doc test where I derive and the derive proc macro uses `BevyManifest` to get the path to `bevy_render`

## What went wrong

After a lot of dark magic with panicing to debug a proc derive macro, I have now seen whats going on there.

When having a doc test with a proc macro, the manifest loads the path `crate::` but it should be `bevy_render::` because the doctest is it's own crate.

Contributor guide

Open the contributing guide

Research direction

Start by locating the BevyManifest implementation and reproducing the reported proc-macro doctest with bevy_render. Trace how the manifest resolves the crate path in a doctest versus a regular crate. Done means the doctest resolves bevy_render:: rather than crate::, with a regression test if the existing test structure supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.