-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Change in resolution of relative paths in doctest included with #[doc = include_str(...)] in 1.83.0 #133824
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-doctests
Area: Documentation tests, run by rustdoc
C-bug
Category: This is a bug.
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
andrewhickman
added
C-bug
Category: This is a bug.
regression-untriaged
Untriaged performance or correctness regression.
labels
Dec 3, 2024
rustbot
added
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Dec 3, 2024
andrewhickman
added a commit
to andrewhickman/prost-reflect
that referenced
this issue
Dec 3, 2024
Workaround for rust-lang/rust#133824
andrewhickman
added a commit
to andrewhickman/prost-reflect
that referenced
this issue
Dec 3, 2024
* Fix lints * Fix lint * Correct MSRV in README to match value in changelog, CI and Cargo.toml * Update dependencies * Fix build in 1.83.0 Workaround for rust-lang/rust#133824
fmease
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Dec 3, 2024
jieyouxu
added
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Dec 3, 2024
(Sorry label raced) |
fmease
added
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
and removed
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Dec 3, 2024
jieyouxu
removed
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Dec 3, 2024
After manual checkout: Indeed, fixed on beta (1.84). Sorry for the inconvenience. |
fmease
added
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
and removed
regression-untriaged
Untriaged performance or correctness regression.
labels
Dec 3, 2024
rustbot
added
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Dec 3, 2024
fmease
removed
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Dec 3, 2024
This was referenced Dec 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-doctests
Area: Documentation tests, run by rustdoc
C-bug
Category: This is a bug.
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
When using attribute an attribute like
#[doc = include_str("../doc/docs.md")]
to include documentation from a file, if the file contains doctests, the resolution of relative paths in the test at compile time has changed. For example, ifdoc/docs.md
usesinclude_bytes!
, previously the path would need to be relative to the file containing#[doc]
, but in 1.82.0, it is relative todocs/docs.md
.This is easily worked around by using absolute paths like
concat!(env!("CARGO_MANIFEST_DIR"), "/src/foo")
, and I don't know if this behaviour is actually defined anywhere, but I thought I'd report it anyway.Code
A minimal reproduction of this issue is here: https://github.com/andrewhickman/doctestissue. The doctest in this repo passes in 1.82.0 but fails to compile in 1.83.0 with
Version it worked on
Rust 1.82.0 runs the doctest in the reproduction successfully
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: