jiangphcn opened a new pull request #2345: port to spidermonkey 60 URL: https://github.com/apache/couchdb/pull/2345 <!-- Thank you for your contribution! Please file this form by replacing the Markdown comments with your text. If a section needs no action - remove it. Also remember, that CouchDB uses the Review-Then-Commit (RTC) model of code collaboration. Positive feedback is represented +1 from committers and negative is a -1. The -1 also means veto, and needs to be addressed to proceed. Once there are no objections, the PR can be merged by a CouchDB committer. See: http://couchdb.apache.org/bylaws.html#decisions for more info. --> ## Overview <!-- Please give a short brief for the pull request, what problem it solves or how it makes things better. --> Port SpiderMonkey from `1.8.5` to `6.0`, i.e `mozjs-60.1.1pre3` from https://ftp.mozilla.org/pub/spidermonkey/prereleases/60/pre3/ aligning with the version used in planned CouchDB 4.0. This allows CouchDB 3.0 to address existing issues in legacy spidermonkey version and use new features provided in new version of spidermonkey. One outstanding topic is about CouchDB-style function declaration. `"map": "function(doc) {emit(doc._id, doc._id);}"` By means of the original transpile idea from the couch-chakra PoC from @dmunch, currently both traditional CouchDB-style function declaration and modern function declaration like below are supported in CouchDB 3.0 if spidermonkey 6.0 is selected. `"map": "(function (doc) {emit(doc._id, doc._id);});"` In order to provide enough flexibility, one switch is introduced when running `configure`. Currently, the supported value is `1.8.5` and `60`. (the default value is 1.8.5 and will be changed to 60 later) ``` ./configure --spidermonkey-version=60 (non-windows version) powershell -ExecutionPolicy Bypass .\configure.ps1 -WithCurl -SpiderMonkeyVersion=60 (windows version) ``` ## Testing recommendations <!-- Describe how we can test your changes. Does it provides any behaviour that the end users could notice? --> All test below are involved and run successfully again. ``` - Make test-cluster-with-quorum - Make test-cluster-without-quorum - Make eunit - Make javascript - Make mango-test - Make elixir ``` ## Related Issues or Pull Requests <!-- If your changes affects multiple components in different repositories please put links to those issues or pull requests here. --> https://github.com/apache/couchdb/pull/2170 is PR when starting to work on this task. https://github.com/apache/couchdb-glazier/pull/11 ## Checklist - [X] Code is written and works correctly - [X] Changes are covered by tests - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini` - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
