-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Could not reinstall with --with-emacs-27-branch #218
Comments
it seems that build with |
Hi @shuxiao9058 It's a question to (update the option name) |
but what confused me is that it was success with |
I don't know. It really sounds like a Formula doesn't control what options are passed to it. Also, it's not formulas' responsibility to make
But I will try to come up with simpler reproducible scenario for this issue to see if it's really Let me analyse the output (it's mostly thinking out loud).
If you just
I don't see
Inspecting which resources are downloaded is also interesting. It didn't download if build.with? "multicolor-fonts"
unless build.head?
patch do
url (PatchUrlResolver.url "multicolor-fonts")
sha256 "7597514585c036c01d848b1b2cc073947518522ba6710640b1c027ff47c99ca7"
end
end
end It really looks like |
|
Ok, found an easy way to reproduce. class Foo < Formula
desc "Search tool like grep, but optimized for programmers"
homepage "https://beyondgrep.com/"
url "https://beyondgrep.com/ack-v3.3.1"
sha256 "e4fd286d5a56f459147d562660d2f8bc4548f2f1e2d8cf3a5265b70beedbfc87"
option "with-ham", "Description of the option"
option "without-spam", "Another description"
if build.with? "ham"
puts "[pre] with-ham"
else
puts "[pre] without-ham"
end
if build.with? "spam"
puts "[pre] with-spam"
else
puts "[pre] without-spam"
end
def install
if build.with? "ham"
puts "[install] with-ham"
else
puts "[install] without-ham"
end
if build.with? "spam"
puts "[install] with-spam"
else
puts "[install] without-spam"
end
bin.install "ack-v#{version.to_s.tr("-", "_")}" => "ack"
end
test do
system "true"
end
end Save it as
Now if I
As you can see, first it enters the formula with the default options (no ham but with spam) and then only it gets to the right ones (with ham and no spam). |
In order to report this issue, I need to find which commit has broken desired behaviour. I never use
I am already running out of time, so won't be able to look into this issue until evening/next morning, sorry. Best what I can tell now - stop using |
Thanks for your advice, without |
No problem 😸 I am happy that in the end you have your Emacs with desired options! 💯 This is what I care about 😸 |
@d12frosted very nice explanation of how the reinstall option works. The only way I found to overcome this issue is to unconditionally download all od the patches declaring them as resources. Please have a look to daviderestivo/homebrew-emacs-head@f03b7c9. |
@daviderestivo interesting. Maybe we should repeat this trick here as well 🤔
So downloading all patches unconditionally really fixes this issue.
On the other hand, I am not sure that it will ever fix the |
Yes, at leat it seems to me that nothing is missing ...
I went through the home-brew docs and I found this. So, in short, it seems that the |
Thanks for the link. I think, maybe it's a good idea breaking the package into three (I think I've already shared this idea somewhere). Maybe I will prepare a PR this week just to take a look. |
Yes. I agree as well this is the best approach otherwise the number of combination option would become easily unmanageable. |
@daviderestivo I actually prepared a PR (#226). Please check it out and let me know what you think 😸 |
Please make sure to follow these steps (and mark the checkboxes):
brew update
and try to reproduce the issue againbrew doctor
, fix all issues and try to reproduce your issue againbrew config
andbrew doctor
and include their outputWhat you were trying to do
What happened (include command output)
Command output
Output of
brew config
Output of
brew doctor
The text was updated successfully, but these errors were encountered: