GHC 2016-12-22

10 comments.

, https://git.io/v1jE6 in zmwangx/gharchive
Daemon joins the URL shortening effort: 729a7302d1dea70ab88d94837d7be3378c7c263d. Released in v0.5.0.

, https://git.io/v1jRf in Homebrew/brew
> is App Engine using brew?

No.

> does knowing this help your issue?

Python compiled without SQLite is common enough. It happens whenever `sqlite3.h` is not found in [this short list of paths](https://github.com/python/cpython/blob/59fa72e34da71fb24f52251c1cc88ed3c3b14797/setup.py#L1132-L1138), regardless of `CPATH`, `CFLAGS`, etc. We have this patched in homebrew/core, and knowing another unrelated case of failure doesn't really help us. But thanks anyway.

, https://git.io/v1hRM in Homebrew/homebrew-core
Yes.

, https://git.io/v1hlq in zmwangx/gharchive
At least we can show a placeholder that links to the actual content in such cases. 65dd24ce09bcee99ba8a510a4009e6001e122f61.

, https://git.io/v1hWE in zmwangx/gharchive
Still:

```
16-12-22 02:00:18 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/brew/pull/1715: Got HTTP 503
16-12-22 02:00:35 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/brew/pull/1715: Got HTTP 503
16-12-22 02:00:53 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/brew/pull/1715: Got HTTP 503
16-12-22 02:00:54 [DEBUG] zmwangxsay: Failed to shorten https://github.com/Homebrew/brew/pull/1715
```

😢 

, https://git.io/v1hcw in Homebrew/brew
bump-formula-pr: fix removal of old mirrors
===========================================

- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?
- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).
- [ ] Have you successfully run `brew tests` with your changes locally?

-----

Previously, old mirrors are only removed if the requested spec is stable, and if the mirror lines only have two leading spaces. This leads to stale mirror line(s) when the formula has a stable block like

```rb
  stable do
    url "http://example.com/v1.0.tar.gz"
    mirror "http://example.net/v1.0.tar.gz"
  end
```

where the mirror line is lead by four spaces.

In this commit, we discard the `/(^ mirror .*\n)?/` pattern, and instead create a pattern with the exact url and flexible leading spaces for each mirror of the requested spec.

---

Test case (on homebrew/core 718bd8444838b27318cf74fadcac97ac99e1224e):

<details>
<summary>Before (wrong):</summary>

```diff
$ brew bump-formula-pr --dry-run --write --url=https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz --mirror=https://www.zsh.org/pub/zsh-5.3.1.tar.gz zsh && git -C "$(brew --repo homebrew/core)" --no-pager diff && git -C "$(brew --repo homebrew/core)" checkout Formula/zsh.rb
==> Downloading https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz
Already downloaded: /Users/zmwang/Library/Caches/Homebrew/zsh-5.3.1.tar.gz
==> brew update
==> replace /(^  mirror .*\n)?/ with ""
==> replace "https://www.zsh.org/pub/zsh-5.3.tar.gz" with "https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz"
==> replace "1da273fa96041b395ee9f628d14f2aff08f9a62e98423a990218e2ea037b9a6d" with "3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e"
==> replace /^( +)(url \"https:\/\/downloads.sourceforge.net\/project\/zsh\/zsh\/5.3.1\/zsh-5.3.1.tar.gz\"\n)/m with "\\1\\2\\1mirror \"https://www.zsh.org/pub/zsh-5.3.1.tar.gz\"\n"
==> git checkout --no-track -b zsh-5.3.1 origin/master
==> git commit --no-edit --verbose --message='zsh 5.3.1' -- /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/zsh.rb
==> hub fork --no-remote
==> hub fork
==> hub fork (to read $HUB_REMOTE)
==> git push --set-upstream $HUB_REMOTE zsh-5.3.1:zsh-5.3.1
==> hub pull-request --browse -m 'zsh 5.3.1'
==> git checkout -
diff --git a/Formula/zsh.rb b/Formula/zsh.rb
index 2b09982644..1cbba41682 100644
--- a/Formula/zsh.rb
+++ b/Formula/zsh.rb
@@ -3,9 +3,10 @@ class Zsh < Formula
   homepage "https://www.zsh.org/"

   stable do
-    url "https://www.zsh.org/pub/zsh-5.3.tar.gz"
+    url "https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz"
+    mirror "https://www.zsh.org/pub/zsh-5.3.1.tar.gz"
     mirror "https://downloads.sourceforge.net/project/zsh/zsh/5.3/zsh-5.3.tar.gz"
-    sha256 "1da273fa96041b395ee9f628d14f2aff08f9a62e98423a990218e2ea037b9a6d"
+    sha256 "3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e"

     # We cannot build HTML doc on HEAD, because yodl which is required for
     # building zsh.texi is not available.
```
</details>

<details>
<summary>After (correct):</summary>

```diff
$ brew bump-formula-pr --dry-run --write --url=https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz --mirror=https://www.zsh.org/pub/zsh-5.3.1.tar.gz zsh && git -C "$(brew --repo homebrew/core)" --no-pager diff && git -C "$(brew --repo homebrew/core)" checkout Formula/zsh.rb
==> Downloading https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz
Already downloaded: /Users/zmwang/Library/Caches/Homebrew/zsh-5.3.1.tar.gz
==> brew update
==> replace / +mirror \"https:\/\/downloads.sourceforge.net\/project\/zsh\/zsh\/5.3\/zsh-5.3.tar.gz\"\n/m with ""
==> replace "https://www.zsh.org/pub/zsh-5.3.tar.gz" with "https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz"
==> replace "1da273fa96041b395ee9f628d14f2aff08f9a62e98423a990218e2ea037b9a6d" with "3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e"
==> replace /^( +)(url \"https:\/\/downloads.sourceforge.net\/project\/zsh\/zsh\/5.3.1\/zsh-5.3.1.tar.gz\"\n)/m with "\\1\\2\\1mirror \"https://www.zsh.org/pub/zsh-5.3.1.tar.gz\"\n"
==> git checkout --no-track -b zsh-5.3.1 origin/master
==> git commit --no-edit --verbose --message='zsh 5.3.1' -- /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/zsh.rb
==> hub fork --no-remote
==> hub fork
==> hub fork (to read $HUB_REMOTE)
==> git push --set-upstream $HUB_REMOTE zsh-5.3.1:zsh-5.3.1
==> hub pull-request --browse -m 'zsh 5.3.1'
==> git checkout -
diff --git a/Formula/zsh.rb b/Formula/zsh.rb
index 2b09982644..f6f2fcd48c 100644
--- a/Formula/zsh.rb
+++ b/Formula/zsh.rb
@@ -3,9 +3,9 @@ class Zsh < Formula
   homepage "https://www.zsh.org/"

   stable do
-    url "https://www.zsh.org/pub/zsh-5.3.tar.gz"
-    mirror "https://downloads.sourceforge.net/project/zsh/zsh/5.3/zsh-5.3.tar.gz"
-    sha256 "1da273fa96041b395ee9f628d14f2aff08f9a62e98423a990218e2ea037b9a6d"
+    url "https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.gz"
+    mirror "https://www.zsh.org/pub/zsh-5.3.1.tar.gz"
+    sha256 "3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e"

     # We cannot build HTML doc on HEAD, because yodl which is required for
     # building zsh.texi is not available.
```
</details>

---

There might be other problems with devel mirror handling, but I didn't bother to look at the code carefully.

, https://git.io/v1hZE in Homebrew/homebrew-core
zsh 5.3.1
=========

Created with `brew bump-formula-pr`.

, https://git.io/v1hqm in zmwangx/gharchive
Tackling the git.io failing problem
===================================

git.io has been very troublesome for me. I improved logging in ecd1f84dcafddf1ac0aa1cd7840c21b20d9553c3, and logged

```
16-12-21 18:00:17 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8112: Got HTTP 503
16-12-21 18:00:33 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8112: Got HTTP 503
16-12-21 18:00:49 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8112: Got HTTP 503
16-12-21 18:00:49 [DEBUG] zmwangxsay: Failed to shorten https://github.com/Homebrew/homebrew-core/pull/8112
```

```
16-12-21 20:00:18 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8114: Got HTTP 503
16-12-21 20:00:23 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8114: Got HTTP 422
16-12-21 20:00:23 [DEBUG] zmwangxsay: Shortened https://github.com/Homebrew/homebrew-core/pull/8114 as https://git.io/v1hv5
```

```
16-12-21 20:00:39 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8114#issuecomment-268689511: Got HTTP 503
16-12-21 20:00:55 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8114#issuecomment-268689511: Got HTTP 503
16-12-21 20:01:02 [DEBUG] zmwangxsay: Shortening https://github.com/Homebrew/homebrew-core/pull/8114#issuecomment-268689511: Got HTTP 422
16-12-21 20:01:02 [DEBUG] zmwangxsay: Failed to shorten https://github.com/Homebrew/homebrew-core/pull/8114#issuecomment-268689511
```

I've introduced more improvements in 35c9bbc51188c9fcbf6e8ed409b2f7032c3eb8b8, ec0347dbd5d665489f796f0ae37286b88d72c1bd and 023a3358d5ee791db2b41cda851dac99ee1ad070. Also, new Travis tests will alert me when a short URL is empty; see for instance https://travis-ci.org/zmwangx/gharchive/builds/185948082. Hopefully we'll get to the bottom of it soon.

, https://git.io/v1hvx in Homebrew/homebrew-core
I fixed vim's test to surface the problem in #8005. Not sure how to fix macvim's test, because it's a GUI program inside out.

, https://git.io/v1hv5 in Homebrew/homebrew-core
vim, macvim: revision for python 2.7.13
=======================================

- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

Fixes #8005.