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

Annotate SignalR server for native AOT #56460

Merged
merged 9 commits into from
Jul 1, 2024

Commits on Jun 25, 2024

  1. Annotate SignalR server for native AOT

    Fix SignalR Server's usage of MakeGenericMethod when using a streaming reader (IAsyncEnumerable or ChannelReader) following the same approach as the client. Add a runtime check and throw an exception when trying to stream a ValueType in native AOT.
    
    Adjust the public annotations:
    * Remove RequiresUnreferencedCode from AddSignalR
    * Add RequiresUnreferencedCode to MessagePack and NewtonsoftJson protocols
    
    Support trimming and AOT in DefaultHubDispatcher by adding a feature switch to turn off custom awaitable support.
    Update ObjectMethodExecutor to support trimming and AOT by a new method that doesn't look for custom awaitables, and uses reflection instead of Linq.Expressions.
    eerhardt committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    9021cfc View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    40149a1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de32d11 View commit details
    Browse the repository at this point in the history
  3. Adjust RequiresDynamicCode annotations

    * Move RequiresDynamicCode to the whole Hub<T> class, so developers always get a warning when using IHubContext<THub, T>. This helps because THub needs to be a Hub<T>, which will warn as soon as it is used.
    * Suppress the warning in AddSignalRCore that references HubContext<THub, T> since users will get warnings when they try using IHubContext<THub, T>.
    eerhardt committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    93bfe26 View commit details
    Browse the repository at this point in the history
  4. Add more unit tests

    eerhardt committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    aefb04d View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    035e059 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12c4317 View commit details
    Browse the repository at this point in the history
  3. Fix tests

    eerhardt committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    89d363b View commit details
    Browse the repository at this point in the history
  4. Rename the feature switch to IsCustomAwaitableSupported to align with…

    … other feature switch naming
    eerhardt committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    95a6473 View commit details
    Browse the repository at this point in the history