Open alexanderjophus opened 1 week ago
I'm reading cargo-metadata, but nothing is jumping out at me to say "this is a workspace" vs "this is a standalone package.
Maybe checking the length of workspace_members, and if there's only 1 checking if it matches the workspace_root?
I'm thinking of use cases/edge cases though;
dx new
- their current directory is outside any cargo workspace
cargo fmt
as well as the rest of the flowdx new
- their current directory is a multi-crate cargo workspace
dx new
- their current directory is a single rust crate
Feature Request
When creating a new project with
dx new
, after the directory is createdcargo fmt
is ran. If this is in a workspace where the user has not pre-added the crate to workspace members list, the user is presented with a cargo fmt error message.Everything else runs fine, and the command has an exit code of 0, as everything is fine, it just looks worrying.
Implement Suggestion
Not sure how possible it is, currently investigating, but if the user is in a workspace either