Skip to content
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

Fix class based models types #4630

Closed
wants to merge 16 commits into from
Closed

Conversation

kraenhansen
Copy link
Member

What, How & Why?

Follow up to #4537 which broke some Realm React code.

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

@kraenhansen kraenhansen requested a review from takameyer June 8, 2022 14:28
@kraenhansen kraenhansen self-assigned this Jun 8, 2022
@cla-bot cla-bot bot added the cla: yes label Jun 8, 2022
@kraenhansen kraenhansen force-pushed the kh/fix-class-based-models-types branch from 2fe03d3 to a3e7eb3 Compare June 8, 2022 14:31
Copy link
Contributor

@takameyer takameyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kraenhansen and others added 11 commits July 7, 2022 09:26
* Throw if constructors doesn't extend Realm.Object

* Updating existing tests to the breaking change.

* Adding a note to the changelog
* Adding a cast to Value operator on ReturnType

* Adding integration tests of class constructors

* Made the test reporter print stack

* Implemented Realm.Object constructor

* Added node implementation and fixed legacy tests

* Read from this.constructor instead of new.target

* Fixing JSC implementation

* Updating types and tests

* Fixed Person and Dog constructors

* Updated @realm/react useObject + useQuery

* Updated types to fix an issue

* Dead code removal

* Updated tests to use default values

* Making the insertion types a bit more loose

* Adding documentation

* Renamed realm_object_object

* Made the constructor "values" required

* Renamed "RealmInsertionModel" to "Unmanged"

* Adding a note to the changelog

* Apply suggestions to docstrings

Co-authored-by: Kenneth Geisshirt <[email protected]>

* Add docstring of set_internal and get_internal

* Expect 2 arguments on the C++ code as well

Co-authored-by: Kenneth Geisshirt <[email protected]>
* [10.20.0-alpha.0] PRE-RELEASE - DO NOT USE IN PRODUCTION

* [10.20.0-alpha.1] Bump version

* [10.20.0-alpha.2] Bump version

Rename namespaces in the JSI codebase to reflect that it doesn't just support Hermes (#4079)

Rework the namespace names in our Hermes/JSI layer to more accurately reflect that we support JSI, and to remove ambiguities and namespace clashes.

This closes RJS-1337.

Fixing C++ lint error

* [10.20.0-beta.0] Bump version

Hermes: Fixing a couple of breaking tests (#4120)

* Relaxing error message asserting tests

* Fixing testListSubscriptSetters

Catching missing libjsi.so as librealm.so loads (#4123)

Updated RN peer dependency version (#4124)

Fix classes not extending `Realm.Object` (#4125)

* Fixing custom classes not extending Realm.Object

* Adding a note to the changelog

* Update CHANGELOG.md

Co-authored-by: FFranck <[email protected]>

Co-authored-by: FFranck <[email protected]>

Fixed throwing "Illegal constructor" (#4128)

Clarifying the get_internal early return

Refixed throwing "Illegal constructor"

Various JSI fixes to greenlight more tests (#4129)

Flipper doesnt support inlined sourcemaps

Return an existing s_ctor

Testing with Hermes on CI (#4106)

* Adding hermes as target branch for the integration tests workflow

* Reading environment variable when enabling Hermes

* Adding test app to watchable directories

* Adding a hermes variant when testing React Native

* Making the ccache engine specific

* Moved react-native entry point to fix lint error

* Attempt at fixing ReactTestAppTests

* Update Podfile to work around the Catalyst issue

Fixes for type conversions and minor cleanups (#4137)

* [10.20.0-beta.1] Bump version

Clean up JavaScriptCore & legacy Chrome debugger RPC layer (#4203)

* Removed 0xd3adc0d3

* Providing a "soft" landing for users running in legacy debugging mode

* Simplified index.js as we have react-native/index.js

* Removed some logging

* Adding a note to the CHANGELOG

* Stop integration testing in legacy debug mode

* Incorporated feedback

* Fixed the environment check 🤦‍♂️

* Removed all mentions of GCDWebServer

Prevent dangling objects on JSCRuntime destruction (#4228)

* WIP

* Refactored to a separate js_notifications.hpp

* Using the NotificationBucket throughout the codebase

* Adding a note to the changelog

* Fixed compiling on GCC

* Trigger garbage collection after every test

* Ensure s_tokens static gets initialized before use

Removed a bash only prepare command

* [10.20.0-beta.2] Bump version

Adding changelog template

Updated package-locks

Copied up the change log

* [10.20.0-beta.3] Bump version

* [10.20.0-beta.4] Bump version

Hermes: Adding an index.native.js (#4461)

* Ading an index.native.js to help bundlers

* Adding a note to the changelog

Update CMakeLists.txt to resolve "react-native" (#4466)

* Update CMakeLists.txt to resolve "react-native"

This enables end-users to build the iOS XCFramework locally from our npm package, if they need it built with the same version of Xcode as they're using to build their app.

* Update CHANGELOG.md

* Updating package-lock.json

* Adding changelog template

* [10.20.0-beta.5] Bump version

* Adding changelog template

* Rolling up relevant notes in changelog

* Class models: `Realm.Object#constructor` for JSI / Hermes (#4435)

* Create prototyped object instead of constructor call

Recreated package-lock

* Ran lint fix

Co-authored-by: Mathias Stearn <[email protected]>

Updated the merge
* Improving ClassModel type

* Fixed changelog
Updating package-lock

Rebuild package-lock.json
Rearranged jsi_init

Refactored flush of UI queue for JSI
Adding an entry in the changelog
@kraenhansen
Copy link
Member Author

Closing this as I believe this has been addressed by another PR from @takameyer, right?

@takameyer
Copy link
Contributor

@kraenhansen Probably? There's not enough context here to know what is meant by:

broke some Realm React code.

With that being said, it should remain closed and new issues should be created if found.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants