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
BIRT/JavaScript: Rhino engine, activate the "Version ES6" as new default for the BIRT-Rhino-engine #1574
Comments
Sure, but let's do it early in 4.16. |
Thomas, do you mean that the ES version must be set when BIRT as a whole initializes and thus cannot be changed per report? I'd prefer (if it is possible) to be able to set this on a per-report basis. Anyway, if it is only configurable for BIRT as a whole, we should allow a system property (say, I'm +1 for deferring it to 4.16. I think this is logically a change to the ROM (just like the improvement to support diagonal borders, btw), so we should increase the version number in the rptdesign files. The reason is: Increasing the version number means (at least I understand it that way): |
Yes, I will switch the change to 4.16. @hvbtup: Henning, what would be a good place for the configuration because it must be work multiple with eclipse, runtime (standard & OSGI). |
As I said, I think it suffices if the default ES version can be overridden with a system property. |
Of course, I switched the change to BIRT 4.16. I will also add a system-property to switch from default to other older Rhino-JS-version. |
Please specify the switch in such a way that the version can be specified as a string or something, not a boolean. This way it will be future-proof. |
Henning, I would never use a boolean for that. In every case I will implements a string for the key-value. JavaScript - Verions (Rhino-Engine) Master
|
+1 for ES6. Been wanting this for a long time. |
Hey Steve! |
I will create a PR with it after publishing of 4.15. |
The change is merged to the master branche with PR #1682 |
The BIRT-engine use for the JavaScript execution the Rhino-engine.
The default versionof Rhino is since 1.7.9 version "180" (BIRT use currently version 1.7.10 based on BIRT 4.14).
The plan would be to change the default of the BIRT-Rhino engine to the version ES6/version 200.
This version is available since Rhino version 1.7.7 based on new configuration: Context.VERSION_ES6
(June 17, 2015, source : https://github.com/mozilla/rhino/blob/6ec10856891879e3583e6d47b05e82d9ae8a19c6/RELEASE-NOTES.md?plain=1#L715).
I analysed the BIRT-process to create the according JavaScript-engine.
The creation of the engine is encapsulated from the report mechanism.
Therefore I would change 2 classes and set the new version ES6 as the new default JavaScript-processing version fro BIRT.
But there would be currently no way to change the version back to another version due to the special encapsulated of the engine (implementation of User-Properties would be very hard with lot of changes).
The 2 class changes are necessary for the JavaScript-engine and for the JavaScript-validator:
Change 01: Class: JavascriptEngine -> Constructor: JavascriptEngine:
Change 02: Class: ScriptValidator -> Method: validateScript
@wimjongman, @hvbargen, @merks
Please vote from your side should we go this step - from my side I would prefer to go this way.
The version ES6 is a stable Rhino-mechanism and I see many advantages if we use this as new default.
(I don't know any negative facts if we would use it as the new default.)
But please your point of view to this option and change.
(By the way, I have tested the ES6 with my reports and currently I found only positive new options and all my scripts were running.)
The text was updated successfully, but these errors were encountered: