HaxeFoundation / HaxeFoundation/haxe
Obscure deprecation warning
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
If i use `new WebSocket` (hxnodejs-ws) that depends on `Url` (from hxnodejs), i get deprecation warning about `Url` function that is not used, but has deprecated typedef in overload. There is no information how that `Url.format` is called from user code.
```haxe
import haxe.extern.EitherType;
class Main {
static function main() {
final ws = new WebSocket("");
}
}
class WebSocket {
public function new(address:EitherType) {};
}
class Url {
// (WDeprecated) This typedef is deprecated in favor of { }
@:overload(function(urlObject:UrlObject):String {})
static function format(url:String):String {
return "";
}
}
@:deprecated
typedef UrlObject = {};
```
Contributor guide
Research direction
Start with the minimal Haxe reproduction in the issue and confirm when `new WebSocket("")` triggers the deprecation warning through the `EitherType` overload. Trace how the `Url.format` overload and deprecated `UrlObject` typedef are analyzed, then verify the warning no longer reports an unused or indirectly referenced deprecation incorrectly.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100