Skip to content
New issue

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

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

Already on GitHub? # to your account

Use delegation to create Cask DSL methods #19288

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Use delegation to create Cask DSL methods #19288

merged 1 commit into from
Feb 11, 2025

Conversation

dduugg
Copy link
Member

@dduugg dduugg commented Feb 11, 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?

Using def_delegators in place of define_method is simpler, and it also allows the methods to be picked up by our Forwardables compiler. This eliminates the need to manually maintain the corresponding cask.rbi file. (I also extended the compiler to override the return type, which prevents type signature regressions from the old RBI file.)

@Rylan12 Rylan12 added this pull request to the merge queue Feb 11, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 11, 2025
Use delegation to create Cask DSL methods
@Rylan12 Rylan12 removed this pull request from the merge queue due to a manual request Feb 11, 2025
@dduugg dduugg added this pull request to the merge queue Feb 11, 2025
Merged via the queue into master with commit 2e211a5 Feb 11, 2025
31 checks passed
@dduugg dduugg deleted the cask-delegation branch February 11, 2025 19:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants