Skip to content

Use AsyncTask thread-safe logging in GetMicrosoftNuGetPackagesMap#11948

Open
jonathanpeppers with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-finder-use-thread-safe-logmessage
Open

Use AsyncTask thread-safe logging in GetMicrosoftNuGetPackagesMap#11948
jonathanpeppers with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-finder-use-thread-safe-logmessage

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

GetMicrosoftNuGetPackagesMap runs on AsyncTask's background execution path but still logged through the obsolete Log property. This updates the task to use the thread-safe logging helper intended for AsyncTask implementations.

  • Logging path

    • Replace the direct Log.LogMessage (...) call in GetMicrosoftNuGetPackagesMap.RunTaskAsync () with the inherited LogMessage (...) helper.
    • Keep the existing message text and exception handling behavior unchanged.
  • Scope

    • Limit the change to the single background-thread logging site in GetMicrosoftNuGetPackagesMap.cs.
    • Leave task behavior, outputs, and cache handling untouched.
} catch (Exception ex) {
	LogMessage ("Could not download microsoft-packages.json: {0}", ex.Message);
}

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix usage of obsolete Log property in GetMicrosoftNuGetPackagesMap Use AsyncTask thread-safe logging in GetMicrosoftNuGetPackagesMap Jul 2, 2026
Copilot AI requested a review from jonathanpeppers July 2, 2026 03:05
@jonathanpeppers jonathanpeppers marked this pull request as ready for review July 7, 2026 14:09
Copilot AI review requested due to automatic review settings July 7, 2026 14:09
@jonathanpeppers jonathanpeppers enabled auto-merge (squash) July 7, 2026 14:09
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the GetMicrosoftNuGetPackagesMap MSBuild task to use AsyncTask’s thread-safe logging helper while running on the background execution path, avoiding the obsolete Log property usage.

Changes:

  • Replaced Log.LogMessage (...) with the inherited LogMessage (...) call inside RunTaskAsync ()’s exception handler.
  • Removed an extraneous trailing blank line at the end of the file.

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

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix-finder] Use thread-safe LogMessage() helper instead of obsolete Log property in GetMicrosoftNuGetPackagesMap

3 participants