You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Jérémie, I was just trying to update the Elixir mjml_nif lib to use mrml v1.2.2 and came across this error when compiling the crate:
Compiling mrml v1.2.2
error[E0433]: failed to resolve: could not find `Serialize` in `serde`
--> /home/paul/.asdf/installs/rust/1.51.0/registry/src/github.com-1ecc6299db9ec823/mrml-1.2.2/src/mj_accordion/children.rs:16:44
|
16 | #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
| ^^^^^^^^^ could not find `Serialize` in `serde`
error[E0433]: failed to resolve: could not find `Deserialize` in `serde`
--> /home/paul/.asdf/installs/rust/1.51.0/registry/src/github.com-1ecc6299db9ec823/mrml-1.2.2/src/mj_accordion/children.rs:16:62
|
16 | #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
| ^^^^^^^^^^^ could not find `Deserialize` in `serde`
The dependencies in my Cargo.toml looked like this when compiling failed:
When I put an additonal explicit serde dependency with reference to its derive feature, like the following, compiling succeeds:
[dependencies]
rustler = "0.22.0-rc.1"serde = { version = "1.0", features = ["derive"] }
mrml = "1.2.2"
(This also fetches an additional serde_derive v1.0.126)
I'm not too familiar with serde and the usage of macros, but might there be a missing features = ["derive"] for the serde dependency (or an explicit serde_derive dependency) in the mrml-core Cargo.toml?
Or did I miss sth. that changed from mrml v1.0.0 to v1.2.2 in terms of setup/installation?
The text was updated successfully, but these errors were encountered:
@paulgoetze thanks for this issue, I completely forgot to update the installation steps. You do need to install serde = { version = "1.0", features = ["derive"] }.
If you don't need the json part, you can do the following
mrml = { version = "1.2", default-features = false, features = ["parse", "render"] }
Hey Jérémie, I was just trying to update the Elixir mjml_nif lib to use mrml v1.2.2 and came across this error when compiling the crate:
The dependencies in my Cargo.toml looked like this when compiling failed:
When I put an additonal explicit serde dependency with reference to its derive feature, like the following, compiling succeeds:
(This also fetches an additional
serde_derive v1.0.126
)I'm not too familiar with serde and the usage of macros, but might there be a missing
features = ["derive"]
for the serde dependency (or an explicitserde_derive
dependency) in the mrml-core Cargo.toml?Or did I miss sth. that changed from mrml v1.0.0 to v1.2.2 in terms of setup/installation?
The text was updated successfully, but these errors were encountered: