Skip to content

Conversation

@tarcieri
Copy link
Member

To make the replacement workspace-level Cargo.toml a little easier to edit, this attempts writing it with a heredoc and interpolating $(pwd) into it.

The config now includes an empty [workspace.lints] section so the lints.workspace = true configuration in each crate's Cargo.toml actually still functions.

To make the replacement workspace-level Cargo.toml a little easier to
edit, this attempts writing it with a heredoc and interpolating `$(pwd)`
into it.

The config now includes an empty `[workspace.lints]` section so the
`lints.workspace = true` configuration in each crate's Cargo.toml
actually still functions.
@tarcieri tarcieri requested a review from newpavlov January 21, 2026 01:24
with:
toolchain: ${{ inputs.nightly }}
# Replace Cargo.toml at the workspace-level with a stub which still allows workspace-level configs to function
- run: printf "[workspace]\nmembers=[\"%q\"]" $(pwd) > ../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.

So %q isn't right anyway, it's shell escaping whereas we need the input quoted.

But right now the real issue is just getting it to template a configuration that actually works.

@tarcieri tarcieri merged commit b83390d into master Jan 21, 2026
1 check passed
@tarcieri tarcieri deleted the minimal-versions/use-heredoc-to-write-cargo-toml branch January 21, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants