Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Kernel extensions into a separate file #14805

Merged
merged 6 commits into from Feb 27, 2023

Conversation

dduugg
Copy link
Sponsor Member

@dduugg dduugg commented Feb 24, 2023

  • 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?

Moves Kernel extensions to extend/kernel.rb. This makes more logical sense to me, but was motivated by making space in utils.rb for future top-level Utils method (as suggested in #14778 ). Both files remain untyped because they each rely on splats (which I'd prefer to leave out-of-scope for this PR).

I used git cp so this should preserve history. I also moved utils_spec.rb to extend/kernel_spec.rb, because all of the tests in the file appear to be Kernel extension tests.

@BrewTestBot
Copy link
Member

Review period will end on 2023-02-27 at 18:54:36 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 24, 2023
@apainintheneck
Copy link
Contributor

Stupid question: what is git cp?

@dduugg
Copy link
Sponsor Member Author

dduugg commented Feb 27, 2023

Stupid question: what is git cp?

Oops, looks like that's something i have via an extension: https://github.com/tj/git-extras/blob/master/Commands.md#git-cp

But I think I misunderstood the feature, it doesn't actually appear to carry over any history to the new file 😊

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.

Thanks, makes sense to me!

I do think, though, that many of these things could be pulled out of Kernel and into somewhere more specific. Arguably almost all of this should either be in the Homebrew module, imported into Formula and/or a Utils method or Utils::$NEWMODULE.

@MikeMcQuaid MikeMcQuaid added critical Critical change which should be shipped as soon as possible. and removed critical Critical change which should be shipped as soon as possible. labels Feb 27, 2023
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 27, 2023
@BrewTestBot
Copy link
Member

Review period ended.

@MikeMcQuaid MikeMcQuaid merged commit 86aeac6 into Homebrew:master Feb 27, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 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.

None yet

4 participants