Skip to content
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

PEVerify/ILVerify test helpers should make sure that verification errors are obtained in English regardless of the current UI culture. #71509

Open
AlekseyTs opened this issue Jan 5, 2024 · 3 comments
Labels
Area-Compilers Tenet-Globalization A feature does not work properly in a given locale or does not respect locale settings. Test Test failures in roslyn-CI
Milestone

Comments

@AlekseyTs
Copy link
Contributor

See #71444 (comment) for context

@AlekseyTs AlekseyTs added Area-Compilers Test Test failures in roslyn-CI Tenet-Globalization A feature does not work properly in a given locale or does not respect locale settings. labels Jan 5, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jan 5, 2024
@AlekseyTs AlekseyTs changed the title PEVerify/ILVerify testhelpers should make sure that verification errors are obtained in English regardless of the current UI culture. PEVerify/ILVerify test helpers should make sure that verification errors are obtained in English regardless of the current UI culture. Jan 5, 2024
@jaredpar jaredpar added this to the Backlog milestone Jan 8, 2024
@jaredpar jaredpar removed the untriaged Issues and PRs which have not yet been triaged by a lead label Jan 8, 2024
@jcouv
Copy link
Member

jcouv commented Jan 9, 2024

FWIW, I think ILVerify uses InvariantCulture for the messages (see here).

		iLImporter.ReportVerificationError = delegate(ErrorArgument[] args, VerifierError code)
		{
			string @string = _stringResourceManager.Value.GetString(code.ToString(), CultureInfo.InvariantCulture);
			builder.Add(new VerificationResult
			{
				Code = code,
				Method = methodHandle,
				ErrorArguments = args,
				Message = (string.IsNullOrEmpty(@string) ? code.ToString() : @string)
			});
		};
		iLImporter.Verify();

@AlekseyTs
Copy link
Contributor Author

AlekseyTs commented Jan 9, 2024

I think ILVerify uses InvariantCulture for the message

It looks like there was a failure during CI, indicating that something didn't work, The test got disabled for non-English environments. We need to understand what is going on, rather that continuing with disabled tests.

@jcouv
Copy link
Member

jcouv commented Jan 9, 2024

Agreed. Based on the format of the error message in CI, it looks like the problem was with PEVerify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Tenet-Globalization A feature does not work properly in a given locale or does not respect locale settings. Test Test failures in roslyn-CI
Projects
None yet
Development

No branches or pull requests

3 participants