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
Add Electron 7.2.x as a prebuild target #2833
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rajivshah3
force-pushed
the
feature/electron-7-prebuild
branch
from
April 22, 2020 03:33
9a153e9
to
00869c9
Compare
kneth
approved these changes
Apr 22, 2020
kraenhansen
approved these changes
Apr 22, 2020
blagoev
approved these changes
Apr 22, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will be fixing this by providing single binary for all versions in the near future.
blagoev
added a commit
that referenced
this pull request
Jun 4, 2020
* Fix bug in how multiplexing is started (#2743) * [3.6.5] Bump version * Update to Realm Sync v5.0.3 * N-API support (#2680) * Enable Realm as a NAPI module * some intermediate work * WIP on node_class using Napi::ObjectWrap * WIP * WIP (all, except property enumeration callback, js adapter and sync logger) * more progress on napi impl. property enumeration support, fixes on js objecst proto chain and various bug fixes. The js adapter and sync logger are still not reimplemented. Async functions in RealmDelegate are disabled * fix node_protected and set prototype of implementation to use napi * more WIP * fixes node protected to support napi values as well as objects * fixes static property invocations * fixes arraybufferviews * fixes getting/setting prototype on user functions part of the schema + allowing proxy instance + prototype chains supporting index/named accessors * fixes function invocations with the correct unwrapped napi instance * removes parent proxy and moves all trap functions to the instance proxy which combine the logic for both * fixes exceptions handling * fixes exceptions handling when constructing objects * fixes unwrapping napi instances when passed as arguments js adapter, sync logger, notifications in realm delegate not done * implemented sync_logger and js_adapter enabled notifications in RealmDelegate fixed ReturnValue to always return undefined if no value is set node_class - allow creation of js instances without calling the constructor_callback node_class - define all underscore members as readonly with non enumerable, non configurable, non writable attributes ndoe_class - defined getOwnPropertyDescriptorTrap function on the instanceProxy so ownKeys result values works for Object.keys calls node_class - method invocations now pass the instanceProxy as the this (if available on the CallbackInfo.This() object) argument instead of CallbackInfo.This(). * * Fixed node return value creation from another napi value * Fxied node value to double to throw exepcted error * Fixed readonly protpery accessors to throw ReadOnly : std:exception instead of Napi::Error since Napi does not handle this case correctly (if accessor is called from js or from native code) and silences the exception or masks it as generic failure by rethrowing another exception * Fixed support for extension.js methods. These method should not be bound to the native instance but should be called on the instance proxy so functions like Array.map invoke the proxy traps to work correctly. Made creation of bound function to be only on native methods as required by napi * Fixed ownKeys trap to handle Object.keys on indexable targets * Fixed creation of constructors to return already created constructors so Realm.Results is inheriting form the one and only Realm.Collection. Thus the js extensions are setup on only one Realm.Collection constructor function and are available onto the Realm.Results as well * Fixed indexes parsing of number strings using c++ std:stoi * Fixed setting up set handlers for readonly properties on the napi classes that fail with exceptions if executed * Added has proxy trap to handle the in operator (`property in instanceProxy`) * * fixed _proto member not consulted for properties * fixed getting a property with out of bound exception to return undefined * fixed getting index property with negative index to return undefined * fixed hasTrap to return false on negative indexes. * made node_protected destructor to catch all exceptions * fixed node_value is_binary, from_null, from_undefined, * fixed node_return_value set from realm::Mixed to pass the correct napi environment * removed commented dead code * refactor function names * * fixed bind native functions coming from the `_proto` member. (This is required to support PersonObject.__proto__ = Realm.Object; PersonObject.prototype.__proto__ = Realm.Object.prototype;) * Refactored the bind logic into separate function * removed commented code * fix setLink * do not throw std::exceptions from NAPI methods. Always use Napi::Error for that. This causes V8 GC to fail when garbage collecting remove ReadOnlyException and use NAPI error with custom string message for handling readonly property errors fix create instance proxy to use escapable handle scope and escape the created js instance * removed dead commented code * remove //NAPI: commented code get_execution_context returns hard coded value for the current context. There is no id available from the napi_env we can use here. This might need fixing if multiple v8::Isolate's are used in the future * refactor getProxy trap functions. The getProxyTrap calls named and index handlers and not the other way around * removed all commented V8 implementations. (useful for reviewing napi implementation) * remove all traces of nan.h, v8.h, node_napi_convert.hpp from project * fixup node_init to use NAPI module init only use realmConstructor exported value from the required module instead of global.Realm after Napi is complete do a v8 GC after each test. (to catch v8 GC errors caused by native implementation errors like double free and such) * remove comments * make gcc happy code changes enable multi threaded builds on npm install fix npm run test and expose v8 GC to the js tests * use fixed up node-addon-api fork * initialize SubscriptionClass<T> and AsyncOpenTaskClass<T> classes throw more meaningful errors for not initialized constructors * Fixes copying of extra properties from node::Exception to the Napi::Error exception on rethrow rethrow Napi:Errors instead of creating new ones where needed (this might be good to have in all places which catch generic std::exceptions) fixes calling v8 GC correctly after each test is complete simplify nested-list-helper to use the same schema classes in place instead of using non working hackery to include schemas.js fix session tests and enable testProgressNotificationsForRealmConstructor test fix building and rebuilding to be done only once on non Windows platforms enable parallel builds * refactor get and set proxy traps to support get/set property descriptors from the _proto chain. refactor the way readonly properties are detected fix npm build commands to correctly do parallel builds * Check if the _instance member of an object is instanceOf the constructor fixes permissions tests * fix worker command args (fixes async tests) * fix RN build update node versions and electron versions fix for linux ci builds * fix node 13 version * remove node 13 * TEMP: disable windows build * fix linux tests on ci * use unique test name for jasmine filtering * fixed node_protected copy assigment operator to use the copy-and-swap idiom fixed compiler warning on get connection state value * fixed node_protected copy assigment operator to use the copy-and-swap idiom * fixed realm module name * use patched version of diskusage (napi version of this module) * change the order of diskusage and ros installation * fix ROS script * remove path node-diskusage * enable windows builds * fix GlobalNotifierClass and ChangeObject class to create their napi constructors. * use node 10 as testing version on CI * use only latest major versions * use only node 10 for testing * remove nan dependency * remove nan usage * change realm version * fix propertyDescriptor lookup to walk up the prototype chain of the _proto object * fix proxySetterTrap to consult the target object and set the property on it before going up the prototype chain for the property added some debug constants for ease of debugging of proxy traps * fix unused variable warnings * change the version * fix dependencies version * reuse the proxy handler instance across instances of the same type * allow clearing of internal object. (fixes ChangeObject<T>::close) * Use latest node-addon-api * use the fixed version of node-addon-api * fix type in variable name * fix testPartialSync test * fix typo * install git in the android container * use node 10 for testing (fixes test ROS installation not working on node 12) * fix electron tests (expose v8 GC as tests require it now) * another way to expose V8 GC to electron tests * fixed stacktraces from callbacks and added a test for that do not overwrite exceptions from node_function methods optimize getting the the arguments as napi_values * fix conditions for tests being run on the different platforms by fixing the platform constants. * fix detection electron * fix session tests * call V8 GC for node and electron tests only * tests for node implementation should be called for v8 platforms only * fix tests.sh so USE_REALM_DEBUG is available at both "node" and "test-runners" targets remove testing Linux Debug target * use only major for test versions * fix node version * revert electron versions * revert node version change * define a electronTestVersion * fix typo * test only with electron 3.1.13 (nodejs 10), since newer versions will yield the same results * use shallow and depth 1 when cloning the repo and submodules * do not use proxies for the native types that do not need it. refactor internal object handling when creating instances * update napi version * use caching for RealmObjectClass constructors, invalidate the cache whenc RealmDelegate is destroyed call the schema constructors as constructors (this fixes ES6 classes support) support ES6 classes by calling the constructor correctly with new * validate the result of the RealmObject constructor is indeed an instance of this object refactored caching to be after all napi invocations so exceptions do not result in leaked SchemaObjectType instances * fix node Protected double free bug when move operator was used on that instance * use external symbol constant when defining properties do not redefine properties if they already are defined. (Fixes exception on .DefineProperty call) * Use PropertyDescriptors instead of ClassPropertyDescriptors for RealmObjectClass Use schema version as part of the caching name define the external property on both the instance and its proto object. (since some calls for get_internal are with the proto object) skip redefining RealmObjectClass members on user defined constructors in the schema handle exceptions in property getter callbacks fixed caching of commonly used functions * fixed build for linux with gcc fixed JSON.stringify with a custom toJSON function to include the schema properties from the instance prototype fixed testRealmOpenAsyncNoSchema * fix RN build * fix toJSON property to be non enumerable fix enumerable tests * make all extension constructors inherit from RealmObjectClass * fix adapter tests * revert change * fix adapter tests * fix memory leak for the internal field for RealmObjectClass instances optimize external value access * guard against a memory leak if exceptions are thrown while creating the RealmObjectClass instance * fix RN code path. For RN user constructors in the schema are still called as functions * temporary disable free on exception for RN testing * try..catch only for node * uncomment required code * fix enumerables tests for RN * fix tests to test correctly for object properties where Object.keys previously worked * optimized getProxyTrap to support List and Results objects only. Removed the generic functionality that can handle any other native class * remove dead code and commented method * add helper methods keys and entries start populating the changelog.md * refactor and optimize proxy traps * remove dead method * fix getting version of electron * rollback electron version check (not needed) * show the full error on failure including the stack trace * change spectron dependency to a specific version * fix testListConstructor expected message * bump spectron version to 6 since we test with electron 4 * Use Electron 5 Use spectron 7 enable nodeIntegration in the test app * unify illegal constructor exception message for RN and node * rollback expected message change * update electron to v5 for integration tests * update electron-builder to latest * remove incorrect writable attribute on an accessor property * refactor RN to reflect NodeJS (NAPI) JS objects runtime structure (brings correct class syntax support for RN) * get_internal returns nullptr when called with incorrect 'this' object. Fixes expanding the proto object of an instance in the debugger and calling native functions on an instance with bound 'this' object (Function.call(otherObject, args) don't set internal property on instance's proto object * workaround git + docker + jenkins combination issue * fix message * fixed invalidation of cached constructors on RN app reload fixed instanceof for RealmObjectClass instances fixed js::Protected<JSValueRef> instances to retain the context until destructor is called to be able to free the protected value * fix variable name * use supported int to string conversion on android * get_internal and set_internal take a Context now * remove dead method * add forgotten file * remove dead method * fix enumerable property names test * fix class syntax extending Realm.Object (class My extends Realm.Object) remove dead method * empty array indexer should return undefined * add tests for class syntax support * use specific version of node to make CI React Native Android integration tests succeed * handle PR comments * fix Jenkins + git + docker issue: Error: "npm ERR! fatal: unable to look up current user in the passwd file: no such user" (https://stackoverflow.com/questions/51753777/no-such-user-git-commit-error-in-jenkinsfile) * fix Jenkins syntax * reduce exception handling code duplication * rename test method * fix changelog.md * abort on unknown connection state values * use snake_casing * update to latest node 10 version * try fixing jenkins + docker + git issue * another try at fixing Jenkins error : npm ERR! fatal: unable to look up current user in the passwd file: no such user * another try at fixing Jenkins error : npm ERR! fatal: unable to look up current user in the passwd file: no such user * another try at fixing Jenkins error : npm ERR! fatal: unable to look up current user in the passwd file: no such user * another try at fixing Jenkins error : npm ERR! fatal: unable to look up current user in the passwd file: no such user * another try at fixing Jenkins error : npm ERR! fatal: unable to look up current user in the passwd file: no such user * don't run build stage on aws * don't run linux build on aws * try disable electron sandbox * don't use aws for testing stage * try to fix electron 5 SUID sandbox helper not configured correctly error * alternative way to fix electron 5 SUID sandbox helper not configured correctly error * remove debug code * add major node versions * use static_cast instead of c style casts * Revert "use static_cast instead of c style casts" This reverts commit 0f9f9ee. * update node-pre-gyp * fix release version try fix CI * remove not needed test versions * install major ndoe.js versions in docker * fix node.js versions * addressing PR comments * pr comments * update all electron version to latest * update spectron to 10 for Electron 8 * set electron version only if the process.versions.electron is writable property Co-authored-by: blagoev <linuka@Blagoev-PC.localdomain> * Prepare v5.0.0 (#2757) * Prepare v5.0.0 Co-Authored-By: Brian Munkholm <bmunkholm@users.noreply.github.com> * [v5.0.0] Bump version * Adding changelog template * fixed crash on node process exit when destructors for global objects … (#2761) * fixed crash on node process exit when destructors for global objects are called. added node::Protected.SuppressDesctruct function to disalbe desctruction on objects when process exits. added node 11 to node.js versionsto to be prebuild for deployment * [5.0.1] Bump version * Adding changelog template * 5.0.2 (#2764) Fix for fixed crash on node process exit when destructors for global objects are called. Fixes v5.0.0 and v5.0.1 * Fix android rjs v5 (#2785) * fix Realm Object properties not working in RN for Android in v5 * add changelog * PR review * fix changelog * fix issue link in changelog * update ts definition of the Realm Object (#2786) * update ts definition of the Realm Object * fix description * fix descriptions * update changelog (#2788) * update changelog * fix changelog message * [5.0.3] Bump version * Adding changelog template * Adding a platform independent print (#2789) * fix: Use node-tar instead of decompress to remove vulnerable dependency (#2777) decompress is vulnerable to arbitrary file overwrite and does not appear to be actively maintained Co-authored-by: blagoev <lubo@blagoev.com> * Remove outdated newsletter link (#2780) * Watch-mode for the React Native integration tests (#2793) * Linter ran on the integration tests RN App * Installing tests package before packing it * Enabled --watch on RN integration test harness * Adding a test for creating and accessing objects * Package locks got updated * Removed a verbose console.log * Upgraded mocha-remote, enabled UI updates and fixed watch mode * Add --no-save to prevent updates to package-locks * Ran eslint with the root configuration * Simplified the integration-tests package.json * Upgraded eslint and switched from es6 to es2017 * Ran eslint --fix in the RN environment * Conforming to the Markdown codestyle suggestions * add explicit includes * fix object tests on Windows (#2801) * Added method enableSessionMultiplexing for Realm.Sync (#2791) * Added method enableSessionMultiplexing for Realm.Sync * Added changelog * Improved changelog * fix core-6 build * use mockery in place to mock realm path even in local test runs. This is to ease debugging. * don't use mockery helper * remove aws from Jenkins (#2808) * remove aws from Jenkins * Update Dockerfile to use newer version of git Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com> * add package-lock * fix: Update OpenSSL URL in Dockerfile (#2802) * fix tsc invocation * remove docker condition for android builds * do a npm install on prepack otherwise npm run build can't find tsc * Bump https-proxy-agent in /integration-tests/environments/node (#2818) Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases) - [Commits](TooTallNate/proxy-agents@2.2.1...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump https-proxy-agent in /integration-tests/environments/electron (#2817) Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases) - [Commits](TooTallNate/proxy-agents@2.2.1...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * try fixing integration tests run * fix realm object entries function (#2829) * fix realm object entries function * add changelog entry * Add Electron 7.2.x as a prebuild target (#2833) * Client reset error should surface (#2679) * Test reproducing RJS-347 * Update object store * Surface client reset * Add node 14 to CI. (#2835) * Add node 14 to CI. * Use patched version of node-pre-gyp. * Don't use compression pointers on Windows. * update package-lock * update package-lock files in integration tests * use prebuild libraries for openssl. (#2838) * use prebuild libraries for openssl. * tidy up * address PR review Co-authored-by: blagoev <linuka@Blagoev-PC.localdomain> * update package-lock files (#2839) * remove android tag * use android tag only * bump * update OS core-6 * fix typescript errors * update integration-tests package-lock files * new package locks * install tsc so npm run build can find tsc * install typescript properly * install typescript globally before running npm run build command * fix typescript installation in Jenkins * run install for the integration-tests package to prepare for testing * run npm install for the integration-tests/tests package * fix path to nvm-wrapper * disable package-lock for the integration-tets environments packages. The integrity of the tgz packages differs from the one inside the package-lock file. * don't use package-lock for electron and react-native environments in integration-tests * run npm ci for the tests package for electron and react-native * fix nvm wrapper invoke on reactNative integration-tests * bump CI * fix integration tests (#2842) * fix integration tests run on CI by invoking the tests/install before tests/pack script * don't use package-lock for the environments packages. The integrity inside the package-lock does not allow the installation from the tgz file source to succeed for realm and realm-integration-tests packages * use correct android node label for CI * Getting ready for v5.0.4. (#2840) * Getting ready for v5.0.4. Co-Authored-By: Brian Munkholm <bmunkholm@users.noreply.github.com> * [5.0.4] Bump version * Adding changelog template * Update for scheduler API changes (#2852) * use napi 3.0 (#2851) * update object store to latest master (#2858) * fix package-lock files * Don't close a closed Realm * Add release notes * [v6.0.0-beta.1] Bump version * remove package-lock temporary * update OS to latest in v10 * removed dead files added new package-lock.json * fix building on windows.... updated new js apis to use v5 NAPI changes updated object-store to latest from v10 * fix missing implementations.... rewrite all with Napi * fix build * forward declare RealmClass * update OS to latest v10 fix warning * update OS fix android build * fix jsc signatures * Fix rn build * fix running of the tests. * update object store to latest v10 * update package.json disable lerna post install action fix tests.sh to always build with sync, fix build when no sync option is passed * fix dependency * update package files * fix build * updated object store to latest v10 use correct dependencies in dependencies.list remove dead file from realm.gypi * fix android build * get rid of segfault-handler * remove crashing segfault-handler module * Fill in platform parameters * Fix ObjectId and Decimal128 * wip * PR feedback * PR feedback * Fix ObjectId and Decimal128 (#2897) * Fix ObjectId and Decimal128 * Fix async errors when testing * Some tests updated. Removed obsolete tests. * fix tests running by completing the prepare step correctly remove dead ROS files * dont' start/stop ROS in test.sh * App config platform (#2898) * Fill in platform parameters * Fix ObjectId and Decimal128 * Add User.customData property * Add support for calling server functions * wip * Migrating tests * use latest OS, core and sync remove dead ROS files * use official node-pre-gyp which has node 14 support (#2906) * fix building v6 on windows with no sync (#2905) * fix building v6 on windows with no sync * Update changelog (cherry picked from commit c0a4df7) # Conflicts: # CHANGELOG.md # src/node/node_init.cpp * fix build on linux * fix RN build * Disable debugging in worker -> notification tests are working * fix RN build * updated OS and deps to latest * update os to latest v10 * rename decimal to Decimal128 (#2849) * rename decimal to Decimal128 reanme object id to objectId * Update tests/js/list-tests.js fix objectId name Co-Authored-By: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> * fix build * fix tests Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> * use latest OS v10 Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> Co-authored-by: Kenneth Geisshirt <geisshirt@gmail.com> Co-authored-by: blagoev <linuka@Blagoev-PC.localdomain> Co-authored-by: Kræn Hansen <kraen.hansen@realm.io> Co-authored-by: Rajiv Shah <rajivshah1@icloud.com> Co-authored-by: Stephen Steneker <stennie@cpan.org> Co-authored-by: Michal Hernas <m@hern.as> Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas Goyne <tg@realm.io> Co-authored-by: macaka <macaka@macaka.local> Co-authored-by: Mathias Stearn <redbeard0531@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What, How & Why?
It would be great if Realm could also publish prebuilt binaries for the 7.x line of Electron releases. We would prefer to use Electron 8, but we're currently running into an issue that prevents us from using it. As an open source project we occasionally have third-party developers contribute features or fixes. In particular, Linux users have run into issues with Realm's requirement of a specific OpenSSL version that is not provided with some Linux distros, and have trouble building our app from source as a result.
☑️ ToDos
Compatibility
label is updated or copied from previous entryBreaking
label has been applied or is not necessaryIf this PR adds or changes public API's: