Skip to content

Add SimulateSystem::with.#15420

Merged
reitermarkus merged 1 commit intoHomebrew:masterfrom
reitermarkus:simulate-system-with
May 14, 2023
Merged

Add SimulateSystem::with.#15420
reitermarkus merged 1 commit intoHomebrew:masterfrom
reitermarkus:simulate-system-with

Conversation

@reitermarkus
Copy link
Member

Extracted from #15225.

Copy link
Contributor

@apainintheneck apainintheneck left a comment

Choose a reason for hiding this comment

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

This refactor is really great.

cache_key = :"#{platform}_#{arch}_#{macos_version}"

@dependent_hash[cache_key] ||= begin
all = eval_all || Homebrew::EnvConfig.eval_all?
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that Homebrew::EnvConfig.eval_all? isn't needed here anymore because we already pass it in manually somewhere else?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, all callers already pass this explicitly.

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.

Nicer API, thanks.

@reitermarkus reitermarkus merged commit d223108 into Homebrew:master May 14, 2023
@reitermarkus reitermarkus deleted the simulate-system-with branch May 14, 2023 19:41
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants