14421 Commits

Author SHA1 Message Date
Markus Reiter
443111896e Share common logic. 2018-08-31 16:51:23 +02:00
Markus Reiter
ccf396887a Add comment about refinement scope. 2018-08-31 16:51:23 +02:00
Markus Reiter
2773ce6156 Don’t clean up symlink target. 2018-08-31 16:51:23 +02:00
Markus Reiter
b63ac557bc Update symlink even if cached_location already exists. 2018-08-31 16:51:23 +02:00
Markus Reiter
9edc355052 Don’t glob for .incomplete downloads. 2018-08-31 16:51:23 +02:00
Markus Reiter
b7847e4657 Don’t migrate symlinks. 2018-08-31 16:51:23 +02:00
Markus Reiter
3988458919 Use real basename for output. 2018-08-31 16:51:23 +02:00
Markus Reiter
516a39f5a4 Move migrations into UpdateMigrator module. 2018-08-31 16:51:23 +02:00
Markus Reiter
fbcaa8c85a Resolve URL to get real file extension. 2018-08-31 16:51:23 +02:00
L. E. Segovia
f7cafb50ad
Enable quarantining of Homebrew-Cask's downloads 2018-08-31 13:16:11 +00:00
Michka Popoff
6e31c662f5
Merge pull request #4773 from iMichka/o2flag
superenv: Use 02 optimization flag for Linux builds
2018-08-30 11:09:50 +02:00
Dominyk Tiller
baab9d841f
Merge pull request #4774 from DomT4/GOCACHE
go: support & use aggressive caching
2018-08-30 04:44:37 +01:00
commitay
e4049b3005
Merge pull request #4775 from commitay/cargo-install
text_cop: update `cargo build` cop
2018-08-30 08:03:42 +10:00
Markus Reiter
801ec6e0a5
Merge pull request #4771 from reitermarkus/rubocop-path
Add `$LOAD_PATH` for RuboCop cops.
2018-08-29 23:51:11 +02:00
Markus Reiter
ad7054cc88 Fix executable with spaces. 2018-08-29 19:30:08 +02:00
commitay
0ce583964e text_cop: update cargo build cop 2018-08-29 23:06:53 +10:00
Dominyk Tiller
b333f7abe6
cleanup_spec: test go_cache cleanup 2018-08-29 13:16:56 +01:00
Dominyk Tiller
318eb5054f
cleanup: cleanup go_cache 2018-08-29 13:16:55 +01:00
Dominyk Tiller
4598995a41
formula: always set GOCACHE
I hadn't planned to move on this so quickly but impressively core
today had its first Go Module using PR, so this has become more useful
than it would've been. Useful reading on the Modules system can be found
via https://golang.org/doc/go1.11#modules.

`GOCACHE` has been a thing for a while but it hasn't really been
especially beneficial to us, so I've ignored it, but with the Go Modules
system it can be incredibly useful in reducing build times & thus CI
burden. A lot of this is explained rather nicely here:
  https://groups.google.com/forum/#!msg/golang-dev/RjSj4bGSmsw/KMHhU8fmAwAJ

The upsides here for us are obvious:
1) We do a *lot* of go-based builds, and the more things move over to the
module system the more comprehensive that cache will become and we'll
need to remotely fetch less dependencies, which massively speeds up
build times even on high-speed connections.
2) Module dependencies aren't limited per formula. If `hugo` fetches a
dependency that is the same version as, for example, `wiki` also needs
`wiki` won't bother to fetch that version remotely but instead will
simply pluck it out of the cache.

If we look at `hugo`, because it's the only formula so far with Module
support:

First build: `built in 1 minute 41 seconds`
Second build: `built in 14 seconds`.

It's worth noting perhaps that we can use just the module cache rather
than the build cache + module cache combination, but doing so leads to
a significant reduction in regained build time. A build under that
system pops an average build time with `hugo` (after the first build)
of ~70 seconds, which is only a 30 second saving on the first build.
However, if we wanted to speed up builds whilst also not eating big chunks
of disk space that is an option.

The downside of a build cache + module cache system is disk usage.
`go` does not exactly eat up disk space sparingly, and the cache size
from `hugo` alone is 258.8MB. That could be an issue on CIs where disk
space is already a squeeze at times, but it's not much different to how
we let the `java_cache` behave now.

All Module-supporting formulae need to do to use the shared cache is
instead of deleting the `GOPATH` env we set everywhere replace it with
this:
```
ENV["GOPATH"] = "#{HOMEBREW_CACHE}/go_cache"
```
2018-08-29 13:16:36 +01:00
Michka Popoff
b7b5fb930d superenv: Use 02 optimization flag for Linux builds
`-Os` produces sometimes bigger binaries on Linux.
Also, llvm built with `-Os` is really slow at runtime for Linux.

Using `-02` aligns us with what Debian does, and as we are compiling most of our stuff with gcc (and not clang), it makes sense to use `-02` on Linux.
`-Os` does probably slightly different things when used on mac with llvm, compared to when it is used with gcc on Linux.
2018-08-29 13:40:39 +02:00
Markus Reiter
f6e7a3ed9d Fix style. 2018-08-29 01:44:47 +02:00
Markus Reiter
444e3d2a78 Add $LOAD_PATH for RuboCop cops. 2018-08-29 01:44:47 +02:00
Gautham Goli
32bc5535b6
style: Fix npe and add test for corrected offense results 2018-08-28 23:31:35 +05:30
Gautham Goli
b707d2a232
Merge pull request #4765 from GauthamGoli/style-results-npe-fix-2
audit: Use `fetch` with default value prevent NPE
2018-08-28 13:42:13 +05:30
Gautham Goli
5d2ca08a93
audit: Use fetch with default value prevent NPE 2018-08-28 13:16:44 +05:30
Markus Reiter
9f06b3df23 Don’t use CLI::Cleanup in Auditor. 2018-08-27 23:31:29 +02:00
Gautham Goli
23846d6ca8
audit: Add null check on style results 2018-08-27 19:50:11 +05:30
Mike McQuaid
ca6c75d229
Check version conflicts using linkage.
Instead of refusing to install software preemptively by assuming
multiple linkage to differing versions of the same library we now make
`brew linkage --test` verify that we don't have two versions of the
same library linked at the same time.

This will be considerably more permissive whilst checking the actual
problem that we're worried about.
2018-08-27 10:12:02 +01:00
Gautham Goli
3705956f53
Merge pull request #4753 from GauthamGoli/autocorrect-count
audit: Show RuboCop offense correction status and count in output
2018-08-26 23:55:17 +05:30
Gautham Goli
b82dbdcfa8
audit: Show RuboCop offense correction status in output when --fix is passed 2018-08-26 19:33:19 +05:30
Mike McQuaid
9bc17c8a82
Merge pull request #4563 from alebcay/extract
Add new extract dev command to retrieve old versions of formulae
2018-08-26 12:59:50 +01:00
Caleb Xu
b1120dd404 extract: check if DependencyCollector::Compat is defined before monkey-patch 2018-08-26 02:22:09 -04:00
Caleb Xu
ad0f9d603f extract: localize DependencyCollector monkey-patches too 2018-08-25 19:52:22 -04:00
Caleb Xu
bd352bcf35 extract: use localized monkey-patching
Instead of just blanketing over with monkey-patches like before,
set up monkey-patches as needed, and make sure to clean up after
we're done.
2018-08-25 14:52:30 -04:00
Caleb Xu
a8563afc9e extract: add progress message when searching Git history
For the impatient ones out there.
2018-08-25 13:40:57 -04:00
Caleb Xu
ff2ce2f093 extract: better success message
Fixes the empty rev string when copying file from HEAD; explicitly
set rev to HEAD in that case.
2018-08-25 13:35:08 -04:00
Caleb Xu
d4a2006f04 extract: add missing monkey-patch 2018-08-25 13:33:25 -04:00
Caleb Xu
be0cd21d0f extract: explicitly load cli_parser 2018-08-25 10:58:13 -04:00
Caleb Xu
0e080eba97 extract: simplify integration tests 2018-08-25 10:51:31 -04:00
Caleb Xu
1e4cd780c3 extract: fix style 2018-08-25 10:49:06 -04:00
Caleb Xu
9ab3ff4a41 extract: add spec/integration test 2018-08-24 11:42:11 -04:00
Caleb Xu
a232e3a791 extract: fix corner case
If the formula to be retrieved was just version-bumped in the most
recent commit (HEAD), we would've ended up grabbing the second-most
recent version.

Instead, if the file already exists in tree at the current commit,
just construct the formula from that to get the version (for naming
purposes) and copy the file outright to its new location.
2018-08-24 11:38:14 -04:00
Mike McQuaid
cc63c12247
Merge pull request #4570 from maxim-belkin/fix-linux-make-shim
Fix for Linux make shim
2018-08-24 14:24:32 +01:00
Mike McQuaid
9a84dbae71
shims/linux/make: match Linuxbrew shim. 2018-08-24 08:57:57 +01:00
Maxim Belkin
ae32922d0f
swap which and command -v 2018-08-23 20:48:12 +00:00
William Woodruff
6f7c9ae4f3
Merge pull request #4748 from woodruffw/export-homebrew-git
brew.sh: Export HOMEBREW_GIT
2018-08-23 14:37:21 -04:00
William Woodruff
d30557ace6
brew.sh: Export HOMEBREW_GIT
Should have been exported like HOMEBREW_CURL.
2018-08-23 11:50:42 -04:00
Mike McQuaid
35eb03de9f
Merge pull request #4742 from commitay/remove-undefined-bottle
audit: remove "`bottle` is not defined"
2018-08-23 16:36:05 +01:00
Maxim Belkin
4f166ce021
formula_cellar_checks: .dylib and .framework are macOS-specific 2018-08-22 21:25:00 -05:00
commitay
e0c3ea7474 audit: remove "bottle is not defined" 2018-08-23 11:06:35 +10:00