Closed grepsuzette closed 5 years ago
haxe 3.4.7, hxcpp 3.4.188, hexunit 0.35.0: pass for both neko and hxcpp haxe 4.0.0 (just released), hxcpp 4.0.38, hexunit 0.35.0, tink_macro 0.16.1 : fail on hxcpp with an error "Missing key xx", always pass on neko. haxe 4.0.0-rc3, hxcpp 4.0.38, hexunit 0.35.0, tink_macro 0.16.1 : fail on hxcpp (same), pass on neko haxe 4.0.0-rc1, hxcpp 4.0.38, hexunit 0.35.0, tink_macro 0.16.1. fail on hxcpp (same), pass on neko haxe 4.0.0-rc1, hxcpp 4.0.38, hexunit 0.35.0, tink_macro 0.17.7. fail on hxcpp (same), pass on neko
haxe 4.0.0-rc1, hxcpp 4.0.4, hexunit 0.35.0, tink_macro 0.16.1. built failed with:
Error: In file included from ./src/sys/db/_Sqlite/SqliteResultSet.cpp:8:
include/sys/db/ResultSet.h: In static member function ‘static bool sys::db::ResultSet_obj::hasNext(Dynamic)’:
include/sys/db/ResultSet.h:23:30: error: ‘interface_cast’ is not a member of ‘hx’
I suggest first we confirm the bug on whatever combination of dependencies I used before (no point retesting all of them). Is the bug reproduceable on another machine with the same test suite?
Reproduced (haxe 4.0.0, hxcpp 4.0.52) and reduced to:
class Test {
static function main() {
var dburl = ~/([^:]+):\/\/([^:]+):([^@]*?)@([^:]+)(:[0-9]+)?\/(.*?)$/;
if (!dburl.match(Sys.args()[0]))
throw "Missing cnx params: mysql://user:password@host[:port]/dbname";
var port = dburl.matched(5);
var params = {
user: dburl.matched(2),
pass: dburl.matched(3),
host: dburl.matched(4),
port: port == null ? 3306 : Std.parseInt(port.substr(1)),
database: dburl.matched(6),
};
var cnx = sys.db.Mysql.connect(params);
trace(cnx.request('SELECT 3.14 pi, 42 life').next());
}
}
$ haxe --main Test --neko test.n && neko test.n mysql://[...]
Test.hx:16: { life => 42, pi => 3.14 }
$ haxe --main Test --cpp cpp --debug && cpp/Test-debug mysql://[...]
Test.hx:16: { null => 42 }
That's some serious PR you issued there! Congrats on finding it so quickly :)
As said elsewhere, I applied your patch and it solves the ""Missing key xx"" problem.
Had this problem in my project, therefore I ran the unit tests for record-macros.
With hexunit 0.30.0. Haxe 3.4.7 with hxcpp 3.4.188 unit tests pass on both neko and hxcpp. Haxe 4.0.0 with hxcpp 4.0.52 unit tests pass on neko and fail on hxcpp as follow:
This is the same exact bug I have in my app as well.