Skip to content

[tools] Fix nullability for the Execution.Environment field. - #15084

Merged
rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:nullable-environment-warning
May 23, 2022
Merged

[tools] Fix nullability for the Execution.Environment field.#15084
rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:nullable-environment-warning

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

The values for environment variables can be null (to remove said environment
variable).

Fixes this warning:

tests/dotnet/UnitTests/TestBaseClass.cs(294,100): warning CS8620: Argument of type 'Dictionary<string, string?>' cannot be used for parameter 'environment' of type 'Dictionary<string, string>' in 'Task<Execution> Execution.RunWithStringBuildersAsync(string filename, IList<string> arguments, Dictionary<string, string>? environment = null, StringBuilder? standardOutput = null, StringBuilder? standardError = null, TextWriter? log = null, string? workingDirectory = null, TimeSpan? timeout = null, CancellationToken? cancellationToken = null)' due to differences in the nullability of reference types.

The values for environment variables can be null (to remove said environment
variable).

Fixes this warning:

    tests/dotnet/UnitTests/TestBaseClass.cs(294,100): warning CS8620: Argument of type 'Dictionary<string, string?>' cannot be used for parameter 'environment' of type 'Dictionary<string, string>' in 'Task<Execution> Execution.RunWithStringBuildersAsync(string filename, IList<string> arguments, Dictionary<string, string>? environment = null, StringBuilder? standardOutput = null, StringBuilder? standardError = null, TextWriter? log = null, string? workingDirectory = null, TimeSpan? timeout = null, CancellationToken? cancellationToken = null)' due to differences in the nullability of reference types.
@rolfbjarne
rolfbjarne requested a review from chamons as a code owner May 20, 2022 16:12
@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label May 20, 2022
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

📋 [PR Build] API Diff 📋

API diff (for current PR)

â„đïļ API Diff (from PR only) (please review changes)

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

API diff (vs stable)

✅ API Diff from stable

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

Generator diff

✅ Generator Diff (no change)

Pipeline on Agent XAMBOT-1042.Monterey'
Hash: a5aefada3e87d8416b3738205d9d8f09a15c8882

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1174.Monterey'
Hash: a5aefada3e87d8416b3738205d9d8f09a15c8882

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

ðŸ’ŧ [PR Build] Tests on macOS Mac Catalina (10.15) passed ðŸ’ŧ

✅ All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: a5aefada3e87d8416b3738205d9d8f09a15c8882

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: a5aefada3e87d8416b3738205d9d8f09a15c8882

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build] Tests passed on VSTS: simulator tests iOS. ✅

Tests passed on VSTS: simulator tests iOS.

🎉 All 58 tests passed 🎉

Pipeline on Agent XAMBOT-1030.Monterey
Merge a5aefad into b773b97

@rolfbjarne
rolfbjarne merged commit 02838f2 into dotnet:main May 23, 2022
@rolfbjarne
rolfbjarne deleted the nullable-environment-warning branch May 23, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants