Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Nov 5, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

May need to know if original code was intentional. But at least seems to fix reported issue for me:

Before

rm -rf "$(brew --cache)/api" && HOMEBREW_DOWNLOAD_CONCURRENCY=auto brew outdated
✔︎ JSON API formula_tap_migrations.jws.json
✔︎ JSON API cask_tap_migrations.jws.json
✔︎ JSON API cask.jws.json
✔︎ JSON API formula.jws.json
ca-certificates
clang-format
gh
libomp
openexr

After

rm -rf "$(brew --cache)/api" && HOMEBREW_DOWNLOAD_CONCURRENCY=auto brew outdated
✔︎ JSON API formula_tap_migrations.jws.json
✔︎ JSON API cask_tap_migrations.jws.json
✔︎ JSON API cask.jws.json
✔︎ JSON API formula.jws.json
ca-certificates (2025-09-09) < 2025-11-04
clang-format (21.1.4) < 21.1.5
gh (2.82.1) < 2.83.0
libomp (21.1.4) < 21.1.5
openexr (3.4.2_1) < 3.4.3

MikeMcQuaid edit: fixes #20954

Copilot AI review requested due to automatic review settings November 5, 2025 17:23
Copy link
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.

Pull Request Overview

This PR updates the context assignment mechanism in SystemCommand to use thread-local storage instead of the module-level setter when passing context to background threads.

  • Changed from Context.current = to Thread.current[:context] = for thread context inheritance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

This makes sense to me, thanks a lot @cho-m! 😍

I suspect it's just that the previous code was usually just single-threaded.

Let's try this out and can revert if it causes more issues.

@MikeMcQuaid MikeMcQuaid enabled auto-merge November 5, 2025 17:33
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 5, 2025
Merged via the queue into main with commit d772896 Nov 5, 2025
43 checks passed
@MikeMcQuaid MikeMcQuaid deleted the system_command-avoid-shared-var branch November 5, 2025 18:12
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.

Missing version numbers on brew outdated -g

3 participants