From 0ed5c6d3aedeec60532dd06c4e600174f8e92765 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 12 Aug 2023 18:16:20 -0400 Subject: [PATCH 1/2] sonic 1.4.1 Also, switch to `llvm@15` to work around a `bindgen` error. Co-authored-by: danielnachun Co-authored-by: Ruoyu Zhong --- Formula/s/sonic.rb | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Formula/s/sonic.rb b/Formula/s/sonic.rb index 4940e0286cff..4e84e69a0986 100644 --- a/Formula/s/sonic.rb +++ b/Formula/s/sonic.rb @@ -1,8 +1,8 @@ class Sonic < Formula desc "Fast, lightweight & schema-less search backend" homepage "https://github.com/valeriansaliou/sonic" - url "https://github.com/valeriansaliou/sonic/archive/v1.4.0.tar.gz" - sha256 "953314a8c711fde89ac5a7e41ab37d35fffa2b5cc6428d849bc65968e45a8cde" + url "https://github.com/valeriansaliou/sonic/archive/refs/tags/v1.4.1.tar.gz" + sha256 "54c4bf768808ae1b5526d3c557759f5f0fd31aac453aba71638b498fc9015170" license "MPL-2.0" bottle do @@ -16,12 +16,25 @@ class Sonic < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "12a26ea1c3ca5619ac1f72d37526b47862512c136bc0e56b24c5b023b72c1d42" end + # Use `llvm@15` to work around build failure with Clang 16 described in + # https://github.com/rust-lang/rust-bindgen/issues/2312. + # TODO: Switch back to `uses_from_macos "llvm" => :build` when `bindgen` is + # updated to 0.62.0 or newer. There is a check in the `install` method. + depends_on "llvm@15" => :build depends_on "rust" => :build - uses_from_macos "llvm" => :build uses_from_macos "netcat" => :test def install + bindgen_version = Version.new( + (buildpath/"Cargo.lock").read + .match(/name = "bindgen"\nversion = "(.*)"/)[1], + ) + if bindgen_version >= "0.62.0" + odie "`bindgen` crate is updated to 0.62.0 or newer! Please remove " \ + 'this check and try switching to `uses_from_macos "llvm" => :build`.' + end + system "cargo", "install", *std_cargo_args inreplace "config.cfg", "./", var/"sonic/" etc.install "config.cfg" => "sonic.cfg" @@ -43,7 +56,7 @@ def install inreplace "config.cfg", "#{var}/sonic", "." fork { exec bin/"sonic" } - sleep 2 + sleep 10 system "nc", "-z", "localhost", port end end From 4cef46064f65aad632d6b2a7aff719a19927509a Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:52:30 +0000 Subject: [PATCH 2/2] sonic: update 1.4.1 bottle. --- Formula/s/sonic.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Formula/s/sonic.rb b/Formula/s/sonic.rb index 4e84e69a0986..0b12c3f14217 100644 --- a/Formula/s/sonic.rb +++ b/Formula/s/sonic.rb @@ -6,14 +6,13 @@ class Sonic < Formula license "MPL-2.0" bottle do - sha256 cellar: :any_skip_relocation, arm64_ventura: "ba4c2939b999ae73c46cceecb21e25f67f2c0107d8fc53b4ffbe5337299a66c3" - sha256 cellar: :any_skip_relocation, arm64_monterey: "88a2d41df229febf3a5fc32b1af2c78657810e12ef94ca9522a318b590365bf6" - sha256 cellar: :any_skip_relocation, arm64_big_sur: "42ec66f78a25bd41bfb235b6684aa4f17c7360a5cdc2fdff6206b9be0c0b62e0" - sha256 cellar: :any_skip_relocation, ventura: "cdc64f315ef84bee7373ce6d79bb3d556ab9f834c2a1dd69a096bcb5bef9cdbb" - sha256 cellar: :any_skip_relocation, monterey: "00d1c7357fcb1261433e54856267d7c653701b8d154e4951cd16ba70fe66c3c6" - sha256 cellar: :any_skip_relocation, big_sur: "322caf905b32c77a887ac05a5c9d78d1116e3af9701ecc27652c813d86c9f1a6" - sha256 cellar: :any_skip_relocation, catalina: "9396cb130cd9db11186a103e19371ff06d1e6e72ef784f5b9f94415ef29dfef3" - sha256 cellar: :any_skip_relocation, x86_64_linux: "12a26ea1c3ca5619ac1f72d37526b47862512c136bc0e56b24c5b023b72c1d42" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11a23492e2ad193b664c3552fe6ba219552805787fb0eb2fbbf174aae5933cd5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a78f9e55686eaf8951e9eb4055a119872c5de7088a5f1a44c28edfa196d14bc1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7f8c034a9459392dc521e60a46672f9d6c70e91c30cc5ca5b51c21913872f248" + sha256 cellar: :any_skip_relocation, ventura: "87956eae0267936d007753252e2297cbbb96ef129e57355a131bc5ff687a0e74" + sha256 cellar: :any_skip_relocation, monterey: "d123ac2daa1ef6cdebf2f4e8ab00d6fdcaca19c5367f8f66bfda3ad568bcb431" + sha256 cellar: :any_skip_relocation, big_sur: "532f64da105577f6ba6f90f7953370ef4d04826e7919bade075d694b6741cc31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab07e6adf7d8858270f08554aa271b84564c016e23762a45ea8d670abf926342" end # Use `llvm@15` to work around build failure with Clang 16 described in