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

Parser works in JS development mode but not in JS production mode #66

Open
avwie opened this issue Aug 21, 2023 · 2 comments
Open

Parser works in JS development mode but not in JS production mode #66

avwie opened this issue Aug 21, 2023 · 2 comments

Comments

@avwie
Copy link

avwie commented Aug 21, 2023

I've made a toy language: https://github.com/avwie/borklang

Everything works correctly on the JVM and when running jvmTest and jsTest. Also my web project is working correctly when I use browserDevelopmentRun.

However, when I use browserDistributionRun or make a web-distributable, the tokenizer/parsers don't work correctly.

For instance:

fn fib = (n) ->  {
  if (n < 2) n else fib(n - 1) + fib(n - 2)
}

fib(10)

This returns 55 in development mode, but in production mode I get:
Invalid number format: 'fi'

I found no way on how to debug this, because I loose a lot of information with productionRun.

@avwie
Copy link
Author

avwie commented Aug 21, 2023

It's actually pretty easy to reproduce. Just pick the BooleanExpression demo and run it in a nodeJS target in production.

ParseException: Could not parse input: UnparsedRemainder(startsWith=id@2 for " &" at 1 (1:2))

So this library does not work in JS production environments.

@avwie
Copy link
Author

avwie commented Aug 21, 2023

Fixed in #67

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

1 participant