From a3ecd744ff58b0532e23017978cc8bebcfd61eec Mon Sep 17 00:00:00 2001 From: Juraj Kirchheim Date: Thu, 8 Jul 2021 07:48:09 +0200 Subject: [PATCH 1/2] Adjust to tink_hxx#v1 --- extraParams.hxml | 1 - haxe_libraries/coconut.react-core.hxml | 4 ++-- haxe_libraries/coconut.react-dom.hxml | 3 +-- haxe_libraries/tink_hxx.hxml | 4 ++-- src/coconut/react/Html.macro.hx | 4 ---- tests/RunTests.hx | 5 +++-- 6 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 extraParams.hxml diff --git a/extraParams.hxml b/extraParams.hxml deleted file mode 100644 index d652938..0000000 --- a/extraParams.hxml +++ /dev/null @@ -1 +0,0 @@ ---macro coconut.react.Html.registerTags() \ No newline at end of file diff --git a/haxe_libraries/coconut.react-core.hxml b/haxe_libraries/coconut.react-core.hxml index b660a4a..ae30f67 100644 --- a/haxe_libraries/coconut.react-core.hxml +++ b/haxe_libraries/coconut.react-core.hxml @@ -1,8 +1,8 @@ -# @install: lix --silent download "gh://github.com/MVCoconut/coconut.react-core#1d3455cc0574f1d00d683fdccd875aae3ccc98de" into coconut.react-core/0.2.2/github/1d3455cc0574f1d00d683fdccd875aae3ccc98de +# @install: lix --silent download "gh://github.com/MVCoconut/coconut.react-core#acec63aec68858712924ed91258773bb33ab3544" into coconut.react-core/0.2.2/github/acec63aec68858712924ed91258773bb33ab3544 -lib coconut.ui -lib react-next -lib tink_priority --cp ${HAXE_LIBCACHE}/coconut.react-core/0.2.2/github/1d3455cc0574f1d00d683fdccd875aae3ccc98de/src +-cp ${HAXE_LIBCACHE}/coconut.react-core/0.2.2/github/acec63aec68858712924ed91258773bb33ab3544/src -D coconut.react-core=0.2.2 --macro coconut.react.macros.Setup.all() -D coconut_react_core \ No newline at end of file diff --git a/haxe_libraries/coconut.react-dom.hxml b/haxe_libraries/coconut.react-dom.hxml index 36edd18..45c03be 100644 --- a/haxe_libraries/coconut.react-dom.hxml +++ b/haxe_libraries/coconut.react-dom.hxml @@ -1,5 +1,4 @@ -D coconut.react-dom -lib coconut.react-core -lib tink_domspec --cp src -extraParams.hxml \ No newline at end of file +-cp src \ No newline at end of file diff --git a/haxe_libraries/tink_hxx.hxml b/haxe_libraries/tink_hxx.hxml index 2739de7..c650165 100644 --- a/haxe_libraries/tink_hxx.hxml +++ b/haxe_libraries/tink_hxx.hxml @@ -1,6 +1,6 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_hxx#0d6cda883d5ef4c1186dbad476e016b98aad68b8" into tink_hxx/0.25.0/github/0d6cda883d5ef4c1186dbad476e016b98aad68b8 +# @install: lix --silent download "gh://github.com/haxetink/tink_hxx#62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054" into tink_hxx/0.25.0/github/62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054 -lib html-entities -lib tink_anon -lib tink_parse --cp ${HAXE_LIBCACHE}/tink_hxx/0.25.0/github/0d6cda883d5ef4c1186dbad476e016b98aad68b8/src +-cp ${HAXE_LIBCACHE}/tink_hxx/0.25.0/github/62a00c12a3ba8d14ea6f0df18bdb31d80f6a0054/src -D tink_hxx=0.25.0 \ No newline at end of file diff --git a/src/coconut/react/Html.macro.hx b/src/coconut/react/Html.macro.hx index 6e7c32b..3a9d120 100644 --- a/src/coconut/react/Html.macro.hx +++ b/src/coconut/react/Html.macro.hx @@ -7,10 +7,6 @@ import tink.domspec.Macro.getAria; using tink.MacroApi; class Html { - - static function registerTags() - coconut.react.macros.HXX.defaults.whenever(tink.hxx.Tag.extractAllFrom(macro coconut.react.Html)); - static var NAMELESS = ''; static var reactAttributes = { diff --git a/tests/RunTests.hx b/tests/RunTests.hx index 9525e53..d7f91e3 100644 --- a/tests/RunTests.hx +++ b/tests/RunTests.hx @@ -1,13 +1,14 @@ package ; import coconut.ui.*; +import coconut.react.Html.*; import travix.Logger.*; class RunTests { static function main() { try { - + Renderer.mount( cast js.Browser.document.createDivElement(), coconut.Ui.hxx('
Hello, world!
') @@ -19,7 +20,7 @@ class RunTests { } exit(0); // make sure we exit properly, which is necessary on some targets, e.g. flash & (phantom)js } - + } class Example extends View { From f569d03939e1b6035d7453723ef66e97deb410b1 Mon Sep 17 00:00:00 2001 From: Juraj Kirchheim Date: Sat, 7 Aug 2021 17:17:37 +0200 Subject: [PATCH 2/2] Force type loading order. --- extraParams.hxml | 1 + src/coconut/react/Html.macro.hx | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 extraParams.hxml diff --git a/extraParams.hxml b/extraParams.hxml new file mode 100644 index 0000000..a2e9762 --- /dev/null +++ b/extraParams.hxml @@ -0,0 +1 @@ +--macro coconut.react.Html.init() \ No newline at end of file diff --git a/src/coconut/react/Html.macro.hx b/src/coconut/react/Html.macro.hx index 3a9d120..d51ebac 100644 --- a/src/coconut/react/Html.macro.hx +++ b/src/coconut/react/Html.macro.hx @@ -4,6 +4,7 @@ import haxe.macro.Context; import haxe.macro.Expr; import tink.domspec.Macro.tags; import tink.domspec.Macro.getAria; +using haxe.macro.Tools; using tink.MacroApi; class Html { @@ -97,4 +98,7 @@ class Html { return ret; } + static function init() { + Context.getType('coconut.react.Html').getClass(); + } } \ No newline at end of file