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

homebrew-cask-fonts will soon be deprecated #42

Closed
miccal opened this issue May 15, 2024 · 16 comments
Closed

homebrew-cask-fonts will soon be deprecated #42

miccal opened this issue May 15, 2024 · 16 comments

Comments

@miccal
Copy link
Member

miccal commented May 15, 2024

Hello, I am a maintainer for the Homebrew project and I am opening this issue to inform you that we will be deprecating homebrew-cask-fonts and migrating all fonts to the main homebrew-cask repository.

Please check Homebrew/homebrew-cask#112102 (comment) and the comments there-after for more context.

Any questions, please reach out.

Thanks.

@iandol
Copy link
Contributor

iandol commented May 17, 2024

Hi @miccal -- thanks first of all for your hard work. So the theory is that homebrew/linux-fonts should pick up automatically this shift? Currently I cannot install any fonts on Ubuntu.

@miccal
Copy link
Member Author

miccal commented May 17, 2024

Hi @miccal -- thanks first of all for your hard work. So the theory is that homebrew/linux-fonts should pick up automatically this shift? Currently I cannot install any fonts on Ubuntu.

Yes; basically instead of this repo pulling their updates from https://github.com/Homebrew/homebrew-cask-fonts/tree/master/Casks the updates should now be pulled from https://github.com/Homebrew/homebrew-cask/tree/master/Casks/font.

Hopefully it should just be a simple matter of updating https://github.com/Homebrew/homebrew-linux-fonts/blob/master/.github/workflows/ruby.yml accordingly.

@tani
Copy link
Member

tani commented May 17, 2024

Thank you for the information. I am going migrate the repository in a few days.

@tani
Copy link
Member

tani commented May 19, 2024

Thanks to @SMillerDev, I am restoring all the formulas in the repository. Thanks for the information! Cheers.

@tani tani closed this as completed May 19, 2024
@iandol
Copy link
Contributor

iandol commented May 20, 2024

@tani -- Hi this is not working in the wild. Trying to install fonts after updating brew on linux and it errors saying to use --cask to install, but casks don't work and that is the reason this repo exists.

@iandol
Copy link
Contributor

iandol commented May 20, 2024

▶︎ brew update
==> Updating Homebrew...
Already up-to-date.
                                                                                                                                   
▶︎ brew install font-inconsolata
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: Formula homebrew/linux-fonts/font-inconsolata was renamed to homebrew/cask/font-inconsolata.
Warning: No available formula with the name "font-inconsolata". Did you mean font-inconsolata-g or font-inconsolata-lgc?
It was migrated from homebrew/linux-fonts to homebrew/cask.
You can access it again by running:
  brew tap homebrew/cask
And then you can install it by running:
  brew install --cask font-inconsolata

@tani
Copy link
Member

tani commented May 20, 2024

@iandol @azmodude Thanks for pointing that out. I mistakenly merged the upstream homebrew-cask-fonts in commit 699e066, specifically affecting tap_migrations.json. I've now removed it, and everything should be working correctly.

@azmodude
Copy link

@tani Thanks a lot, that fixed it.

@tani
Copy link
Member

tani commented May 20, 2024

I am glad to hear that. Thank you!

@iandol
Copy link
Contributor

iandol commented May 21, 2024

Hi @tani -- this is still not working for me:

▷ brew untap homebrew/linux-fonts
Untapping homebrew/linux-fonts...
Untapped (33 files, 32.8MB).
                                                                                                                                   
▶︎ brew tap homebrew/linux-fonts
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Tapping homebrew/linux-fonts
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-linux-fonts'...
remote: Enumerating objects: 174576, done.
remote: Counting objects: 100% (33254/33254), done.
remote: Compressing objects: 100% (8186/8186), done.
remote: Total 174576 (delta 25485), reused 32684 (delta 25064), pack-reused 141322
Receiving objects: 100% (174576/174576), 28.05 MiB | 4.64 MiB/s, done.
Resolving deltas: 100% (139995/139995), done.
Tapped (26 files, 32.8MB).
   

▶︎ brew tap
homebrew/core
homebrew/linux-fonts
rsteube/tap
                                                                                                                                   
▶︎ brew install font-inconsolata --HEAD
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: No available formula with the name "font-inconsolata". Did you mean fonts-encodings?
==> Searching for similarly named formulae...
==> Formulae
fonts-encodings

To install fonts-encodings, run:
  brew install fonts-encodings

When I tap homebrew/linux-fonts the tap only contains 26 files?

I tried to use the full path to the tap:

▷ brew install homebrew/linux-fonts/font-inconsolata --HEAD
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: No available formula with the name "homebrew/linux-fonts/font-inconsolata".
homebrew/linux-fonts/font-inconsolata was deleted from homebrew/linux-fonts in commit cf9a528bb:
  Remove font-inconsolata.rb

To show the formula before removal, run:
  git -C "$(brew --repo homebrew/linux-fonts)" show cf9a528bb^:Formula/font-inconsolata.rb

If you still use this formula, consider creating your own tap:

@tani
Copy link
Member

tani commented May 21, 2024

I am sorry for that. I noticed that the all formulas were removed in this morning after scheduled task. I have no idea for that at this moment. Give me a day to investigate this issue. Cheers.

image

@tani tani reopened this May 21, 2024
@SMillerDev
Copy link
Member

Attempt two: #45

@Bo98
Copy link
Member

Bo98 commented May 21, 2024

If we want a quick fix, the issue is because the path here is wrong:

comm -23 --nocheck-order <(ls -1 Formula) <(ls -1 homebrew-cask/Casks/font/) | xargs -I{} sh -c 'git rm ./Formula/{} && git commit -m "Remove {}"'

ls: cannot access 'homebrew-cask/Casks/font/': No such file or directory

@Bo98
Copy link
Member

Bo98 commented May 24, 2024

I've pushed the above fix to make things working again for now: 214139f, plus some other minor fixes (616532e, 9db39b0, 3937bbb). We can continue discussion about a bigger refactor in #45 since that's still WIP (it doesn't have commit code yet), but things should be working again now.

I've re-run the workflow and everything looks to be back. Thanks for reporting!

@Bo98 Bo98 closed this as completed May 24, 2024
@iandol
Copy link
Contributor

iandol commented May 24, 2024

Thank you @Bo98 -- I can now see the formulas and they are available. However trying to install one and I get an error:

▶︎ brew install font-stix
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Fetching homebrew/linux-fonts/font-stix
==> Downloading https://github.com/stipub/stixfonts/archive/v2.13.tar.gz
Already downloaded: /home/cog5/.cache/Homebrew/downloads/bfe9076c8d2f2051b7e2f0b7e95f82e4eacb501738c2c40f4e0ef682f6ca7b11--stixfonts-2.13.tar.gz
==> Installing font-stix from homebrew/linux-fonts
Error: An exception occurred within a child process:
  TypeError: Parameter 'sources': Expected type T.any(Pathname, Resource, Resource::Partial, String, T::Array[T.any(Pathname, String)], T::Hash[T.any(Pathname, String), String]), got type NilClass
Caller: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11388/lib/types/private/methods/call_validation.rb:215
Definition: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/pathname.rb:93

Should I report as a new issue, and can anyone else see this?

@Bo98
Copy link
Member

Bo98 commented May 24, 2024

That is a separate issue. Seems to be a regression from fixing #40. I can have a look to see what can be done to make formula installing more consistent to casks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants