Open
Description
Problem
While adding new members with cargo new member_name
in a workspace, the members list should be updated with the new member being added.
Current implementation sorts the members list upon adding new member. Prefix of " "(an empty space) gets added before name of each member/display_path resulting in improper formatted output of members list.
Executing mentioned steps should result in Cargo.toml file as below
[workspace]
members = [ "crates/lib_auth","crates/lib_core"]
The members list have inconsistent format.
Correct Format:
[workspace]
members = ["crates/lib_auth", "crates/lib_core"]
Steps
- mkdir work_space
- cd work_space
- echo "[workspace]" > Cargo.toml
- cargo new crates/lib_core
- cargo new crates/lib_auth
Possible Solution(s)
Format the members list which is Array struct of toml_edit
lib.
I have fixed the issue and have raised the PR.
Notes
No response
Version
cargo 1.84.0 (66221abde 2024-11-19)
release: 1.84.0
commit-hash: 66221abdeca2002d318fde6efff516aab091df0e
commit-date: 2024-11-19
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Arch Linux [64-bit]