|
22 | 22 | <SymbolPackageFormat>snupkg</SymbolPackageFormat> |
23 | 23 |
|
24 | 24 | <!-- |
25 | | - Version of Herald.OSS (the published NuGet package for Herald.Core) |
26 | | - that every sink in this repo depends on. Pinned here so a single |
27 | | - edit moves the whole sink ecosystem to a new Core release. Standalone |
28 | | - clones of Herald.Sinks (where Modules/Core/ isn't a sibling) restore |
29 | | - Herald.OSS from nuget.org at this version; the umbrella-monorepo |
30 | | - build uses the live ProjectReference instead and ignores the pin. |
| 25 | + Version of Herald.OSS that every sink in this repo depends on. |
| 26 | + Pinned here so a single edit moves the whole sink ecosystem to |
| 27 | + a new Herald.OSS release. Standalone clones of Herald.Sinks |
| 28 | + (where Herald.OSS isn't a sibling directory) restore Herald.OSS |
| 29 | + from nuget.org at this version; the umbrella-monorepo build uses |
| 30 | + a live ProjectReference to ../../../Herald.OSS/ instead and |
| 31 | + ignores the pin. Herald.OSS is the canonical upstream — the |
| 32 | + former Modules/Core route is retired. |
31 | 33 | --> |
32 | | - <HeraldCoreVersion>1.0.0</HeraldCoreVersion> |
| 34 | + <HeraldCoreVersion>0.1.0</HeraldCoreVersion> |
33 | 35 | </PropertyGroup> |
34 | 36 |
|
35 | 37 | <!-- |
|
134 | 136 | ctor into LogSinkProviderRegistry.Default at assembly load. |
135 | 137 |
|
136 | 138 | Path is relative to this Directory.Build.props file: |
137 | | - MSBuildThisFileDirectory = Modules/Herald.Sinks/ |
138 | | - + .. = Modules/ |
139 | | - + Generators/MMP.Herald.Generators.csproj |
| 139 | + MSBuildThisFileDirectory = /e/dev/Herald/Modules/Herald.Sinks/ |
| 140 | + + ..\..\.. = /e/dev/ |
| 141 | + + Herald.OSS/generators/MMP.Herald.OSS.Generators.csproj |
140 | 142 | OutputItemType=Analyzer makes Roslyn load it as a generator; |
141 | 143 | ReferenceOutputAssembly=false keeps the netstandard2.0 |
142 | | - generator dll out of the sink's runtime closure. --> |
143 | | - <ItemGroup> |
144 | | - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Generators\MMP.Herald.Generators.csproj"> |
| 144 | + generator dll out of the sink's runtime closure. The generator |
| 145 | + lives in Herald.OSS so the entire sink ecosystem references a |
| 146 | + single upstream artifact. --> |
| 147 | + <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\generators\MMP.Herald.OSS.Generators.csproj')"> |
| 148 | + <ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\generators\MMP.Herald.OSS.Generators.csproj"> |
145 | 149 | <OutputItemType>Analyzer</OutputItemType> |
146 | 150 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
147 | 151 | </ProjectReference> |
148 | 152 | </ItemGroup> |
149 | 153 |
|
150 | 154 | <!-- |
151 | | - Herald.OSS dependency — every sink references the Herald.Core |
| 155 | + Herald.OSS dependency — every sink references the Herald.OSS |
152 | 156 | library. Two resolution paths, picked automatically based on |
153 | | - whether this clone sits inside the umbrella monorepo: |
154 | | -
|
155 | | - * Monorepo — Modules/Core/Herald.Core.csproj exists as a |
156 | | - sibling. ProjectReference pulls the live source |
157 | | - so a Core edit shows up immediately in every |
158 | | - sink build. Private="false" + ExcludeAssets="runtime" |
159 | | - keep Core out of the sink plugin's bin\, because |
160 | | - Herald.Server / the host already loads Core and |
161 | | - the plugin context resolves to that copy via |
162 | | - AssemblyDependencyResolver. |
163 | | - * Standalone — Modules/Core/ does not exist (e.g. a fresh |
164 | | - `git clone https://github.com/mmpworks/Herald.Sinks` |
165 | | - outside the umbrella). PackageReference to |
166 | | - Herald.OSS on nuget.org pinned at the |
167 | | - HeraldCoreVersion declared above. |
168 | | -
|
169 | | - Per-sink csprojs do NOT declare a Herald.Core reference of their |
| 157 | + whether the Herald.OSS repo is cloned as a sibling of the |
| 158 | + Herald monorepo: |
| 159 | +
|
| 160 | + * Sibling clone — /e/dev/Herald.OSS/Herald.OSS.csproj exists |
| 161 | + relative to this monorepo at ../../../Herald.OSS/. |
| 162 | + ProjectReference pulls the live source so a |
| 163 | + Herald.OSS edit shows up immediately in every |
| 164 | + sink build. Private="false" + ExcludeAssets="runtime" |
| 165 | + keep Herald.OSS out of the sink plugin's bin\, |
| 166 | + because Herald.Server / the host already loads |
| 167 | + Herald.OSS and the plugin context resolves to |
| 168 | + that copy via AssemblyDependencyResolver. |
| 169 | + * Standalone — Herald.OSS is not present as a sibling (e.g. a |
| 170 | + fresh `git clone https://github.com/mmpworks/Herald.Sinks` |
| 171 | + outside the umbrella). PackageReference to |
| 172 | + Herald.OSS on nuget.org pinned at the |
| 173 | + HeraldCoreVersion declared above. |
| 174 | +
|
| 175 | + The former route through Modules/Core is retired — Herald.OSS is |
| 176 | + the canonical upstream for the entire sink ecosystem. |
| 177 | +
|
| 178 | + Per-sink csprojs do NOT declare a Herald.OSS reference of their |
170 | 179 | own — the right one comes from here. A sink that needs to override |
171 | | - (e.g. a private-fork experiment pinning a custom Core branch) |
172 | | - sets <HeraldSinkCustomCoreRef>true</HeraldSinkCustomCoreRef> in |
173 | | - its csproj and supplies its own reference; both ItemGroups below |
| 180 | + (e.g. a private-fork experiment pinning a custom branch) sets |
| 181 | + <HeraldSinkCustomCoreRef>true</HeraldSinkCustomCoreRef> in its |
| 182 | + csproj and supplies its own reference; both ItemGroups below |
174 | 183 | short-circuit on that flag. |
175 | 184 | --> |
176 | 185 | <!-- Sink-package branch: Private=false + ExcludeAssets=runtime is the |
177 | 186 | plugin-packaging shape. The sink's .nupkg stays small, and at runtime |
178 | | - Herald.Server / the host has Core loaded — the plugin's |
179 | | - AssemblyLoadContext resolves Core to the host's copy. --> |
180 | | - <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' != 'true'"> |
181 | | - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj"> |
| 187 | + Herald.Server / the host has Herald.OSS loaded — the plugin's |
| 188 | + AssemblyLoadContext resolves Herald.OSS to the host's copy. --> |
| 189 | + <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' != 'true'"> |
| 190 | + <ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj"> |
182 | 191 | <Private>false</Private> |
183 | 192 | <ExcludeAssets>runtime</ExcludeAssets> |
184 | 193 | </ProjectReference> |
185 | 194 | </ItemGroup> |
186 | 195 |
|
187 | | - <!-- Test-project branch: standard reference. Core.dll flows into the |
188 | | - test bin\ so xunit can load the assembly and discover tests. There |
189 | | - is no plugin host loading Core for us in a test process. --> |
190 | | - <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' == 'true'"> |
191 | | - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj" /> |
| 196 | + <!-- Test-project branch: standard reference. Herald.OSS.dll flows into |
| 197 | + the test bin\ so xunit can load the assembly and discover tests. |
| 198 | + There is no plugin host loading Herald.OSS for us in a test process. --> |
| 199 | + <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' == 'true'"> |
| 200 | + <ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj" /> |
192 | 201 | </ItemGroup> |
193 | 202 |
|
194 | | - <ItemGroup Condition="!Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true'"> |
| 203 | + <ItemGroup Condition="!Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true'"> |
195 | 204 | <!-- |
196 | 205 | Standalone PackageReference: NO PrivateAssets / ExcludeAssets. |
197 | 206 | A consumer doing `dotnet add package Herald.Sinks.Datadog` to a |
198 | 207 | plain ASP.NET Core or worker app expects Herald.OSS.dll to flow |
199 | 208 | into their bin\ alongside the sink — otherwise the first sink |
200 | 209 | registration throws FileNotFoundException at runtime. The |
201 | | - monorepo branch above sets Private="false" + ExcludeAssets="runtime" |
| 210 | + sibling-clone branch above sets Private="false" + ExcludeAssets="runtime" |
202 | 211 | because plugins live inside an AssemblyLoadContext where the host |
203 | | - already loaded Core; that's a plugin-packaging optimisation, not |
204 | | - a NuGet-distribution policy. |
| 212 | + already loaded Herald.OSS; that's a plugin-packaging optimisation, |
| 213 | + not a NuGet-distribution policy. |
205 | 214 | --> |
206 | 215 | <PackageReference Include="Herald.OSS" /> |
207 | 216 | </ItemGroup> |
|
0 commit comments