edgedb / edgedb-net

The official .NET client library for EdgeDB
https://edgedb.com
Apache License 2.0
82 stars 9 forks source link

Fix lazy cache lookup reusing other codecs #38

Closed quinchs closed 1 year ago

quinchs commented 1 year ago

Summary

When compiling a CompilableCodec, the compiled version was cached under the generic type of the codec, there was a issue when the compliable wrapped object codecs or codecs that are non-dependent on their generic definition to represent what they deserialize, causing user-defined types to be deserialized incorrectly.

This PR fixes that by caching the compiled codecs based off of both the user-specified type and the generic by using a combined hashcode.

Closes #37