expert: use recommended build method#276807
expert: use recommended build method#276807AlternateRT wants to merge 1 commit intoHomebrew:mainfrom
Conversation
c5d549f to
67afc54
Compare
Formula/e/expert.rb
Outdated
| (bin/"expert").write <<~SHELL | ||
| #!/bin/sh | ||
| exec "#{libexec}/bin/expert" eval "System.no_halt(true); Application.ensure_all_started(:xp_expert)" "$@" | ||
| SHELL |
There was a problem hiding this comment.
I think homebrew having to maintain a shell script is a big regression and I think that should block this PR from merging.
The old way was an easy script where the whole install was maintained by upstream, this makes a bunch of it specific to Homebrew, where nobody is involved in the upstream project.
There was a problem hiding this comment.
The old way was an easy script where the whole install was maintained by upstream
@SMillerDev The problem with the Burrito method was that it downloads its own precompiled Erlang binaries, which can fail if the Burrito project has not yet made said binaries, like it did here: https://github.com/Homebrew/homebrew-core/actions/runs/24078956292/job/70250704538?pr=276421#step:3:1662
There is also the issue that Burrito expects a patch-specific version of Zig to work. At the moment, that version happens to be latest one available (0.15.2 as of this writing).
But if the Zig project releases a 0.15.3 version, that will be a problem when Homebrew updates the Zig formula.
For the record, this is really just a rewrite of the start_expert executable, which is currently being unlinked on line 34 because it does not work when symlinked (it expects the plain executable to be in the same directory).
After investigating a bit more, I think we could cleanly change this to use the inreplace function instead, like so:
inreplace libexec/"bin/start_expert", '"$(dirname -- "$0")"/plain', "\"#{libexec}/bin/expert\""
bin.install_symlink libexec/"bin/start_expert" => "expert"ef55921 to
c74c767
Compare
c74c767 to
0478f71
Compare
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?brew test <formula>?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?This switches away from the burrito build method and moves towards the recommended plain one instead, which should address the points made in elixir-lang/expert#556 (comment) and elixir-lang/expert#557 (comment), and removes the
zigandxzdependencies.