speckleworks / SpeckleCore

Check a brand new Speckle at: https://github.com/specklesystems
https://speckle.systems
MIT License
38 stars 17 forks source link

Converter does not support tuples #40

Closed didimitrie closed 6 years ago

didimitrie commented 6 years ago

Essentially, he freaks out and does not serialise them.

didimitrie commented 6 years ago

Ok, I figured how to serialise them. Deserialising them is though a pain, as are all other "generic type" objects...

Will give it some more shots, though eventually I might say "dynamic and generictype objects are not supported"

tsvilans commented 6 years ago

Fair... seems to be a bag of worms. I'm trying out something new to get rid of using Tuples anyway, using a simple class / struct instead.

tsvilans commented 6 years ago

Since it seems to serialize simple classes and such easily, anyway.

didimitrie commented 6 years ago

I have to check structs, good shout!

didimitrie commented 6 years ago

Structs work nicely. My advice is to yes, avoid using dynamic types and/or stuff with generic arguments. There are some costly workarounds that I'll look into. Until then, I think best is to replace your tuples with structs or some simple classes...

Todos:

didimitrie commented 6 years ago

I'm actually going to close this one for now, too much work for potentially fickle and dangerous functionality...

tsvilans commented 6 years ago

No worries from me. My new stuff doesn't use Tuples anymore.