Skip to content

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

@Ayman-Barghout

Description

@Ayman-Barghout

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions