GetDocumentInsider: use System.Diagnostics.DiagnosticSource from runtime (not OOB)#50020
GetDocumentInsider: use System.Diagnostics.DiagnosticSource from runtime (not OOB)#50020mgravell wants to merge 2 commits into
Conversation
…OOB) to prevent CI failure
|
Proposed solution isn't going to be enough by itself; has impact via:
Trying other options... next plan is to change System.Diagnostics.DiagnosticSource in runtime to not ref System.Memory in down-level build; however, this has a non-trivial number of span uses internally; even if we fixed that, we'd still have a problem in that System.Diagnostics.DiagnosticSource "current" targets netstandard 2.0, so it isn't going to build in a netcoreapp2.1 environment; the last version to target 2.1 was 5.0, so we could have a lot of fixes and we'd still have the System.Memory problem Open to suggestions here... my thinking:
|
I agree we should do this, but it's probably too late 😢. Can you open an issue in 9 planning to track it?
I think we should do this unless @Tratcher knows of a quick fix in time for the RC1 build (branch snaps today at 5 PST)
I think the latter option makes sense, maybe that's the quick fix we need |
|
Actually I just had another idea, see code comment |
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0"> |
There was a problem hiding this comment.
Try bringing back the 4.6.0 reference & conditioning it on '$(TargetFramework)' == 'netcoreapp2.1', then having this non-versioned reference conditioned on '$(TargetFramework)' != 'netcoreapp2.1'
There was a problem hiding this comment.
Just pushed that to this branch
|
I folded this change into #50019, closing in favor of that |
(via build-ops)
(probably ignore the actual code here for now; this is becoming more of a place-holder for investigation and discussion)
GetDocumentInsider: use
System.Diagnostics.DiagnosticSourcefrom runtimeGetDocumentInsiderhas historically been using a very old version of the archivedSystem.Diagnostics.DiagnosticSourcefrom NuGet (OOB); however,System.Diagnostics.DiagnosticSourcehas recently been transitively updated in runtime via a resurectedMicrosoft.Extensions.Diagnostics.Abstractionsby @Tratcher ; this is causing CI failures due to competition between two routes to the assembly, as illustrated by the CI here:To resolve this, I propose changing
GetDocumentInsiderto use the runtime version ofSystem.Diagnostics.DiagnosticSource(since I can't reasonably removeMicrosoft.Extensions.Hosting.Abstractions).Notes:
Unsafewas unsupported on netcoreapp2.1; I propose dropping this TFM, but I do not know if this has any significance (edit: yes, it very much does have significance; we can't do this 😢 )I could have changed to netcoreapp3.1, but that too is end-of-life, so... 🤷I've done a quick scan of the repo and
GetDocumentInsiderappears to be the only likely conflict, which is also supported by the CI failure above only reporting this one package.