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

consider copying prototype when merging #6

Open
fuzetsu opened this issue Oct 3, 2019 · 2 comments · May be fixed by #7
Open

consider copying prototype when merging #6

fuzetsu opened this issue Oct 3, 2019 · 2 comments · May be fixed by #7
Labels
enhancement New feature or request

Comments

@fuzetsu
Copy link
Owner

fuzetsu commented Oct 3, 2019

As discussed here: https://gitter.im/foxdonut/meiosis?at=5d9647e65173c33ca161959d

Would be useful when you need to manage data that has special methods defined in its prototype and you would like to preserve that while using mergerino.

@fuzetsu fuzetsu linked a pull request Oct 3, 2019 that will close this issue
@fuzetsu fuzetsu added the enhancement New feature or request label Oct 3, 2019
@ChambreNoire
Copy link

I believe this is the source of my problem when using mergerino in conjunction with meiosis-setup and union-type. If I place a union-type in meiosis state and update it later (via a mergerino merge), the union-type methods like case/caseOn are lost. :(

@fuzetsu
Copy link
Owner Author

fuzetsu commented May 28, 2020

Interesting 😄

That's a solid use case. Do you mind confirming if the version of mergerino on that branch solves the problem (#7)

The only thing preventing me from merging it is probably unfounded concerns about performance loss, and questions about use cases.

I find it nice to keep a serializable state, but complex objects like union-type don't really fit that bill. I feel like I'd usually try to keep those separate from state in some way, but I guess enforcing that is not really mergerino's job so expanding to cover this kind of use case should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants