Page 1 of 1

JavaScript Optimizer error at compile time

Posted: Fri Apr 24, 2020 3:33 pm
by ljgww
I normally work with the resulting JavaScript code that is not optimized, but I have noticed that some spiderbasic code may perfectly work with un-optimized JavaScript code but could generate an error with 'Optimize javascript output' enabled.

Spiderbasic IDE application menu, Compiler, Compiler Options..., tab: Compiler Options, checkbox 'Optimize javascript output'

Example error (Spiderbasic 2.30 x86 compiler on Windows 10):

Image

Re: JavaScript Optimizer error at compile time

Posted: Fri Apr 24, 2020 5:21 pm
by Peter
Currently, the JavaScript optimizer causes more problems than it brings benefits. I personally do not use it.

I also think that it is currently used incorrectly. It should be used when creating apps and not at every compilation.

Greetings ... Peter

Re: JavaScript Optimizer error at compile time

Posted: Sat Apr 25, 2020 8:33 pm
by Fred
It's been disabled in current beta

Re: JavaScript Optimizer error at compile time

Posted: Mon Apr 27, 2020 12:36 pm
by ljgww
Noted.
Thank you!

Some sort of JSLint, however, would be welcome step at compile time (optional and non-intrusive) instead of 'optimizing'.

Simple reasoning for that option is that in SpiderBasic we may use custom JavaScript, hence, some sort of JavaScript checker can be helpful to, perhaps, detect some of issues in those areas.