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

Cant build from Github #45

Open
TheToddmeister opened this issue Feb 5, 2025 · 1 comment
Open

Cant build from Github #45

TheToddmeister opened this issue Feb 5, 2025 · 1 comment

Comments

@TheToddmeister
Copy link

Hey
How do i build this from github?
I cargo build on the repo locally and it works, but when i add it to my project like so:
icondata = {git="https://github.com/carloskiki/icondata.git"}
it fails like this:

error: invalid character { in package name: icondata_{{short_name}}, characters must be Unicode XID characters (numbers, -, _, or most letters)
--> .........cargo\git\checkouts\icondata-5d3f02090c1ec0c4\cc7de05\build\templates\icon_lib\Cargo.toml:2:8
|
2 | name = "icondata_{{short_name}}"
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
error: invalid key
--> .........cargo\git\checkouts\icondata-5d3f02090c1ec0c4\cc7de05\build\templates\main_lib\Cargo.toml:17:1
|
17 | {% for (short_name, version) in short_name_version -%}
| ^
|

I tried looking up a few threads on this, but nothing suggested worked

@carloskiki
Copy link
Owner

This happens because we use a build script to generate the different crates when upstream icon libraries update, and git dependencies don't seem to differentiate between workspace members and arbitrary packages. One way we could solve this is to rename the templates from Cargo.toml to Cargo.template.toml or something like that. I don't have time to make the change at the moment however so you would have to submit a PR.

Another alternative would be to clone the repository & use path dependencies instead.

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