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

Can't build for web as HoneyTalkParser has very large integer literals #28

Open
Ayman-Barghout opened this issue Nov 23, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Ayman-Barghout
Copy link

Thank you for this amazing package!
When trying to build for the web after depending on honey it fails with the following errors:

/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:289:196:
Error: The integer literal 35607409199153153 can't be represented exactly in JavaScript.
      if (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802[24](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:25)0) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:289:277:
Error: The integer literal 28710447624488959 can't be represented exactly in JavaScript.
      if (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:407:199:
Error: The integer literal 35607409199153153 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:407:280:
Error: The integer literal 28710447624488959 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:471:199:
Error: The integer literal 35607409199153153 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:471:280:
Error: The integer literal 28710447624488959 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:503:199:
Error: The integer literal 35607409199153153 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:503:280:
Error: The integer literal 28710447624488959 can't be represented exactly in JavaScript.
      while (((_la) & ~0x3f) == 0 && ((1 << _la) & -8655355521802240) != 0 || (((_la - 64)) & ~0x3f) == 0 && ((1 << (_la - 64)) & -17) != 0 || (((_la - 128)) & ~0x3f) == 0 && ((1 << (_la - 128)) & -35607409199153153) != 0 || (((_la - 192)) & ~0x3f) == 0 && ((1 << (_la - 192)) & 28710447624488959) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:588:51:
Error: The integer literal 57681[25](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:26)96036108296 can't be represented exactly in JavaScript.
        if (((_la) & ~0x3f) == 0 && ((1 << _la) & 576812596036108296) != 0 || (((_la - 120)) & ~0x3f) == 0 && ((1 << (_la - 120)) & -9133511153492819967) != 0 || (((_la - 184)) & ~0x3f) == 0 && ((1 << (_la - 184)) & 7349874591869173759) != 0 || (((_la - [26](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:27)5)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                  ^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:588:134:
Error: The integer literal 9133511153492819967 can't be represented exactly in JavaScript.
        if (((_la) & ~0x3f) == 0 && ((1 << _la) & 576812596036108296) != 0 || (((_la - 120)) & ~0x3f) == 0 && ((1 << (_la - 120)) & -9133511153492819967) != 0 || (((_la - 184)) & ~0x3f) == 0 && ((1 << (_la - 184)) & 7349874591869173759) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:588:217:
Error: The integer literal 7349874591869173759 can't be represented exactly in JavaScript.
        if (((_la) & ~0x3f) == 0 && ((1 << _la) & 576812596036108296) != 0 || (((_la - 120)) & ~0x3f) == 0 && ((1 << (_la - 120)) & -9133511153492819967) != 0 || (((_la - 184)) & ~0x3f) == 0 && ((1 << (_la - 184)) & 7349874591869173759) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848282434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:1573:134:
Error: The integer literal 9133511153492819967 can't be represented exactly in JavaScript.
        if (((_la) & ~0x3f) == 0 && ((1 << _la) & 576812596035059712) != 0 || (((_la - 120)) & ~0x3f) == 0 && ((1 << (_la - 120)) & -9133511153492819967) != 0 || (((_la - 184)) & ~0x3f) == 0 && ((1 << (_la - 184)) & 69175290[27](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:28)641606143) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & 3848[28](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:29)2434559) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/flutter/3.3.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/honey-0.2.0/lib/src/compiler/antlr/HoneyTalkParser.dart:1573:217:
Error: The integer literal 69175[29](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:30)027641606143 can't be represented exactly in JavaScript.
        if (((_la) & ~0x3f) == 0 && ((1 << _la) & 576812596035059712) != 0 || (((_la - 120)) & ~0x3f) == 0 && ((1 << (_la - 120)) & -91[33](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:34)51115[34](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:35)92819967) != 0 || (((_la - 184)) & ~0x3f) == 0 && ((1 << (_la - 184)) & 6917529027641606143) != 0 || (((_la - 265)) & ~0x3f) == 0 && ((1 << (_la - 265)) & [38](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:39)48282[43](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:44)[45](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:46)[59](https://github.com/doneservices/done-flutter/actions/runs/3531668934/jobs/5925094729#step:7:60)) != 0) ***
                                                                                          ^^^^^^^^^^^^^^^^^^^
Error: Compilation failed.

Apparently, they consider these values as integer literals and they are too big to be represented in JS, relevant SO post:
https://stackoverflow.com/questions/71526258/why-do-i-get-the-error-integer-literal-is-too-large-to-be-represented-in-any-in

@simc simc added enhancement New feature or request documentation Improvements or additions to documentation labels Nov 23, 2022
@simc
Copy link
Contributor

simc commented Nov 23, 2022

Thanks for reporting. While we can't implement web support we can just disable Honey on web.

@dsyrstad
Copy link

@simc Are there plans to support web apps? Looking at the code, it seems like the "debug" run strategy could work. Are there problems you found?

@desmond206x
Copy link

@simc We are also interested in Honey as a test framework, but we need Web support. Any news about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants