Repository navigation
Support font sharding in Homebrew/cask - #17265
Conversation
| 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}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
brew infoworked, 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.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks good, thanks @krehel!
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?Happy to make any adjustments as needed to fit style, such as how to arrive at the path prefixes.