orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Serialization issues - Orleans 8.0.0

Open claylaut opened this issue 1 year ago • 1 comments

We're migrating from Orleans 3.7.1 to Orleans 8.0.0.

Currently, we have these two issues:

Issue 1 When a class inherits from a generic list. Currently, the codegen is skipping this and on runtime, it's throwing an error: Could not find a base type serializer.

image

I've added a simple failing unit test (currently skipped) so you have an easy repro of this issue. https://github.com/dotnet/orleans/pull/8858

Issue 2 As per doc https://learn.microsoft.com/en-us/dotnet/orleans/host/configuration-guide/serialization?pivots=orleans-7-0#serializing-record-types

When using GenerateCodeForDeclaringAssembly for an external lib and Sdk is not added to the library Just added a failing test (which is skipped) with a repro https://github.com/dotnet/orleans/pull/8860

claylaut avatar Feb 16 '24 16:02 claylaut

We also have another issue which is harder to reproduce in tests

namespace Odin.Mimir.Shared.Universe;

[Immutable]
[GenerateSerializer]
public sealed class UniverseIndexQuery : MimirOrleansComplexQuery<UniverseIndexQuery, IUniverseIndices>
{
}

The problem is IUniverseIndices. When its sourcegened the namespace is not resolved, and instead its simply emitted as IUniverseIndices; IUniverseIndices itself is generated through our sourcegen (custom), so most probably thats why its namespace is not resolved.

SourceGen Error
image image

This is the source of our generated IUniverseIndices image

stephenlautier avatar Feb 16 '24 16:02 stephenlautier

Please open a separate issue for "Issue 2" and the IUniverseIndices issue so we can track a fix. They might be caused by the same issue.

ReubenBond avatar May 16 '24 15:05 ReubenBond

@ReubenBond I've just created a new issue for issue 2. https://github.com/dotnet/orleans/issues/9006

claylaut avatar May 16 '24 16:05 claylaut

@ReubenBond I've just created a new issue for issue 3 https://github.com/dotnet/orleans/issues/9007

claylaut avatar May 16 '24 16:05 claylaut