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

fix(script): Don't override the release profile #14925

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(script): Don't override the release profile
This has been around since #12224 and isn't in the RFC, so its being
removed.

This is part of #12207.
epage committed Dec 11, 2024
commit ab7469e3b8fea6d7e7febe5d278d570254142e78
19 changes: 0 additions & 19 deletions src/cargo/util/toml/embedded.rs
Original file line number Diff line number Diff line change
@@ -141,19 +141,6 @@ fn expand_manifest_(
toml::Value::Array(vec![toml::Value::Table(bin)]),
);

let release = manifest
.entry("profile".to_owned())
.or_insert_with(|| toml::Value::Table(Default::default()))
.as_table_mut()
.ok_or_else(|| anyhow::format_err!("`profile` must be a table"))?
.entry("release".to_owned())
.or_insert_with(|| toml::Value::Table(Default::default()))
.as_table_mut()
.ok_or_else(|| anyhow::format_err!("`profile.release` must be a table"))?;
release
.entry("strip".to_owned())
.or_insert_with(|| toml::Value::Boolean(true));

Ok(manifest)
}

@@ -588,9 +575,6 @@ build = false
edition = "2024"
name = "test-"

[profile.release]
strip = true

[workspace]

"#]]
@@ -626,9 +610,6 @@ build = false
edition = "2024"
name = "test-"

[profile.release]
strip = true

[workspace]

"#]]