Skip to content

Conversation

@Themelok
Copy link
Contributor

Summary

Fixes #295

When creating a new project with hyphens in the name using sf new some-new-project, the generated Cargo.toml was using the hyphenated name for the library target, causing compilation to fail with:

error: failed to parse manifest at `Cargo.toml`

Caused by:
  library target names cannot contain hyphens

@graphite-app graphite-app bot requested a review from stegaBOB November 12, 2025 13:22
@graphite-app
Copy link

graphite-app bot commented Nov 12, 2025

Graphite Automations

"Star Frame: Request reviewers" took an action on this PR • (11/12/25)

1 reviewer was added to this PR based on Brett Etter's automation.

Copy link
Member

@stegaBOB stegaBOB left a comment

Choose a reason for hiding this comment

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

Looks good! Eventually we're going to want to migrate to an actual templating library. Would probably make sense to use cargo_generate like how dioxus and other cli tools do it: https://github.com/DioxusLabs/dioxus/blob/bd2d1de873ae9c0e7c4656ec0c991ea9aafd3293/packages/cli/src/cli/init.rs#L89

For now though, this looks good to me!

@stegaBOB
Copy link
Member

@Themelok can you add a changelog entry for this PR too? Thanks

@Themelok Themelok force-pushed the bugfix/295-cli-library-name-hyphens branch from 58c427a to 818798a Compare November 17, 2025 12:31
@stegaBOB stegaBOB merged commit d33737a into staratlasmeta:main Nov 17, 2025
8 checks passed
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.

CLI: Library names with hyphens fail to compile

2 participants