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

feat: JSON and YAML migration (Mapping -> Serializable) #28

Closed
wants to merge 38 commits into from

Conversation

dukenguyenxyz
Copy link
Contributor

@dukenguyenxyz dukenguyenxyz commented Jan 19, 2021

@dukenguyenxyz dukenguyenxyz self-assigned this Jan 19, 2021
src/active-model/model.cr Outdated Show resolved Hide resolved
src/active-model/model.cr Outdated Show resolved Hide resolved
src/active-model/model.cr Show resolved Hide resolved
@dukenguyenxyz
Copy link
Contributor Author

dukenguyenxyz commented Jan 20, 2021

optimised with present check

def assign_attributes_from_trusted_json(json)

@dukenguyenxyz dukenguyenxyz changed the title refactor: JSON and YAML migration (Mapping -> Serializable) feat: JSON and YAML migration (Mapping -> Serializable) Jan 20, 2021
@dukenguyenxyz
Copy link
Contributor Author

I will review and update this soon so we can pull this change in more quickly as 0.36.0 has officially dropped support for JSON/YAML.mapping

https://github.com/crystal-lang/crystal/releases/tag/0.36.0

@caspiano
Copy link
Contributor

it was deprecated a while ago, that's why we use the json mapping shard. No rush.

@dukenguyenxyz
Copy link
Contributor Author

dukenguyenxyz commented Feb 21, 2021

spider-gazelle/rethinkdb-orm#21

This issue is actually very troublesome. Any sort of instance variable re-declaration in an inherited model will throw the error.

Edit:

This can be fixed if the child class instance_var / getter / setter / property does not redefine the TYPE

@stakach
Copy link
Member

stakach commented Apr 8, 2021

@dukeraphaelng what's the status of this pull?
still good to merge?

Copy link
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

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

LGTM

@dukenguyenxyz
Copy link
Contributor Author

yep this is good to go

@caspiano

@caspiano
Copy link
Contributor

caspiano commented Apr 9, 2021

Waiting on resolution of this comment spider-gazelle/rethinkdb-orm#21 (comment)

shard.yml Outdated Show resolved Hide resolved
@dukenguyenxyz
Copy link
Contributor Author

dukenguyenxyz commented Apr 12, 2021

specs failing due to Enum::ValueConverter update (merge) from master, generics out of scope. will look into this when I have time

edit: resolved!

@stakach stakach requested a review from caspiano April 14, 2021 12:17
@caspiano
Copy link
Contributor

@dukeraphaelng could you please bring this up-to-date with master and check that placeos-models works (or can can be adjusted to support this)

@kimburgess
Copy link
Contributor

Closing in favour of #34.

@kimburgess kimburgess closed this Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants