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

regression: change in paths/CWD for rustdoc tests #132203

Closed
Mark-Simulacrum opened this issue Oct 26, 2024 · 3 comments · Fixed by #132210
Closed

regression: change in paths/CWD for rustdoc tests #132203

Mark-Simulacrum opened this issue Oct 26, 2024 · 3 comments · Fixed by #132210
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum Mark-Simulacrum added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 26, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.83.0 milestone Oct 26, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 26, 2024
@ehuss
Copy link
Contributor

ehuss commented Oct 26, 2024

This seems to have changed via #130582 (cc @notriddle). Reproduction:

src/lib.rs:

#![doc = include_str!("../README.md")]

README.md:

```rust
let x = include_bytes!("../examples/foo");
```

examples/foo: empty file

@saethlin saethlin removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 27, 2024
…k, r=GuillaumeGomez

rustdoc: make doctest span tweak a 2024 edition change

Fixes rust-lang#132203

This is a compatibility hack, because I think the new behavior is better. When an A `include_str!` B, and B `include_str!` C, the path to C should be resolved relative to B, not A. That's how `include!` itself works, so that's how `include_str!` with should work.
@apiraino
Copy link
Contributor

Ok, removing the prioritization label as it is in T-rustdoc territory and it is being already nicely handled.

@rustbot label -I-prioritize

@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 30, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Oct 30, 2024
…ack, r=GuillaumeGomez

rustdoc: make doctest span tweak a 2024 edition change

Fixes rust-lang#132203

This is a compatibility hack, because I think the new behavior is better. When an A `include_str!` B, and B `include_str!` C, the path to C should be resolved relative to B, not A. That's how `include!` itself works, so that's how `include_str!` with should work.
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Oct 30, 2024
…ack, r=GuillaumeGomez

rustdoc: make doctest span tweak a 2024 edition change

Fixes rust-lang#132203

This is a compatibility hack, because I think the new behavior is better. When an A `include_str!` B, and B `include_str!` C, the path to C should be resolved relative to B, not A. That's how `include!` itself works, so that's how `include_str!` with should work.
@bors bors closed this as completed in 1819b4f Oct 31, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 31, 2024
Rollup merge of rust-lang#132210 - notriddle:notriddle/doctest-span-hack, r=GuillaumeGomez

rustdoc: make doctest span tweak a 2024 edition change

Fixes rust-lang#132203

This is a compatibility hack, because I think the new behavior is better. When an A `include_str!` B, and B `include_str!` C, the path to C should be resolved relative to B, not A. That's how `include!` itself works, so that's how `include_str!` with should work.
@fmease fmease marked this as a duplicate of #133824 Dec 4, 2024
@MarijnS95
Copy link
Contributor

MarijnS95 commented Dec 10, 2024

Should this have regression-from-stable-to-stable Performance or correctness regression from one stable version to another. , given that this regression trickled into the 1.83 release (#133824)? Or is that not added retroactively for closed issues, even if other issues are closed as a duplicate of this closed issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants