JavaScript Optimizer error at compile time

Just starting out? Need help? Post your questions and find answers here.
ljgww
Posts: 26
Joined: Thu Mar 26, 2020 5:47 pm

JavaScript Optimizer error at compile time

Post 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
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: JavaScript Optimizer error at compile time

Post 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
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: JavaScript Optimizer error at compile time

Post by Fred »

It's been disabled in current beta
ljgww
Posts: 26
Joined: Thu Mar 26, 2020 5:47 pm

Re: JavaScript Optimizer error at compile time

Post 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.
Post Reply