Skip to content
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

Errors when building the cargo-generate template #81

Open
ameba23 opened this issue May 17, 2024 · 1 comment
Open

Errors when building the cargo-generate template #81

ameba23 opened this issue May 17, 2024 · 1 comment

Comments

@ameba23
Copy link
Contributor

ameba23 commented May 17, 2024

As @JesseAbram posted on discord, whenever projects made with the cargo-generate template are built, we get the following errors:

error: invalid character `{` in package name: `{{project-name}}`, the first character must be a Unicode XID start character (most letters or `_`)
 --> ../../../../.cargo/git/checkouts/programs-aa3402a6c25553e3/78c6dd7/templates/basic-template/Cargo.toml:2:8
  |
2 | name = "{{project-name}}"
  |        ^^^^^^^^^^^^^^^^^^
  |
error: invalid character `{` in package name: `{{project-name}}`, the first character must be a Unicode XID start character (most letters or `_`)


 --> ../../../../.cargo/git/checkouts/programs-aa3402a6c25553e3/78c6dd7/templates/basic-template/generate-types/Cargo.toml:9:11
  |
9 | program = { package= "{{project-name}}", path = "..", default-features = false, features=['std'] }
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

These don't actually stop compilation from working - but it anyway should be fixed.

Im gonna look into it, but it might be that the only way to fix it is to move the generate template to a repo of its own rather than keeping here.

@HCastano
Copy link
Contributor

HCastano commented Dec 2, 2024

I haven't look into the code, but this seems to be like the template isn't actually being built/pre-processed as expected and instead the "raw" template is being built. Either we're missing a step for building the template or there's a bug in the build process

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

No branches or pull requests

2 participants