HaxeFoundation / HaxeFoundation/haxe

[CPP] New marshalling extern api errors are shown in the std files rather than the source

Open
#12,498 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I have the following error:
```hx
[ERROR] /home/j/Documents/Projects/simple/SimpleChartDev/haxe_modules/linc_skia/skia/SkSpan.hx:7: lines 7-11

7 | extern class SkSpan {
- | [...]
11 | }
|
| CPP0003: Invalid parameter for a marshalling type
```
The code in this file is
```hx
@:semantics(value)
@:cpp.ValueType
extern class SkSpan {
public function new(ptr:Star, size:Int):Void;
public function size():Int;
public function empty():Bool;
}
```
But the error should point to where I'm using this incorrectly rather than the source file, I think this is an issue for other error codes as well

Contributor guide

Open the contributing guide

Research direction

Reproduce the diagnostic using the SkSpan.hx example at line 7 and inspect how CPP0003 is reported for the extern declaration. Trace the marshalling validation to determine where the incorrect usage is known, then verify that the error points to that usage rather than the std file and check whether related error codes behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.