Skip to content

Conversation

@Aaronontheweb
Copy link
Member

Changes

Experimental approach to attaining AOT compat via essentially a second library.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Latest dev Benchmarks

Include data from the relevant benchmark prior to this change here.

This PR's Benchmarks

Include data from after this change here.

- Added DefaultRouterFactories to TypeHints with factory functions for all built-in routers
- Modified Deployer.CreateRouterConfig to use factory functions in AOT mode
- Avoids Type.GetType() and Activator.CreateInstance for router instantiation
- Supports all 14 built-in routers (round-robin, random, smallest-mailbox, etc.)
- Cluster metrics routers excluded (require Akka.Cluster.Metrics assembly)

Fixes IL2057 warning in Deployer.cs:156

Related: akkadotnet#7246
- Modified GetSerializerIdentifierFromConfig to use string-based matching in AOT mode
- Uses TypeQualifiedName() extension to get short assembly-qualified name
- Avoids Type.GetType() call by comparing strings directly
- Format: "TypeFullName, AssemblyShortName" (e.g., "Akka.Serialization.ByteArraySerializer, Akka")

Fixes IL2057 warning in Serializer.cs:200

Related: akkadotnet#7246
- Added [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] to:
  - HasRequiredType(Type actorType)
  - ProducesMessageQueue(Type mailboxType)
  - GetRequiredType(Type actorType)
- Suppressed IL2075 in GetProducedMessageQueueType since all MailboxType implementations have preserved interfaces

Fixes IL2070 warnings in Mailboxes.cs:99, 119, 248
Fixes IL2075 warning in Mailboxes.cs:264

Related: akkadotnet#7246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO MERGE Don't merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants