-
Notifications
You must be signed in to change notification settings - Fork 10.4k
GetDocumentInsider: use System.Diagnostics.DiagnosticSource from runtime (not OOB) #50020
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
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 |
@@ -20,9 +20,7 @@ | |||
</ItemGroup> | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.DiagnosticSource
from runtimeGetDocumentInsider
has historically been using a very old version of the archivedSystem.Diagnostics.DiagnosticSource
from NuGet (OOB); however,System.Diagnostics.DiagnosticSource
has recently been transitively updated in runtime via a resurectedMicrosoft.Extensions.Diagnostics.Abstractions
by @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
GetDocumentInsider
to use the runtime version ofSystem.Diagnostics.DiagnosticSource
(since I can't reasonably removeMicrosoft.Extensions.Hosting.Abstractions
).Notes:
Unsafe
was 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
GetDocumentInsider
appears to be the only likely conflict, which is also supported by the CI failure above only reporting this one package.