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

Show caveats on formula info pages #1651

Closed
1 task done
woodruffw opened this issue Jan 6, 2025 · 4 comments
Closed
1 task done

Show caveats on formula info pages #1651

woodruffw opened this issue Jan 6, 2025 · 4 comments

Comments

@woodruffw
Copy link
Member

This is a tricky one to categorize; it concerns the contents of formula pages but (I think) requires a general change to the formula site. Reporting on behalf of @disconnect3d who asked me about it.

Opening for discussion since folks may have opinions on whether this is a good idea or not/something we want to do.

  • your issue is with the https://formulae.brew.sh website and not the (generated) contents of a given formula/cask page.

What you were trying to do (and why)

Users on formulae.brew.sh sometimes want to see a formula's caveats without having to run brew info for them. These caveats are useful as part of the pre-install review process, e.g. caveats for starting services tell users whether they're interested in a command.

What happened (include screenshots)

Nothing: caveats are not currently rendered on formula pages.

What you expected to happen

Include caveats below dependencies but above analytics, perhaps?

@EricFromCanada
Copy link
Member

They are currently rendered though. However, since the site is built on macOS ARM runners, any Linux- or x86-specific details won't be shown, e.g. csound.

@woodruffw
Copy link
Member Author

They are currently rendered though. However, since the site is built on macOS ARM runners, any Linux- or x86-specific details won't be shown, e.g. csound.

Huh, I wonder if maybe there's some gaps? I see some caveats on macOS with brew info openvpn, but no caveats are rendered here: https://formulae.brew.sh/formula/openvpn

@EricFromCanada
Copy link
Member

In the openvpn case (and any others with a service block), those caveats are dynamically generated. For the formulae site, the generator just reads and reformats the contents of the caveats key in e.g. https://formulae.brew.sh/api/formula/csound.json (which is blank for https://formulae.brew.sh/api/formula/openvpn.json). See https://github.com/Homebrew/brew/blob/master/Library/Homebrew/caveats.rb for the other auto-generated caveat strings.

@woodruffw
Copy link
Member Author

Cool, TIL! In that case I think this isn't actionable immediately, sorry for the noise and thanks for pointing out how/when the caveats get populated 🙂

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

2 participants