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

Incompatible with rhai metadata feature #6

Open
paholg opened this issue Jan 12, 2024 · 4 comments
Open

Incompatible with rhai metadata feature #6

paholg opened this issue Jan 12, 2024 · 4 comments

Comments

@paholg
Copy link

paholg commented Jan 12, 2024

Create a project with the following Cargo.toml:

[package]
name = "test"
version = "0.1.0"
edition = "2021"

[dependencies]
rhai = { version = "1.16.3", features = ["metadata"] }
rhai-url = "0.0.5"

Trying to build it will return a ton of errors that look like this:

error[E0599]: no method named `set_fn_with_comments` found for mutable reference `&mut module::Module` in the current scope
   --> /home/paho/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rhai-1.16.3/src/api/deprecated.rs:669:1
    |
669 | #[export_module]
    | ^^^^^^^^^^^^^^^^ method not found in `&mut Module`
    |
    = note: this error originates in the attribute macro `export_module` (in Nightly builds, run with -Z macro-backtrace for more info)
@schungx
Copy link
Contributor

schungx commented Jan 12, 2024

Maybe you can try a cargo update?

@paholg
Copy link
Author

paholg commented Jan 12, 2024

This is a brand new project; both packages are at their newest version. In addition, removing the "medadata" feature of rhai or the rhai-url dependecy allows compilation to succeed.

@schungx
Copy link
Contributor

schungx commented Jan 12, 2024

Maybe you need to put the metadata feature on rhai-url instead?

@MolotovCherry
Copy link

MolotovCherry commented Feb 1, 2024

I've ran into this "issue" before when I first began. It is indeed as schungx said. You simply need to enable the metadata feature of rhai-url if you are using metadata feature on rhai

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

3 participants