Closed h7kanna closed 8 months ago
If metadata
is not used, then comments
is an empty array, so the branch with set_custom_type_with_comments
is never called. I don't particularly see a bug here...
Below issue with
rhai = { version = "1.16.3", features = ["internals", "no_closure", "no_module", "no_custom_syntax"], optional = true }
What version of rhai_codegen
are you using? Can you do a cargo update
?
I am not using rhai_codegen directly. Now I realize that the usage of 'rhai' alone compiles just fine. May be, This is just IntelliJ IDE messing up with features.
I am not using rhai_codegen directly. Now I realize that the usage of 'rhai' alone compiles just fine. May be, This is just IntelliJ IDE messing up with features.
rhai
will call rhai_codegen
which is why you need to be careful about version conflicts. I suspect you have a lower version of rhai_codegen
in your Cargo.lock
...
Also, if the IDE is working on an old version of rhai_codegen
that may also cause this problem...
But still, for the code to work set_fn_with_comments will not be in scope without 'metadata' feature. no?
But still, for the code to work set_fn_with_comments will not be in scope without 'metadata' feature. no?
Not, the codegen won't generate this function call without the metadata
feature.
Cargo.lock
[[package]]
name = "rhai_codegen"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "853977598f084a492323fe2f7896b4100a86284ee8473612de60021ea341310f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
]
But still, for the code to work set_fn_with_comments will not be in scope without 'metadata' feature. no?
Not, the codegen won't generate this function call without the
metadata
feature.
Then its IDE not setting features correctly
This is just IntelliJ dealing badly with feature unification. Closing this.
Fixed compile error as 'set_custom_type_with_comments' is gated with 'metadata' feature.