Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

mikem8361
Copy link

Issue #7381

@mikem8361 mikem8361 added this to the 1.1.0 milestone Sep 27, 2016
@mikem8361 mikem8361 self-assigned this Sep 27, 2016
@mikem8361
Copy link
Author

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test please

{
s_symbolsType = Type.GetType(
"System.Diagnostics.StackTraceSymbols, System.Diagnostics.StackTrace, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Diagnostics.StackTraceSymbols, System.Diagnostics.StackTrace, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right change? I know you are fixing the version to be the one that Roslyn brought in but is using the version of a Roslyn dependency the right thing to do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically we want to probe for the lowest version and let the loader pick a newer version if that's what is available. That's what will happen here, right @gkhanna79?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericstj I am trying to understand what is the right policy/approach here and not dictate one :) Is S.D.ST expected to come only with Roslyn? If so, then this looks like the right approach (assuming we want to keep the lowest version). Otherwise, this needs to be thought through more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as Roslyn isn't removed from the shared framework (though I've heard it has been discussed), it shouldn't matter. With this change coreclr doesn't depend on the version of S.D.ST because even if Roslyn references a newer version, the coreclr support will still work.

/cc: @weshaggard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @ericstj that we should always try to load the lowest version of the assembly that actually contains this type. As for whether or not it is in the shared framework or not that is a different question, and the code here seems to correctly no-op if the assembly isn't found.

@mikem8361
Copy link
Author

The shared framework/Microsoft.NETCore.App package doesn’t explicitly reference System.Diagnostics.StackTrace. It only gets pulled in because of Roslyn.

I’m not really sure what other version it should be if not this one (4.0.1).

FYI, the reason this bug has made it this far is that my manual testing is flawed and there are no StackTrace related tests (which includes unhandled exception stack traces). It has been on my list but will become my number one priority.

mikem

@mikem8361
Copy link
Author

Yes, that is right and 4.0.1 does seem to be the lowest version so it should always succeeded if S.D.ST exists at all.

@gkhanna79
Copy link
Member

LGTM

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming version 4.0.1 is the first version of the library that contains StackTraceSymbols then that is the right version to use. If there is a lower version then we should use that instead.

@mikem8361
Copy link
Author

Yes, 4.0.1 is the first version.

@mikem8361 mikem8361 merged commit af2b909 into dotnet:release/1.1.0 Sep 28, 2016
@mikem8361 mikem8361 deleted the stacktrace1.1 branch September 28, 2016 09:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants