Skip to content

Support font sharding in Homebrew/cask - #17265

Merged
MikeMcQuaid merged 1 commit into
Homebrew:masterfrom
krehel:cask-font-fixes
May 10, 2024
Merged

MikeMcQuaid merged 1 commit into
Homebrew:masterfrom
krehel:cask-font-fixes

Conversation

@krehel

@krehel krehel commented May 10, 2024

Copy link
Copy Markdown
Member
  • 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?

Happy to make any adjustments as needed to fit style, such as how to arrive at the path prefixes.

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good so far!

Comment thread Library/Homebrew/tap.rb Resolved
Comment thread Library/Homebrew/tap.rb Resolved
Comment thread Library/Homebrew/tap.rb
sig { params(token: String).returns(Pathname) }
def new_font_path(token)
font_first_letter = T.must(token.split("-").second)[0].to_s
cask_subdir = "fonts/font-#{font_first_letter}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Have you (or anyone) done any testing to ensure the doubly nested subdirectories approach works as expected? This would be the first time we've tried it.

@krehel krehel May 10, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As far as basic tests -

I untapped homebrew-cask-fonts and then installed the fonts @p-linnane had migrated as a test PR. I was able to install, remove, and audit without issue.

brew info worked, but was not quite right so that needs an update as it did not report the nested directories. Not sure if that's because the path doesn't actually exist, or some other update needs done here. So I'm happy to look but knowing this if you want to merge.

From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/f/font-437-plus.rb

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

brew info worked, but was not quite right so that needs an update as it did not report the nested directories. Not sure if that's because the path doesn't actually exist, or some other update needs done here. So I'm happy to look but knowing this if you want to merge.

Yeh, that would be good to fix before we migrate the rest. I suspect there may be some other edge-cases.

Comment thread Library/Homebrew/cask/audit.rb Resolved

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good so far!

@krehel
krehel force-pushed the cask-font-fixes branch from 5192d6a to 836d819 Compare May 10, 2024 15:49

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks @krehel!

@MikeMcQuaid
MikeMcQuaid enabled auto-merge May 10, 2024 15:53
@MikeMcQuaid
MikeMcQuaid merged commit d194ed1 into Homebrew:master May 10, 2024
@krehel
krehel deleted the cask-font-fixes branch May 22, 2024 18:16
@github-actions github-actions Bot added the outdated PR was locked due to age label Jun 22, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 22, 2024
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.

2 participants