-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 in the behavior of file!()
when using workspaces
#47462
Comments
I suspect this is a regression from stable to beta, but I will double check. |
This is a regression from stable to beta, not nightly. |
To reproduce: Cargo.toml:
bar/tests/foo.rs:
|
Yes this is an intentional (yet unfortunate) change on behalf of rust-lang/cargo#4788. This has caused a fair bit of unintended breakage, although it's not clear to me whether we should back it out or not regardless (it's fixing a longstanding bug and an underlying reproducibility bug in Cargo). @sgrif is it possible to update the usage of |
Sure, I could hard code the paths. I think that it's a completely reasonable expectation that |
@sgrif just to make sure you understand the ramifications of the existing bug:
Relying on |
Sure, and we can definitely update Diesel to avoid using it. This seems like unfortunate breakage given the stability guarantees (I know they don't technically apply to Cargo, but I doubt the general Rust user is aware of that)
To be honest, I had always assumed it was absolute until I encountered this change. |
Er sorry my point is to not say we "definitely should not revert" but rather to point out that this reliance on We of course have stability guarantees with Cargo, but I figured you may want a heads up regardless to "there may be bugs lurking here" independent of anything. |
Yes, this has definitely made me aware of the issues with it (as have previous cases involving |
@alexcrichton So am I correct that we expect to take no further action on this issue? |
@Mark-Simulacrum that is my personal preference, yes. IIRC @rust-lang/cargo discussed this issue in a broader sense but we didn't reach a conclusion. |
1.24 has shipped and I don't think this'll get reverted, so closing |
I'm not sure if this is a Rust issue or a Cargo issue, but since it manifests using
file!()
I figured I'd raise it here. I'm not sure when the actual regression occurred, as it was previously masked in our build by #47139.The change we're seeing is that
file!()
is now returning a path relative to the root of the workspace, rather than the root of the project. This specifically breaks our tests which have code like:The text was updated successfully, but these errors were encountered: