dioxus-community / dioxus-free-icons

Use free svg icons in your Dioxus projects easily with dioxus-free-icons.
Other
79 stars 21 forks source link

feat: Dioxus 0.5 support #36

Closed marc2332 closed 7 months ago

marc2332 commented 8 months ago

Prepare support for Dioxus 0.5

Closes https://github.com/dioxus-community/dioxus-free-icons/issues/26 Closes https://github.com/dioxus-community/dioxus-free-icons/issues/28 Closes https://github.com/dioxus-community/dioxus-free-icons/issues/14

marc2332 commented 8 months ago

~Looks like material design icons are failed to be written, looking into it~ Fixed

iynaix commented 7 months ago

Trying to use it with the following in Cargo.toml:

dioxus-free-icons = { git = "https://github.com/dioxus-community/dioxus-free-icons", branch = "feat/dioxus-0.5", features = [
    "material-design-icons-editor",
] }

I'm getting hundreds of errors such as:

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1816:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1816 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1837:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1837 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1858:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1858 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

Some errors have detailed explanations: E0119, E0428.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `dioxus-free-icons` (lib) due to 595 previous errors
warning: build failed, waiting for other jobs to finish...

Am I missing something obvious here like having to run a codegen step?

marc2332 commented 7 months ago

Trying to use it with the following in Cargo.toml:

dioxus-free-icons = { git = "https://github.com/dioxus-community/dioxus-free-icons", branch = "feat/dioxus-0.5", features = [
    "material-design-icons-editor",
] }

I'm getting hundreds of errors such as:

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1816:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1816 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1837:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1837 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1858:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1858 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

Some errors have detailed explanations: E0119, E0428.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `dioxus-free-icons` (lib) due to 595 previous errors
warning: build failed, waiting for other jobs to finish...

Am I missing something obvious here like having to run a codegen step?

No, it looks like the codegen generated is wrong, will check asap! Thanks for the report!

marc2332 commented 7 months ago

Trying to use it with the following in Cargo.toml:

dioxus-free-icons = { git = "https://github.com/dioxus-community/dioxus-free-icons", branch = "feat/dioxus-0.5", features = [
    "material-design-icons-editor",
] }

I'm getting hundreds of errors such as:

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1816:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1816 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1837:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1837 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

error[E0119]: conflicting implementations of trait `IconShape` for type `md_editor_icons::MdMaterialDesignIcons`
    --> /persist/cache/home/iynaix/.local/share/.cargo/git/checkouts/dioxus-free-icons-d246d2ebe6d920da/58f601c/packages/lib/src/icons/md_editor_icons.rs:1858:1
     |
6    | impl IconShape for MdMaterialDesignIcons {
     | ---------------------------------------- first implementation here
...
1858 | impl IconShape for MdMaterialDesignIcons {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `md_editor_icons::MdMaterialDesignIcons`

Some errors have detailed explanations: E0119, E0428.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `dioxus-free-icons` (lib) due to 595 previous errors
warning: build failed, waiting for other jobs to finish...

Am I missing something obvious here like having to run a codegen step?

Try now! I think it should work

iynaix commented 7 months ago

It seems to work now (no more build errors), but I am running into #26. There's an empty path over the actual icon so it always shows up as a filled box. :(

marc2332 commented 7 months ago

It seems to work now (no more build errors), but I am running into #26. There's an empty path over the actual icon so it always shows up as a filled box. :(

Will try to fix asap!

marc2332 commented 7 months ago

It seems to work now (no more build errors), but I am running into #26. There's an empty path over the actual icon so it always shows up as a filled box. :(

Try now! I think I got it working 😄 I also updated it to alpha 2

iynaix commented 7 months ago

It's working great now! :heart:

marc2332 commented 7 months ago

It's working great now! ❤️

Awesome!