Skip to content

Enable nullable reference types in GenerateNativeAotEnvironmentAssemblerSources.cs#11546

Merged
simonrozsival merged 3 commits into
mainfrom
copilot/fix-finder-enable-nullable-reference-types
Jun 1, 2026
Merged

Enable nullable reference types in GenerateNativeAotEnvironmentAssemblerSources.cs#11546
simonrozsival merged 3 commits into
mainfrom
copilot/fix-finder-enable-nullable-reference-types

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

outputFile (declared ITaskItem?) was dereferenced without a null check, and ! null-forgiving operators were used — both violating repo conventions.

  • Add #nullable enable
  • Add null guard after FindOutputFile returns, logging an error and returning false
  • Remove ! from environmentLlFilePath (now guaranteed non-null after the guard)
ITaskItem? outputFile = GenerateNativeAotLibraryLoadAssemblerSources.FindOutputFile (OutputSources, abi: abi, rid: RID);
if (outputFile == null) {
	Log.LogError ($"Could not find output file for ABI '{abi}' and RID '{RID}'");
	return false;
}

Copilot AI and others added 2 commits May 31, 2026 02:48
…vironmentAssemblerSources.cs

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
…entAssemblerSources.cs

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable nullable reference types in GenerateNativeAotEnvironmentAssemblerSources.cs Enable nullable reference types in GenerateNativeAotEnvironmentAssemblerSources.cs May 31, 2026
Copilot AI requested a review from jonathanpeppers May 31, 2026 02:49
@simonrozsival simonrozsival marked this pull request as ready for review June 1, 2026 09:34
@simonrozsival simonrozsival self-requested a review as a code owner June 1, 2026 09:34
Copilot AI review requested due to automatic review settings June 1, 2026 09:34
@simonrozsival simonrozsival merged commit 28de01f into main Jun 1, 2026
3 of 4 checks passed
@simonrozsival simonrozsival deleted the copilot/fix-finder-enable-nullable-reference-types branch June 1, 2026 09:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix-finder] Enable nullable reference types in GenerateNativeAotEnvironmentAssemblerSources.cs

4 participants