Skip to content

ci: When autopublishing, remove xtask from workspace #19919

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

ShoyuVanilla
Copy link
Member

@ShoyuVanilla ShoyuVanilla commented Jun 4, 2025

c.c #19903

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 4, 2025
@ShoyuVanilla ShoyuVanilla requested a review from lnicola June 4, 2025 04:54
@lnicola
Copy link
Member

lnicola commented Jun 4, 2025

Should we also revert the other change, then?

@ShoyuVanilla
Copy link
Member Author

Should we also revert the other change, then?

Yes, I think that's reasonable

@lnicola lnicola enabled auto-merge June 4, 2025 05:11
@lnicola lnicola disabled auto-merge June 4, 2025 05:12
# Remove library crates from the workspaces so we don't auto-publish them as well
sed -i 's/ "lib\/\*",//' ./Cargo.toml
# Remove library crates and xtask from the workspaces so we don't auto-publish them as well
sed -i 's/ "lib\/\*",//; s/ "xtask\/",//' ./Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to do it this way because there's no space before xtask. The order doesn't matter though.

Suggested change
sed -i 's/ "lib\/\*",//; s/ "xtask\/",//' ./Cargo.toml
sed -i 's/"xtask\\/",//; s/ "lib\/\*",//' ./Cargo.toml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good catch!

Revert `cargo-workspaces` version fix
@lnicola lnicola enabled auto-merge June 4, 2025 05:21
@lnicola lnicola added this pull request to the merge queue Jun 4, 2025
Merged via the queue into rust-lang:master with commit 0c1272d Jun 4, 2025
14 checks passed
@ShoyuVanilla
Copy link
Member Author

ShoyuVanilla commented Jun 4, 2025

sed: -e expression #1, char 15: unknown option to `s'

Argh, sed in CI is not receiving ; 😢
The escape character was wrong. Sorry

@lnicola
Copy link
Member

lnicola commented Jun 4, 2025

sed -i 's|"xtask/", "lib/\*", ||' Cargo.toml works, but we can also take this from the other workflow:

          # Only publish the crates under lib/
          sed -i 's|^members = .*$|members = ["lib/*"]|' Cargo.toml

I was sure I made this change before, that's why.

@lnicola
Copy link
Member

lnicola commented Jun 4, 2025

I see now that sed -i 's/"xtask\\/",//; s/ "lib\/\*",//' ./Cargo.toml is missing a \, but it actually worked for me in fish.

EDIT: no, not missing, an extra one.

@ShoyuVanilla
Copy link
Member Author

Yes, that seems better.

sed -i 's/"xtask\\/",//; s/ "lib\/\*",//' ./Cargo.toml
                ^ This redundant backslash is the problem

@ShoyuVanilla
Copy link
Member Author

Opened #19920 😅

@ShoyuVanilla ShoyuVanilla deleted the patch-1 branch June 4, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants