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

Serialization issues - Orleans 8.0.0 #8859

Closed
claylaut opened this issue Feb 16, 2024 · 4 comments · Fixed by #9005
Closed

Serialization issues - Orleans 8.0.0 #8859

claylaut opened this issue Feb 16, 2024 · 4 comments · Fixed by #9005

Comments

@claylaut
Copy link
Contributor

claylaut commented Feb 16, 2024

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. #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 #8860

@ghost ghost added the Needs: triage 🔍 label Feb 16, 2024
@claylaut claylaut changed the title Class derived from generic List - serialization bug - Orleans 8.0.0 Serialization issues - Orleans 8.0.0 Feb 16, 2024
@stephenlautier
Copy link

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

@ReubenBond
Copy link
Member

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.

@claylaut
Copy link
Contributor Author

@ReubenBond I've just created a new issue for issue 2.
#9006

@claylaut
Copy link
Contributor Author

@ReubenBond I've just created a new issue for issue 3
#9007

@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants