220 Commits

Author SHA1 Message Date
Mike McQuaid
c5dbd3ca24
Rearrange requires
This improves the load time of most brew commands. For an example of
one of the simplest commands this speeds up:

Without Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     525.0 ms ±  35.8 ms    [User: 229.9 ms, System: 113.1 ms]
  Range (min … max):   465.3 ms … 576.6 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     383.3 ms ±  25.1 ms    [User: 133.0 ms, System: 72.1 ms]
  Range (min … max):   353.0 ms … 443.6 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.37 ± 0.13 times faster than git checkout master; brew help
```

With Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     386.0 ms ±  30.9 ms    [User: 130.2 ms, System: 93.8 ms]
  Range (min … max):   359.5 ms … 469.3 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     330.2 ms ±  32.4 ms    [User: 93.4 ms, System: 73.0 ms]
  Range (min … max):   302.9 ms … 413.9 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.17 ± 0.15 times faster than git checkout master; brew help
```
2024-07-14 08:49:39 -04:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Douglas Eichelberger
0fd082a1ff Port Homebrew::Cmd::InstallCmd 2024-03-30 09:36:47 -07:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Bo Anderson
fb5243288b build: fix bad modify_build_environment call 2024-01-02 18:32:28 +00:00
Bo Anderson
a92a36d027
Lazy load Debrew
Fixes terminfo error on some environments
2023-12-06 00:01:25 +00:00
Bo Anderson
2d1e9eedbf
build: don't add implicit dependencies to build environment 2023-07-04 13:40:59 +01:00
Douglas Eichelberger
04fa6e24d7 Enable more typing 2023-03-13 09:08:56 -07:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Bo Anderson
987abe7773
Prevent require executing some scripts 2022-09-08 01:44:31 +01:00
Lukas Oberhuber
88a69b3de2 Restore previous style 2022-08-02 09:06:28 -07:00
Lukas Oberhuber
cd9fe97c55 Improve style 2022-07-30 11:10:26 +01:00
Lukas Oberhuber
215e545660 brew style 2022-07-26 19:28:30 +01:00
Lukas Oberhuber
c2a95f077f Compiler -g flag set based on --debug-symbols 2022-07-26 17:18:01 +01:00
Lukas Oberhuber
d195f22522 Connecting up --debug-symbols flag
This connects the calling of dsymutil and the retention of temporary
files. Still need to connect compilation to flag.
2022-07-26 12:15:53 +01:00
Carlo Cabrera
b1a543b2ad
Use with_env 2021-10-22 20:07:24 +08:00
Carlo Cabrera
a89f873e8f
build: set TZ=UTC0
This prevents `make` from trying to regenerate `info` files which may
have odd timestamps when this isn't set. See
Homebrew/homebrew-core#87470.

This actually also addresses a build failure we've seen in CI (see
Homebrew/homebrew-core#87641).
2021-10-22 19:27:36 +08:00
fn ⌃ ⌥
aabf3f64ae
build: delete post_superenv_hacks 2021-09-30 12:54:31 -07:00
Bo Anderson
f174d4363f
extend/pathname: limit write override to a refinement 2021-05-04 14:20:20 +01:00
Bo Anderson
1a81257721
build: set SOURCE_DATE_EPOCH 2021-04-14 17:43:26 +01:00
Mike McQuaid
04abc51d1f
Cleanup use of CxxStdlib
- remove usage on macOS as we don't care about it there
- don't error out on incompatibility but still store stdlib on Linux
- remove (now) unused methods
2021-04-02 13:55:29 +01:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Bo Anderson
6cd1e5e384
Avoid passing around a massive $LOAD_PATH.
Portable Ruby crashes if the $LOAD_PATH gets too big.
2021-02-26 18:23:48 +00:00
Bo Anderson
f079373d8c
utils/fork: handle termsig in safe_fork 2021-02-25 13:42:44 +00:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Seeker
b9854bd4cf rubocops: add unless_multiple_conditions 2021-01-08 10:33:54 -08:00
Mike McQuaid
87dd13aea6
Deprecate cask requirements.
This probably has to wait until 2.7.0 now and will require a bunch of
formula changes/deprecations but we should probably start moving in this
direction given we're not installing any of these on our CI any more.
2020-12-15 14:19:45 +00:00
Markus Reiter
6750448d95 Fix some auto-correctable type errors. 2020-11-29 21:23:54 +01:00
Markus Reiter
1b732ec7b2 Fix RuboCop offenses. 2020-11-16 02:05:29 +01:00
Rylan Polster
50890ebd51 fix Lint/DuplicateBranch style 2020-11-16 02:02:52 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
9db7825606 Document Build. 2020-08-26 03:13:58 +02:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter
bace9ecc34 Pass verbose? to Formula#verify_download_integrity. 2020-08-06 16:13:14 +02:00
Markus Reiter
6c964d4a78 Pass verbose? to Keg#link, Keg#unlink and Keg#optlink. 2020-08-06 16:12:52 +02:00
Markus Reiter
5caafe413e Pass debug? to Formula#brew and Formula#run_test. 2020-08-06 16:12:52 +02:00
Bo Anderson
7f46d4ec3c build, test: set Homebrew.args 2020-08-01 18:27:15 +01:00
Bo Anderson
20c6a3f325 build, test: fix debrew not working 2020-08-01 18:26:56 +01:00
Markus Reiter
05365b5542 Pass args more explicitly in FormulaInstaller. 2020-07-30 03:21:12 +02:00
Markus Reiter
276c570c16 Pass individual args explicitly to ENV extensions. 2020-07-28 02:52:45 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
Markus Reiter
6b0b25cd00 Pass keep_tmp? and interactive? instead of using global args. 2020-07-25 02:37:10 +02:00
Markus Reiter
9176c62246 Pass args to build instead of using global args. 2020-07-25 02:37:10 +02:00
Jonathan Chang
76709d82c5 Fix brew style. 2020-07-13 23:24:14 +10:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
8b98ed1f47
Further tweak :test dependency handling
- ensure that cases where `:build` and `:test` both apply to a
  dependency that we handle it appropriately
- fix reintroduced regression
  (https://github.com/Homebrew/brew/pull/6471#issuecomment-533414923).
  Fixes #6470.
2020-05-19 14:25:10 +01:00