Command line compiler raises stack overflow error / IDE compiler works

Hello!
Using Delphi 10.4 and current WebCore, I have the following problem:
One of my projects raises the error

bug: uncaught EStackOverflow: Stack overflow

when compiling via the command line compiler. I couldn't figure out the reason, maybe it's the bug "fixed stack overflow on deep nested binary expressions" listed on Pas2JS Version Changes - Free Pascal wiki

When compiling in the IDE, it works - the error is not raised and the project is compiled successfully.

So, my questions are:

  1. Can I get around this, for examples by using msbuild.exe to invoke the compiler like the IDE does? (first attempt by calling msbuild.exe with the /t and /p switches resulted in strange errors...)
  2. Do you have plans to integrate a newer version of pas2js compiler?

Thank you,
Meik Stoll

  1. It is on our todolist to keep pas2js compiler in sync
  2. Technically the command line compiler and compiler invoked by the IDE should be the same
  3. Can this be isolated in a sample source project with which we can reproduce the issue here?

I tried to analyse a bit, and now I am thinking that it's due to a large amount of forward declarations or number of procedures.
I can zip the project and send it you by mail, no problem. Which mail address should I use?

help@tmssoftware.com