-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix il verification tests #39538
Fix il verification tests #39538
Conversation
This reverts commit ecb231c.
- Re-enable the test project build - Change string resources in type system to directly use ResourceManager instead of SR abstraction which is unavaliable in the test build tree - Add test to verify that all ExceptionStringID values have associated strings - Use ToolsCommonPath property to successfully reference the correct resource file
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@dotnet/crossgen-contrib |
As a side benefit I tweaked the source so that it uses |
@@ -13,6 +16,9 @@ public abstract class TypeSystemException : Exception | |||
{ | |||
private string[] _arguments; | |||
|
|||
private static Lazy<ResourceManager> s_stringResourceManager = |
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.
Would it be possible to pull this out of TypeSystemException.cs
into a separate file? This will not work when the type system is used as a runtime type system (we need to be able to get rid of ResourceManager
in the UseSystemResourceKeys mode and that one relies on the SR type).
I think now I'm remembering why these were [TEMPORARY EXCEPTION MESSAGE]
for such a long time...
Also the id.ToString()
will not work because the enum is reflection blocked in the runtime type system.
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.
Yes, I'll pull these out into a separate file. Good point on the CoreRT impact. I had forgotten some of these details. Someone in the CoreRT repo will need to implement the resource lookup function in whatever way actually makes sense at runtime.
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.
LGTM, thank you!
* Revert "delete test project. (dotnet#39501)" This reverts commit ecb231c. * Fix ILVerification tests - Re-enable the test project build - Change string resources in type system to directly use ResourceManager instead of SR abstraction which is unavaliable in the test build tree - Add test to verify that all ExceptionStringID values have associated strings - Use ToolsCommonPath property to successfully reference the correct resource file * Address feedback and allow the strings to be handled with a runtime implementation
Fixes #39504