Repository navigation
AOT M1-G: one matching rule for every built-in type name - #8613
Merged
Aaronontheweb merged 1 commit intoSep 25, 2026
Merged
Conversation
Aaronontheweb
added this pull request to stack #8607
September 23, 2026 15:28
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
from
September 23, 2026 18:09
817c0a1 to
3edc044
Compare
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
3 times, most recently
from
September 24, 2026 03:31
d69ea0f to
bf6cae6
Compare
This was referenced Sep 24, 2026
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
2 times, most recently
from
September 24, 2026 15:26
4548467 to
5440d55
Compare
Aaronontheweb
removed this pull request from stack #8607
September 24, 2026 16:42
Aaronontheweb
added this pull request to stack #8632
September 24, 2026 16:43
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
from
September 24, 2026 16:44
5440d55 to
91f1ce1
Compare
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
from
September 24, 2026 17:00
91f1ce1 to
39bd1e4
Compare
… Type.GetType's rules Every BuiltIn* table (loggers, schedulers, mailboxes, message-queue semantics, routers, supervisor-strategy configurators, serializers, serialization bindings, the DNS provider) carried two keys per type -- the bare name and "Ns.T, Akka" -- and matched only those two spellings after stripping the assembly identity. Type.GetType accepts more: any assembly identity, an optional space after the comma, and a case-insensitive assembly name. Add TypeExtensions.TrySplitTypeName and TypeExtensions.ToBuiltInAkkaTypeName and route every table lookup through the latter, so each table now carries a single bare-name key and accepts the same spellings Type.GetType did. SerializerIdentifierHelper keeps its own two-pass, any-assembly matching but now shares TrySplitTypeName instead of its private comma-splitting code. Record the widened matching as a v1.6 breaking change and note where the A row's two-key description no longer applies.
Aaronontheweb
force-pushed
the
aot/m1-g-one-builtin-name-rule
branch
from
September 25, 2026 00:46
39bd1e4 to
9f06d36
Compare
Aaronontheweb
commented
Sep 25, 2026
Aaronontheweb
left a comment
Member
Author
There was a problem hiding this comment.
Internal type matchers only need one record now - don't need the extra assembly name qualification. Matches what our reflection-based system did before.
LGTM
This was referenced Sep 25, 2026
Aaronontheweb
added a commit
that referenced
this pull request
Sep 29, 2026
…esolves without reflection (#8654) * AOT: resolve Akka.Hosting's LoggerFactoryLogger in akka.loggers without reflection With Akka.DynamicTypeLoading off, LoggingBus only accepted the three loggers in Akka.dll, so any Akka.Hosting app using AddLoggerFactory() failed at startup with a NotBuiltIn ConfigurationException. LoggingBus now checks a first-party table after the built-in one. A row matches only on the exact type name plus assembly (identity stripped, per #8613), then loads its own literal through a DynamicallyAccessedMembers string parameter so the trimmer keeps the type. An assembly that will not load counts as absent and falls through to today's behavior. Configs that name only core loggers never probe. Tests: switch-off startup and switch-on parity in Akka.Hosting.Tests; no-probe and absent-assembly checks in Akka.Tests. * Review fixes: simplify GetFirstPartyLoggerType, fix a no-probe test that couldn't fail, add switch-on version-skew coverage - Drop the LoadFirstPartyLoggerType try/catch helper: Type.GetType on a literal is a trimmer intrinsic, so the switch arm calls it directly (matches GetBuiltInLoggerType's style). throwOnError defaults to false, so a missing Akka.Hosting still returns null; a broken dll now surfaces its own exception instead of being swallowed. - BuiltInLoggersSpec's "never probes" test only named built-in loggers, so GetFirstPartyLoggerType never ran. It now uses CustomLoggerConfig, which is not built in, so the lookup actually executes and asserts Akka.Hosting is never probed. - Add a switch-on version-skew test to FirstPartyLoggerSpec: a Hosting logger name pinned to a different Akka.Hosting version now resolves with the DynamicTypeLoading switch on, not just off. Make the spec sealed and take ITestOutputHelper. - Amend the #8603 ledger row: switch-off apps can also use Akka.Hosting's LoggerFactoryLogger, not just the three core loggers. Add a new row for this PR.
Aaronontheweb
added a commit
to Aaronontheweb/akka.net
that referenced
this pull request
Sep 30, 2026
…t-party extensions as not-built-in Two review fixes on top of the extensions/provider switch-off guard: 1. ProviderSelection.GetProvider matched akka.actor.provider by exact string, so a spelling variant of a built-in provider - no space after the comma (e.g. "Akka.Cluster.ClusterActorRefProvider,Akka.Cluster"), or a versioned assembly-qualified name - fell through to Custom. With the switch off that meant a working built-in provider threw NotBuiltIn. GetProvider now normalizes through TypeExtensions.TrySplitTypeName (the akkadotnet#8613 rule: strip the assembly identity, split at the comma, compare the assembly case-insensitively) against a small BuiltInProviders table, so every accepted spelling maps to the same ProviderSelection instead. This also fixes Settings.HasCluster being wrongly false for such a spelling, independent of the switch. 2. LoadExtensions treated a first-party extensions-table name whose assembly isn't deployed (TryCreateFirstPartyExtension returns null either way) the same as a name that isn't in the table at all, so with the switch off it threw NotBuiltIn for a name akkadotnet#8648 already promised to log-and-skip. A new IsFirstPartyExtensionName reports a table hit regardless of whether the assembly loads, so LoadExtensions can log-and-skip the absent-module case before reaching the switch-off guard - matching the switch-on behavior, which already fell through to the same log message. Tests added to AkkaFeaturesSpec (provider spelling classification and its end-to-end consequence in both switch states, plus the absent-assembly extension case) and ExtensionsSetupSpec (IsFirstPartyExtensionName). Updates the BREAKING_CHANGES_V1.6.md row to name both cases.
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the AOT milestone-1 stack (stack #8607). Sits on top of #8608.
Problem
The stack had two rules for matching a HOCON type name against Akka's built-in types:
Ns.TorNs.T, Akka, afterStripAssemblyIdentity.BufferPools.MatchesBuiltIn,DnsExtand theserialization-identifiersmatcher split at the comma and compared the assembly name case-insensitively, so they also acceptedNs.T,AkkaandNs.T, akka, asType.GetTypedid.With
Akka.DynamicTypeLoadingon nobody could tell, because a table miss falls back toType.GetType. With it off,"Akka.Dispatch.BoundedMailbox,Akka"threw at a mailbox site but was accepted as a buffer-pool class.Change
Akka.Util.TypeExtensions:TrySplitTypeNamestrips the assembly identity, then splits at the first comma outside a generic argument list. The split used to be private toSerializerIdentifierHelper.ToBuiltInAkkaTypeNamereturns the bare type name when the assembly is absent or isAkka(case-insensitive), andnullfor any other assembly.ToBuiltInAkkaTypeName. Serialization bindings accept the four framework assembly names instead.BufferPools.MatchesBuiltInis deleted.BufferPools.Create,DnsExtandSerializerIdentifierHelperuse the shared helpers.src/core/Akka.With the switch on, nothing changes. With it off, every site accepts the spellings
Type.GetTypeaccepted for Akka's own types. Ledger: new G row, and the A row no longer claims two keys per table.A bare name (no comma) is not trimmed. HOCON keys arrive untrimmed, and trimming would let a padded
akka.actor.mailbox.requirementskey collide with core's own entry. An existing spec guards this.Tests
TrySplitTypeName/ToBuiltInAkkaTypeName: bare name,, Akka,,Akka,, akka, versioned AQN, generic name with bracketed arguments, another assembly, empty input."Akka.Dispatch.BoundedDequeBasedMailbox,akka"resolves as a mailbox type, and"Akka.Routing.RoundRobinPool,Akka"deploys as a router. Both fail on AOT (7/7): canary in CI with a warning baseline, buildTransitive .targets for automatic AOT/trim opt-in, Native AOT docs #8608.Verification (local)
-warnaserrorat 0/0. The solution builds.Akka.Tests: 1425 passed, 0 failed.Akka.API.Testspasses unchanged. No public API change.[canary] OK. Rooted publish shows no new warnings against the 12-entry baseline.