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

Add homebrew formula tap #124

Closed
sudosubin opened this issue Jul 6, 2022 · 4 comments
Closed

Add homebrew formula tap #124

sudosubin opened this issue Jul 6, 2022 · 4 comments
Labels
needs-investigation Requires study to find an appropriate resolution

Comments

@sudosubin
Copy link

I wanted to use check-jsonschema as a command line tool, but there was no brew formula package.

Contributing Homebrew/homebrew-core upstream has failed due the GitHub repository wasn't notable enough. (Homebrew/homebrew-core#105012)

So I have made a homebrew tap repository (sudosubin/homebrew-cask-jsonschema), but if it exists in an upstream organization(python-jsonschema), it might be better managed.

# before (sudosubin/homebrew-check-jsonschema)
brew tap sudosubin/check-jsonschema

# after (python-jsonschema/homebrew-check-jsonschema)
brew tap python-jsonschema/check-jsonschema

How do others think?

@sirosen sirosen added the needs-investigation Requires study to find an appropriate resolution label Jul 6, 2022
@sirosen
Copy link
Member

sirosen commented Jul 6, 2022

I have a few thoughts on this. I'm just going to share what I'm thinking -- there's no implied resolution or plan here.

First, is installation with pipx install check-jsonschema not sufficient? What is the value-add of being in homebrew vs being able to brew install pipx; pipx install check-jsonschema?

check-jsonschema might gain enough traction to go into homebrew-core at some point.

  • This project is fairly new, it only has about a year of history. It seems to gain a star every 1-2 weeks, and I hope to see the trend accelerate, but I also do not actively promote it.
  • It is slowly/steadily going to become the official CLI for jsonschema, and I believe that Julian wants to drop the CLI from jsonschema at some point.

I've used homebrew but never maintained anything homebrew related.
I took a look at your tap repo, to get minimally familiar, and it seems like it lists pinned versions of dependent python packages. Is that a strict requirement for homebrew? It seems like you'd have to replicate the extras (json5, pyjson5, and toml), and I don't know how that works.

I have a personal project ( pyschemata ) in which I'm toying with an alternative way of vendoring the schemastore schemas needed here for pre-commit hooks. That could become an auto-releasing calver-versioned package, and would help isolate check-jsonschema from upstream changes. But changing dependencies rapidly would need to percolate down to supported install methods. I'm a little worried about how this could impact homebrew support.

This project is still marked beta and is doing v0.x releases. I might be more interested in revisiting once the interface stabilizes enough that I call it 1.0 and mark it production. (At which point, I intend to maintain semver-like release behavior, within reason.)

@sirosen
Copy link
Member

sirosen commented Jul 6, 2022

Oh, also, thanks very much for your interest in this project and for taking the initiative to put together a tap repo!
I think it's super cool that you're interested in this. I'll continue to think about it and may have more conclusive thoughts after my workday.

@sudosubin
Copy link
Author

Thanks for the comment :)

First, many users and projects use Brewfile to bootstrap most dependencies. ex) rails/Brewfile. So I believe it will be easier to use check-jsonschema when it's available via brew.

Second, brew formula does not support optional dependencies/resources. The formula file should include all the necessary dependencies. (AFAIK)

@sirosen
Copy link
Member

sirosen commented Aug 29, 2022

After giving this some more thought and returning to this issue, I think the appropriate action here is to close as a wontfix.

Although I'm happy to offer advice or guidance to anyone looking to repackage and redistribute this code, I'm not prepared to take on the burden of maintaining a non-python distribution format. Plus, when I weigh the concerns I mentioned above about the tap formula format being somewhat-incompatible with the design of this project, I find I'm not fully convinced that this is a good idea.
There are already some problems introduced by supporting both pypi packaging and pre-commit usage, so expanding the packaging surface area further seems unwise.

Given that pipx is redistributed as a formula, I would tend to recommend using that to bootstrap usage. That will allow for things like pipx inject check-jsonschema tomli to get TOML support.

@sirosen sirosen closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation Requires study to find an appropriate resolution
Projects
None yet
Development

No branches or pull requests

2 participants