Skip to content

Commit 498fadf

Browse files
committed
Fixes
1 parent 6d56334 commit 498fadf

6 files changed

Lines changed: 31 additions & 16 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ body:
2020
- Azure Relay (Shiny.Net.HttpServer.AzureRelay)
2121
- MCP (Shiny.Net.HttpServer.Mcp)
2222
- SSH Tunnel (Shiny.Net.HttpServer.Ssh)
23-
- Source Generator (Shiny.Net.HttpServer.SourceGenerators)
23+
- Source Generator (typed endpoints, in Shiny.Net.HttpServer)
2424
- Other
2525
validations:
2626
required: true

readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ JWT, OpenAPI, HPACK, QPACK — is built on what is in the box.
1414

1515
| Package | Description |
1616
| --- | --- |
17-
| [Shiny.Net.HttpServer](https://www.nuget.org/packages/Shiny.Net.HttpServer) | The server: HTTP/1.1, HTTP/2 & HTTP/3, routing, middleware, DI scopes, static files, WebSockets, SSE, sessions, OpenAPI, CORS, rate limiting, IP filtering, tunnelling |
18-
| [Shiny.Net.HttpServer.SourceGenerators](https://www.nuget.org/packages/Shiny.Net.HttpServer.SourceGenerators) | Compile-time typed endpoints — route registration, parameter binding, OpenAPI. Zero reflection |
17+
| [Shiny.Net.HttpServer](https://www.nuget.org/packages/Shiny.Net.HttpServer) | The server: HTTP/1.1, HTTP/2 & HTTP/3, routing, middleware, DI scopes, static files, WebSockets, SSE, sessions, OpenAPI, CORS, rate limiting, IP filtering, tunnelling. Includes the typed-endpoint source generator |
1918
| [Shiny.Net.HttpServer.Jwt](https://www.nuget.org/packages/Shiny.Net.HttpServer.Jwt) | JWT authentication on in-box crypto — no `Microsoft.IdentityModel` dependency |
2019
| [Shiny.Net.HttpServer.AzureRelay](https://www.nuget.org/packages/Shiny.Net.HttpServer.AzureRelay) | Azure Relay tunnel provider |
2120
| [Shiny.Net.HttpServer.Ssh](https://www.nuget.org/packages/Shiny.Net.HttpServer.Ssh) | SSH remote-forwarding tunnel provider, including zero-account quick tunnels |

samples/Sample.Api/Sample.Api.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<ProjectReference Include="../../src/Shiny.Net.HttpServer/Shiny.Net.HttpServer.csproj"/>
1616
<ProjectReference Include="../../src/Shiny.Net.HttpServer.Jwt/Shiny.Net.HttpServer.Jwt.csproj"/>
1717
<ProjectReference Include="../../src/Shiny.Net.HttpServer.WebDav/Shiny.Net.HttpServer.WebDav.csproj"/>
18+
<!-- The endpoint generator reaches a consumer through the Shiny.Net.HttpServer package's
19+
analyzers/ folder. Analyzers do not flow across a ProjectReference, so referencing it
20+
in-repo takes the explicit route the package does for everyone else. -->
1821
<ProjectReference Include="../../src/Shiny.Net.HttpServer.SourceGenerators/Shiny.Net.HttpServer.SourceGenerators.csproj"
1922
OutputItemType="Analyzer"
2023
ReferenceOutputAssembly="false"/>

skills/shiny-httpserver/SKILL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ must hold that line, or it fails on a trimmed device build.
184184
### Packages
185185

186186
```bash
187-
dotnet add package Shiny.Net.HttpServer # the server
188-
dotnet add package Shiny.Net.HttpServer.SourceGenerators # typed endpoints (analyzer)
187+
dotnet add package Shiny.Net.HttpServer # the server + the typed-endpoint generator
189188
dotnet add package Shiny.Net.HttpServer.Jwt # JWT auth
190189
dotnet add package Shiny.Net.HttpServer.Ssh # SSH + quick tunnels
191190
dotnet add package Shiny.Net.HttpServer.AzureRelay # Azure Relay tunnel (NOT AOT-clean)

src/Shiny.Net.HttpServer.SourceGenerators/Shiny.Net.HttpServer.SourceGenerators.csproj

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
which is netstandard2.0, not into the app being compiled. -->
66
<TargetFramework>netstandard2.0</TargetFramework>
77
<RootNamespace>Shiny.Net.HttpServer.SourceGenerators</RootNamespace>
8-
<Description>Source generator for Shiny.Net.HttpServer typed endpoints.</Description>
98

109
<IsRoslynComponent>true</IsRoslynComponent>
1110
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
1211
<!-- RS2008 wants AnalyzerReleases.*.md release-tracking files, which only earn their keep for
1312
an analyzer package with a public support contract. -->
1413
<NoWarn>$(NoWarn);RS2008</NoWarn>
14+
15+
<!-- Not a package of its own: Shiny.Net.HttpServer packs this output under analyzers/dotnet/cs.
16+
The [Route]/[Get]/[Post] attributes and the generator that reads them are one feature, and
17+
shipping them separately only creates a way to reference half of it — a user with the
18+
attributes and no generator gets endpoint classes that silently never map. -->
19+
<IsPackable>false</IsPackable>
1520
<IncludeBuildOutput>false</IncludeBuildOutput>
1621
<DevelopmentDependency>true</DevelopmentDependency>
17-
18-
<!-- The build output ships under analyzers/dotnet/cs, not lib/, which is exactly what NU5128
19-
complains about. With no lib/ assembly there is also nothing for a symbol package to carry,
20-
and an empty .snupkg is a hard pack error (NU5017) - so the Release symbol/source settings
21-
from the root Directory.Build.props are turned back off here. -->
22-
<NoWarn>$(NoWarn);NU5128</NoWarn>
2322
<IncludeSymbols>false</IncludeSymbols>
2423
<IncludeSource>false</IncludeSource>
24+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
2525
</PropertyGroup>
2626

2727
<!-- The trim/AOT analyzers inherited from src/Directory.Build.props do not apply to a
@@ -39,8 +39,4 @@
3939
<PackageReference Include="PolySharp" PrivateAssets="all" />
4040
</ItemGroup>
4141

42-
<ItemGroup>
43-
<None Include="$(OutputPath)$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
44-
</ItemGroup>
45-
4642
</Project>

src/Shiny.Net.HttpServer/Shiny.Net.HttpServer.csproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@
1212
<PackageReference Include="Microsoft.Extensions.Primitives"/>
1313
</ItemGroup>
1414

15+
<!-- The typed-endpoint generator ships inside this package rather than beside it. The [Route],
16+
[Get], [Post] … attributes live here, and the generator is what turns them into a
17+
MapXxxEndpoints() call — one feature in one package, so there is no second reference to
18+
forget and no way to end up with attributes that silently do nothing. -->
19+
<ItemGroup>
20+
<ProjectReference Include="../Shiny.Net.HttpServer.SourceGenerators/Shiny.Net.HttpServer.SourceGenerators.csproj"
21+
OutputItemType="Analyzer"
22+
ReferenceOutputAssembly="false"
23+
PrivateAssets="all"/>
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<None Include="../Shiny.Net.HttpServer.SourceGenerators/bin/$(Configuration)/netstandard2.0/Shiny.Net.HttpServer.SourceGenerators.dll"
28+
Pack="true"
29+
PackagePath="analyzers/dotnet/cs"
30+
Visible="false"/>
31+
</ItemGroup>
32+
1533
<ItemGroup>
1634
<InternalsVisibleTo Include="Shiny.Net.HttpServer.Tests"/>
1735

0 commit comments

Comments
 (0)