authzed / spicedb

Open Source, Google Zanzibar-inspired database for scalably storing and querying fine-grained authorization data
https://authzed.com/docs
Apache License 2.0
4.98k stars 267 forks source link

Fix brew script for SpiceDB #1909

Closed josephschorr closed 4 months ago

josephschorr commented 4 months ago

Reference: https://discord.com/channels/844600078504951838/844600078948630559/1242627209043382292

hi, i just tried to install spicedb using homebrew and currently get this error: ➜ ~ brew install authzed/tap/spicedb ==> Installing spicedb from authzed/tap Error: An exception occurred within a child process: NoMethodError: undefined method `exists?' for class File

Seems like .exists was removed in ruby 3.2.0 making this line not valid. https://github.com/authzed/homebrew-tap/blob/main/Formula/spicedb%401.32.0.rb#L19

jzelinskie commented 4 months ago

it looks like Ruby 3.2 renamed it from File.exists to File.exist without creating an alias.

I'm kinda curious what other Formula are doing because ideally we update the callsite to be File.exist and we check the ruby version first and if it's older than 3.2, creates an alias of File.exist to File.exists.