Commit Graph

2057 Commits

Author SHA1 Message Date
Marius Rackwitz 48b106e610 Check if there is a global console to silent eslint 2016-08-04 10:12:16 -07:00
Ari Lazier c361031e36 rebase fixes 2016-08-04 10:11:53 -07:00
Marius Rackwitz 7755e7030b Warn when Realm.Types is still used 2016-08-04 10:10:28 -07:00
Marius Rackwitz 9d25435105 [Tests] Stop using Realm.Types 2016-08-04 10:10:28 -07:00
Mark Rowe b08db9f768 Merge pull request #548 from realm/mar/object-store-as-submodule
Switch to pulling the object store in as a submodule
2016-08-02 11:34:29 -07:00
Ari Lazier 1522fb3689 Merge pull request #523 from realm/al-rn-29
Support latest react-native version
2016-08-02 09:59:57 -07:00
Ari Lazier e5344035bf pr feedback 2016-08-02 09:49:08 -07:00
Thomas Goyne f8ed437003 Update the binding for object store API changes 2016-08-02 09:31:25 -07:00
Mark Rowe b62a5e6d99 Pull in the object store as a submodule. 2016-08-02 09:25:17 -07:00
Ari Lazier d31a6d56a6 Merge pull request #537 from realm/yg/relative-nan-path
Get the path to nan relatively
2016-07-31 16:55:07 -07:00
Ari Lazier 67cdae387e revert to creating the context manullay for all react-native versions 2016-07-31 14:25:13 -07:00
Ari Lazier 3b75de4554 test app and compile fixes for RN android 0.29.0+ 2016-07-31 14:25:13 -07:00
Ari Lazier ad97836d19 [0.14.2] Bump version 2016-07-31 14:25:13 -07:00
Ari Lazier c73075c0e6 create JSContext by calling for RN versions which support this 2016-07-31 14:23:12 -07:00
Ari Lazier d2f733f168 support latest react-native version 2016-07-31 14:23:12 -07:00
Scott Kyle d303c7bea1 [0.14.0-rc] Bump version 2016-07-31 14:23:12 -07:00
Scott Kyle 502feab8be Fix for linker error when building for iOS 7
By default, React Native projects target a minimum of iOS 7, but our projects were set to iOS 8 because previously we used a dynamic framework.

When building for an iOS 7 minimum target version, the linker would complain about thread local variables not working on iOS 7. So it was necessary to add even more checks (iOS >= 8 or OS X >= 10.7) before using native thread local variables rather than our shim.

This also changes our projects to target iOS 7 so we can catch these issues quicker in the future.
2016-07-31 14:22:46 -07:00
Yavor Georgiev 6a6ed5a214 Get the path to nan relatively
Under npm3 the `realm` and `nan` modules might end up as siblings so the best way to get the path to `nan` is to require it from within the `realm` module. The `nan` module prints its path so it can be captured by an external build system like in this patch.
2016-07-21 17:39:03 +02:00
Ari Lazier 47c1c2d400 Merge pull request #535 from realm/tg/update-object-store
Update to the latest objectstore code
2016-07-19 08:47:22 -07:00
Thomas Goyne 6a2e86cf93 Use the correct extension for the non-node core download 2016-07-18 15:09:44 -07:00
Thomas Goyne 88b3be3e30 Update to core 1.4.0 2016-07-18 14:55:38 -07:00
Thomas Goyne a4c8d745cf Use List::snapshot() 2016-07-18 14:42:10 -07:00
Thomas Goyne b59af706ea Update binding code for API changes 2016-07-18 14:15:25 -07:00
Yavor Georgiev 9320be158c Allow for non-nullterminated object type names (#97)
`StringData::data()` returns the underlying buffer, which might not be null-terminated, so the resulting string from appending to `"class_"` has garbage in the end. Use the `std::string` conversion of `StringData` because it takes the size of the string into account.
2016-07-18 14:15:25 -07:00
Thomas Goyne 847b6852c9 Change the API-misuse exceptions from runtime_error to logic_error 2016-07-18 14:15:25 -07:00
Mark Rowe 11018952e9 Change API misuse exceptions in object_accessor.hpp to derive from `std::logic_error` rather than `std::runtime_error`.
Also includes the following minor changes:
* Renames `ReadOnlyPropertyValueException` to
  `ReadOnlyPropertyException` since it's the property that's read-only,
  not the value.
* Elminiates some unnecessary copies of arguments passed to the
  exception constructors.
* Makes the exception type data members public, since otherwise there's
  no point in storing them at.
2016-07-18 14:15:25 -07:00
Mark Rowe 00e4790353 Have `List` and `Results` fetch their object schema when requested.
This avoids the need to eagerly fetch the object schema in order to
construct a `List` or `Results`. Instead the work can be deferred until
the object schema is requested. Since `List` and `Results` never use the
object schema themselves this can avoid unnecessary work in some bindings.
2016-07-18 14:15:25 -07:00
Mark Rowe f529ec9f58 Fix a typo in the name of a #define. 2016-07-18 14:15:25 -07:00
Mark Rowe f00eb4f52d Enable clang's warning about implicit fallthrough. 2016-07-18 14:15:25 -07:00
Mark Rowe ac2223b32d Fix compiler checks to match clang on OS X, which CMake labels AppleClang. 2016-07-18 14:12:58 -07:00
Mark Rowe c756045871 Perform extra synchronization the first time `TsanNotifyWorker` hands a `RealmCoordinator` to the worker thread.
This prevents TSan from reporting data races on members of the coordinator.
2016-07-18 14:12:58 -07:00
Mark Rowe 7c0b99594a Replace `Results::set_live` with `Results::snapshot` and `List::snapshot`, and add tests.
`snapshot()` functions are a better fit for what realm-js needs. The new
API also makes it clearer that the liveness of a given `Results`
cannot change at arbitrary times. Changing the liveness at arbitrary
times was not safe and could result in incorrect behavior, such as a
non-live `Results` changing.
2016-07-18 14:12:58 -07:00
Mark Rowe 8798b1c617 Remove workaround for a core issue fixed in core v1.2.0. 2016-07-18 14:12:57 -07:00
Kristian Dupont edf53a1750 Specify width of PropertyType to 1 byte 2016-07-18 14:12:57 -07:00
Thomas Goyne 8293675bd6 Update to core 1.2.0 2016-07-18 14:12:57 -07:00
Thomas Goyne aaa811306e Resolve trivial differences with realm-cocoa 2016-07-18 14:12:57 -07:00
Thomas Goyne bdc8dbc5b2 Enable more warnings (and fix them)
This brings the warnings settings in line with realm-cocoa's.
2016-07-18 13:40:08 -07:00
Ari Lazier 2ed029d74f Merge pull request #512 from realm/sk-vs-code
Add support for debugging in Visual Studio Code
2016-07-17 10:59:18 -07:00
Scott Kyle b06ee441bd Aligning mixpanel implementation with Java & Cocoa (#513)
Aligning mixpanel implementation with Java & Cocoa
2016-06-30 13:26:36 +01:00
Scott Kyle 717d6781a1 Add support for debugging in Visual Studio Code
Since Code runs in Node, rather than Chrome, we need to require the `sync-request` module. The global `__debug__` object was exposed by the vscode-react-native plugin v0.1.5 for us to be able to do that.

Resolves #374
2016-06-29 16:02:50 -07:00
Scott Kyle c026c198ea Merge tag 'v0.14.1'
* tag 'v0.14.1':
  [0.14.1] Bump version
  [0.14.0-rc] Bump version
  Disable "Strip Linked Product" on our static libs
  Fix for linker error when building for iOS 7
2016-06-28 17:32:48 -07:00
Scott Kyle 51ec21e37b [0.14.1] Bump version 2016-06-28 17:27:49 -07:00
Scott Kyle 63adf8732e [0.14.0-rc] Bump version 2016-06-28 12:15:36 -07:00
Scott Kyle 6109675749 Disable "Strip Linked Product" on our static libs
There seems to a bug inside the `strip` command (or its `ld64` library) that is being triggered by some users who get this message: `Assertion failed: (0 && "need to handle arm64 -r reloc")`

It is reported that disabling this setting side-steps the issue, and we don't need any stripping done on the static library itself.

Fixes #503
2016-06-28 12:13:58 -07:00
Scott Kyle e8ea8e493e Fix for linker error when building for iOS 7
By default, React Native projects target a minimum of iOS 7, but our projects were set to iOS 8 because previously we used a dynamic framework.

When building for an iOS 7 minimum target version, the linker would complain about thread local variables not working on iOS 7. So it was necessary to add even more checks (iOS >= 8 or OS X >= 10.7) before using native thread local variables rather than our shim.

This also changes our projects to target iOS 7 so we can catch these issues quicker in the future.
2016-06-27 12:16:35 -07:00
Scott Kyle 8f33b53f8e Merge pull request #499 from realm/sk-adjust-deps
Remove rnpm postlink script
2016-06-23 11:08:42 -04:00
Scott Kyle b6add3a77e Add CHANGELOG item about rnpm 1.9.0+ support 2016-06-22 14:35:16 -04:00
Scott Kyle e0ff68059b Remove rnpm post install script
This will mean we only support rnpm 1.9.0 and above.
2016-06-22 14:25:35 -04:00
Scott Kyle ebdf505194 Move mockery to dev dependency and upgrade to 1.7.0 2016-06-22 14:25:35 -04:00
Scott Kyle 4e714ac5c3 [0.14.0] Bump version 2016-06-22 11:42:27 -04:00