Skip to content

Improvement notification export for GDExtensions #93366

Open
@snatvb

Description

@snatvb

Tested versions

  • 4.2 stable

System information

Windows 11 - 4.2

Issue description

If user tries convert @export_file("*.txt") to Array:

extends Node

class_name NewScript

@export_file("*.txt") var files: Array[String]

LSP shows error:
image
And in console:
image

But if user does it in rust:

#[derive(GodotClass)]
#[class(init, base=Node)]
struct Foo {
    base: Base<Node>,
    #[export(file)]
    resources: Array<GString>,
}

#[godot_api]
impl INode for Foo {}

It leads to this:
image
image

For user it's unexpected and it would be rather to notify about incorrect annotation.

Steps to reproduce

  • Add extenstion
  • Describe incorrect export

Minimal reproduction project (MRP)

godot-rust-repro.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions