When a HEAD build fails, output an instruction to raise PRs not issues#7234
Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom Apr 1, 2020
Merged
Conversation
Member
How about somewhere like: Lines 163 to 164 in 38c7128 BuildError handled above? Should be able to special-case the output based on --HEAD.
|
772c50b to
02ae57b
Compare
--help note that HEAD isn't officially supported
Member
Author
|
Thanks, @MikeMcQuaid! I've done that, accounting for the different exceptions I encountered along the way between patches failing to apply and normal build failures. There's a bit of duplication still... 🤔 |
MikeMcQuaid
reviewed
Mar 31, 2020
- This has to be in multiple places, hence a new method. A patch failing to apply, which is a common occurrence with HEAD builds because the patch is already upstream, raises a different exception to another, "normal" build failure. Tested with: ``` ╭─issyl0@rigel /home/linuxbrew/.linuxbrew/Homebrew ‹head-builds-arent-officially-supported*› ╰─ $ brew install --HEAD mtr ==> Cloning https://github.com/traviscross/mtr.git Updating /home/issyl0/.cache/Homebrew/mtr--git ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 155f76a Merge pull request #340 from Sea-n/master ==> Downloading traviscross/mtr#315 Already downloaded: /home/issyl0/.cache/Homebrew/downloads/82d9d939303d8fceb7a3ae071ecd49a5f075e0fb451b308653b555ffbae74336--315.patch ==> Patching ==> Applying 315.patch patching file packet/probe.c Hunk #1 FAILED at 323. Hunk #2 FAILED at 364. 2 out of 2 hunks FAILED -- saving rejects to file packet/probe.c.rej Error: Failure while executing; `patch -g 0 -f -p1 -i /tmp/mtr--patch-20200330-10734-avjmyy/315.patch` exited with 1. HEAD builds are unsupported by maintainers - please file pull requests instead of issues. ``` and ``` ╭─issyl0@rigel /home/linuxbrew/.linuxbrew/Homebrew ‹head-builds-arent-officially-supported*› ╰─ $ brew install --HEAD zookeeper ==> Cloning https://gitbox.apache.org/repos/asf/zookeeper.git Updating /home/issyl0/.cache/Homebrew/zookeeper--git ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 1ff1b779 ZOOKEEPER-3755: Use maven to create fatjar ==> ant compile_jute Last 15 lines from /home/issyl0/.cache/Homebrew/Logs/zookeeper/01.ant: 2020-03-30 21:45:10 +0100 ant compile_jute Picked up _JAVA_OPTIONS: -Duser.home=/home/issyl0/.cache/Homebrew/java_cache Buildfile: build.xml does not exist! Build failed READ THIS: https://docs.brew.sh/Troubleshooting HEAD builds are unsupported by maintainers - please file pull requests instead of issues. ```
b5f15e1 to
7605924
Compare
Member
|
Thanks again @issyl0! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Have you written new tests for your changes? Here's an example.brew stylewith your changes locally?brew testswith your changes locally?- I didn't originally intend to go into too much detail here about raising PRs rather than issues, as it doesn't feel like something people will read, but I couldn't think of a better place to put that extra detail, so here we are.- If there are better places for this then I'll gladly hear them!to apply, which is a common occurrence with HEAD builds because the
patch is already upstream, raises a different exception to another,
"normal" build failure.
Tested with:
and