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

bump-cask-pr: bump language checksums in non-running hardware #12241

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Oct 14, 2021

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

Related to issue seen in Homebrew/homebrew-cask#112638
The Cask language SHAs in non-running hardware (e.g. ARM for Intel users) are not updated via bump-cask-pr.

Needs some more testing (and maybe some refactoring) before merge.


EDIT: Does not deal with issue where bump-cask-pr fails when cask.language uses a language block with different key and return value (e.g. en != en-US like in openoffice).

The problem is that cask.language returns the "called" output of language block while cask.languages returns a list of the keys.

One solution: run same cask.language logic (for this approach, it may be good to refactor so to allow fetch_cask(tmp_cask) to avoid reloading cask):

--- a/Library/Homebrew/dev-cmd/bump-cask-pr.rb
+++ b/Library/Homebrew/dev-cmd/bump-cask-pr.rb
@@ -142,9 +142,10 @@ module Homebrew
         end

         cask.languages.each do |language|
-          next if language == cask.language
-
           lang_config = tmp_config.merge(Cask::Config.new(explicit: { languages: [language] }))
+          tmp_cask.config = lang_config
+          next if tmp_cask.language == cask.language
+
           replacement_pairs << fetch_cask(tmp_contents, config: lang_config)
         end
       end

@BrewTestBot
Copy link
Member

Review period will end on 2021-10-15 at 18:48:06 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Oct 14, 2021
@cho-m cho-m added cask Homebrew Cask do not merge in progress Maintainers are working on this labels Oct 14, 2021
@BrewTestBot BrewTestBot added waiting for feedback Merging is blocked until sufficient time has passed for review and removed waiting for feedback Merging is blocked until sufficient time has passed for review labels Oct 15, 2021
@BrewTestBot
Copy link
Member

Review period ended.

@CarterRose

This comment was marked as spam.

@cho-m cho-m force-pushed the bump-cask-arch-lang branch from b744663 to 7dd3b04 Compare April 4, 2022 00:03
@cho-m cho-m removed do not merge in progress Maintainers are working on this labels Apr 4, 2022
@cho-m
Copy link
Member Author

cho-m commented Apr 18, 2022

Should be ready to review/merge.

Once merged, should hopefully will help avoid separate hardware PRs

@github-actions
Copy link

github-actions bot commented May 9, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label May 9, 2022
@cho-m cho-m removed the stale No recent activity label May 9, 2022
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label May 31, 2022
@cho-m cho-m removed the stale No recent activity label May 31, 2022
@cho-m cho-m requested review from MikeMcQuaid and miccal May 31, 2022 23:41
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.

I'm fine with this for now. I'd like to see any future work here go more in this direction: #12786 (comment)

@cho-m
Copy link
Member Author

cho-m commented Jun 1, 2022

Since I don't have write access, can someone merge the PR? Thanks.

@MikeMcQuaid MikeMcQuaid merged commit bdc32c2 into Homebrew:master Jun 1, 2022
@MikeMcQuaid
Copy link
Member

Thanks again @cho-m!

@github-actions github-actions bot added the outdated PR was locked due to age label Jul 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2022
@cho-m cho-m deleted the bump-cask-arch-lang branch March 5, 2024 02:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cask Homebrew Cask outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants