Jens-G opened a new pull request, #3583:
URL: https://github.com/apache/thrift/pull/3583

   ## Summary
   
   The `ApacheThrift` netstd package pulled the entire ASP.NET Core shared 
framework
   (`Microsoft.AspNetCore.App`) and the full `Microsoft.Extensions.Logging` + 
`.Console` +
   `.Debug` providers into **every** consumer, including client-only and 
non-web applications.
   As [THRIFT-4534](https://issues.apache.org/jira/browse/THRIFT-4534) notes, 
the only type that
   actually requires ASP.NET Core is the `THttpServerTransport` middleware.
   
   This moves that single type into a new **`ApacheThrift.AspNetCore`** package 
so the core
   package is free of the ASP.NET Core stack.
   
   ## Changes
   
   - **New `lib/netstd/Thrift.AspNetCore` project** → package 
`ApacheThrift.AspNetCore`
     (assembly `Thrift.AspNetCore`). Contains `THttpServerTransport`, **keeping 
the
     `Thrift.Transport.Server` namespace** so existing user code compiles 
unchanged. Depends on
     `ApacheThrift` plus the ASP.NET Core HTTP abstractions (framework 
reference on net8+,
     `Microsoft.AspNetCore.Http.Abstractions` on netstandard).
   - **Core `Thrift.csproj`**: dropped 
`Microsoft.AspNetCore.Http.Abstractions`, the
     `Microsoft.AspNetCore.App` framework reference, and 
`Microsoft.Extensions.Logging` /
     `.Console` / `.Debug`. It now references only 
`Microsoft.Extensions.Logging.Abstractions`,
     which is what the `TServer` / `TSimpleAsyncServer` / 
`TThreadPoolAsyncServer` types use.
   - Removed the now-dead `NullLogger.cs` (its only reference was commented 
out; it duplicates
     `NullLogger<T>` from `Microsoft.Extensions.Logging.Abstractions`).
   - Updated consumers that previously relied on transitive references: the 
tutorial Server now
     references the new package; the tutorial Client and the test Server 
declare their own
     `Microsoft.Extensions.Logging` (+ provider) references.
   - Wired the new project into `Thrift.slnx` and `Makefile.am`, and documented 
the two-package
     layout in `lib/netstd/README.md`.
   
   ## :warning: Breaking change
   
   Hosting Thrift over ASP.NET Core now requires adding an 
`ApacheThrift.AspNetCore` package
   reference **in addition to** `ApacheThrift`. **No source changes are 
required** — the
   `THttpServerTransport` type keeps its `Thrift.Transport.Server` namespace, 
so this is a
   packaging / restore-time change only.
   
   ## Resulting core `ApacheThrift` dependency graph
   
   | Target framework | Dependencies |
   |---|---|
   | net8.0 / net9.0 / net10.0 | `Microsoft.Extensions.Logging.Abstractions`, 
`System.Net.Http.WinHttpHandler` |
   | netstandard2.0 / 2.1 | the above **+** `System.IO.Pipes.AccessControl` |
   
   No `Microsoft.AspNetCore.*` package dependency and no 
`Microsoft.AspNetCore.App` framework
   reference remain in the core package (verified from the generated `.nuspec`).
   
   ## Testing
   
   - All five target frameworks of both `Thrift` and `Thrift.AspNetCore` build 
with 0 warnings /
     0 errors.
   - `Thrift.Tests` — 71 / 71 pass.
   - The tutorial Server (`Microsoft.NET.Sdk.Web`) builds and consumes 
`Thrift.AspNetCore.dll`
     via `app.UseMiddleware<THttpServerTransport>()` with no source changes.
   
   ---
   
   *Prepared with AI assistance (`Co-Authored-By: Claude Opus 4.8`); reviewed 
and tested by the author.*
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to