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

Remove note about fixed cargo bug #3105

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Feb 6, 2025

rust-lang/cargo#10358 has been fixed, we probably no longer want to call it out.

The fix will be part of 1.86, so we can delay merging the PR until that, if important.

@bugadani bugadani added the skip-changelog No changelog modification needed label Feb 6, 2025
@MabezDev
Copy link
Member

MabezDev commented Feb 6, 2025

Should we also remove the work around we did in esp-config?

@bjoernQ
Copy link
Contributor

bjoernQ commented Feb 6, 2025

I was too slow .... yes should we remove it:

// A work-around for https://github.com/rust-lang/cargo/issues/10358
// This can be removed when https://github.com/rust-lang/cargo/pull/14058 is merged.
// Unlikely to work on projects in workspaces
#[cfg(not(test))]
fn env_change_work_around<W: Write>(stdout: &mut W) {
let mut out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
// We clean out_dir by removing all trailing directories, until it ends with
// target
while !out_dir.ends_with("target") {
if !out_dir.pop() {
return; // We ran out of directories...
}
}
out_dir.pop();
let dotcargo = out_dir.join(".cargo/");
if dotcargo.exists() {
if dotcargo.join("config.toml").exists() {
writeln!(
stdout,
"cargo:rerun-if-changed={}",
dotcargo.join("config.toml").display()
)
.ok();
}
if dotcargo.join("config").exists() {
writeln!(
stdout,
"cargo:rerun-if-changed={}",
dotcargo.join("config").display()
)
.ok();
}
}
}

Wouldn't hurt to keep it however

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants