Detect conflicts with reserved/existing identifiers
- Dominant language
- Rust
- Stars
- 5.2k
- Forks
- 312
- Avg merge
- 12h 59m
- Merged PRs (30d)
- 9
Description
Sometimes, users accidentally choose a name that conflicts with a built-in Godot name, or a registered symbol in a base class. They often cause non-obvious errors at runtime.
We should see if we can turn them into compile-time or startup-time errors. Startup-time is OK, if we don't want macro-hardcoded logic, so it would be forward-compatible to builders and more dynamic registrations. Either way, this would be a big improvement over the status quo.
These conflicts come in many forms:
- [ ] Classes (IIRC already fails to register, not sure about error message)
- [ ] `#[func]` definitions
- [ ] virtual method names (e.g. `_ready`)
- [ ] other functions in the base
- [ ] `#[var]` / `#[export]` properties
- [ ] property of same name exists in the base class
- [ ] or the getters/setters exist as functions
- [ ] `#[signal]`
- [ ] `#[constant]`
Contributor guide
Assessment
This issue has not been assessed yet.