Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"src/core/globals.ml", line 117, characters 1-7: Assertion failed #10434

Closed
lublak opened this issue Oct 14, 2021 · 3 comments
Closed

"src/core/globals.ml", line 117, characters 1-7: Assertion failed #10434

lublak opened this issue Oct 14, 2021 · 3 comments

Comments

@lublak
Copy link
Contributor

lublak commented Oct 14, 2021

I currently have an haxe extern for nodejs

public static function downloadTool(url:String, ?dest:String, ?auth:String):js.lib.Promise<String>;
public overload static function extractTar(file:String, ?dest:String, ?flags:Array<String>):js.lib.Promise<String>;
public overload static function extractTar(file:String, ?dest:String, ?flags:String):js.lib.Promise<String>;

Than i use it like this:

var ext = 'tar.gz';
ToolCache.downloadTool('somefilepath.$ext').then(path -> {
    ToolCache.extractTar(path, 'somefilepath');
});

also fine with:

@:overload(function(file:String, ?dest:String, ?flags:Array<String>):js.lib.Promise<String> {})
public static function extractTar(file:String, ?dest:String, ?flags:String):js.lib.Promise<String>;
@RealyUniqueName
Copy link
Member

"src/core/globals.ml", line 117, characters 1-7: Assertion failed

Paste full error log please.

@Simn
Copy link
Member

Simn commented Oct 19, 2021

extern class ToolCache {
	overload static function extractTar(file:String, ?dest:String, ?flags:Array<String>):Void;
	overload static function extractTar(file:String, ?dest:String, ?flags:String):Void;
}

function main() {
	ToolCache.extractTar("blub", 'somefilepath');
}
File "src/codegen/overloads.ml", line 272, characters 18-25
Called from file "src/codegen/overloads.ml", line 278, characters 21-48
Called from file "list.ml", line 110, characters 12-15
Called from file "src/codegen/overloads.ml", line 276, characters 3-213
Called from file "src/typing/callUnification.ml", line 393, characters 53-102
Called from file "src/typing/callUnification.ml", line 422, characters 12-62
Called from file "src/typing/typer.ml", line 749, characters 27-94
Called from file "src/typing/typer.ml", line 752, characters 9-19
Called from file "src/typing/typer.ml", line 1687, characters 10-38
Called from file "src/typing/typeloadFunction.ml", line 78, characters 2-25

Fails like this on Js, Flash, Php, Python, Lua.

Other targets correctly error with

source/Main.hx:7: characters 2-46 : Ambiguous overload, candidates follow
source/Main.hx:2: characters 27-37 : ... (file : String, ?dest : Null<String>, ?flags : Null<Array<String>>) -> Void
source/Main.hx:3: characters 27-37 : ... (file : String, ?dest : Null<String>, ?flags : Null<String>) -> Void

This puts the blame on pf_pad_nulls = false.

@lublak
Copy link
Contributor Author

lublak commented Oct 22, 2021

thank you @Simn for the log and full example.
I was unfortunately the last few days very booked. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants