typeetfunc / datascript-mori

Package for union datascript and mori
https://www.npmjs.com/package/datascript-mori
Eclipse Public License 1.0
37 stars 6 forks source link

Update dep versions #10

Closed bahulneel closed 4 years ago

bahulneel commented 4 years ago

This should resolve #8 and #9, but it would be nice if someone could independently verify it for me.

The mocha tests work (which is a start I guess) 😄

ashnur commented 4 years ago

Thanks, will check asap.

bahulneel commented 4 years ago

So far, have only found 1 issue.

It seems that from 0.18.0, transients were introduced as an optimisation. This means that the following now fails:

var db1 = d.empty_db();
var db2 = mori.toClj(db1);
assert(mori.equals(db1, db2));

With the error Error: datascript.DB/conj! is not supported

This may not be a massive issue moving forward, but good to know.

ashnur commented 4 years ago

Yeah, this is a problem.

bahulneel commented 4 years ago

Do you think we could lift the implementation from cljs.core, modify it and use that version to replace the mori version, like how I'm shimming datascript.core in?

bahulneel commented 4 years ago

so we can just implement cljs.core/IEncodeClojure and it's sorted.

ashnur commented 4 years ago

I am at work, but I will definitely review these and merge tonight. I am incredibly grateful @bahulneel that you help out with this, I need it but was not able to figure out how to do it.

bahulneel commented 4 years ago

No problem, we use it on a project here and it was starting to wind me up, especially considering we have closed issues on the main project that we couldn't use.