Replace GetCallingAssembly with GetExecutingAssembly#12038
Closed
MichalStrehovsky wants to merge 1 commit intoSeleniumHQ:trunkfrom
MichalStrehovsky:patch-1
Closed
Replace GetCallingAssembly with GetExecutingAssembly#12038MichalStrehovsky wants to merge 1 commit intoSeleniumHQ:trunkfrom MichalStrehovsky:patch-1
MichalStrehovsky wants to merge 1 commit intoSeleniumHQ:trunkfrom
MichalStrehovsky:patch-1
Conversation
`GetCallingAssembly` is not supported with .NET 7 PublishAot. It's not clear why `GetCallingAssembly` was chosen - `GetCallingAssembly` returns the assembly of the method that is calling this method. If two different assemblies were to call `ResourceUtilities.AssemblyVersion`, this code would cache the assembly of the first caller and produce what is essentially an incorrect result for the second caller. Given the only caller of `ResourceUtilities.AssemblyVersion` is within the same assembly, it's likely `Assembly.GetExecutedAssembly()` was intended (it's also indicated by the name of the local variable). Fixes dotnet/runtime#86202. Fixes #8549 (that was won't fixed but it's the same problem).
|
|
Author
|
Didn't realize I'd have to sign a CLA for a de minimis change. If the CLA is required for de minimis changes, feel free to close because I'm not going to authorize the github app to access my account. Just wanted to help a github user in the linked issue, I don't even know what is Selenium for. |
Author
|
Looks like this will not be the only issue based on dotnet/runtime#86202 (comment). Someone who cares about this needs to raise an issue in this repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GetCallingAssemblyis not supported with .NET 7 PublishAot.It's not clear why
GetCallingAssemblywas chosen -GetCallingAssemblyreturns the assembly of the method that is calling this method. If two different assemblies were to callResourceUtilities.AssemblyVersion, this code would cache the assembly of the first caller and produce what is essentially an incorrect result for the second caller.Given the only caller of
ResourceUtilities.AssemblyVersionis within the same assembly, it's likelyAssembly.GetExecutedAssembly()was intended (it's also indicated by the name of the local variable).Fixes dotnet/runtime#86202.
Fixes #8549 (that was won't fixed but it's the same problem).