64 Commits

Author SHA1 Message Date
Douglas Eichelberger
a5aef97851 brew style --fix 2023-03-02 11:49:09 -08:00
Mike McQuaid
74fb058c7e
More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
EricFromCanada
4f7719ac2e apidoc: update examples' syntax 2020-11-05 23:50:55 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
Markus Reiter
8129542277 Document BuildOptions. 2020-08-26 03:13:58 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
24eb8e8e54
Remove (now) unused invalid_option_names.
This is handled by `OptionParser` now instead in `cmd/install`.
2019-01-29 08:31:45 +00:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Mike McQuaid
b66aafc218 runtime_dependencies: include recommended deps.
These previously weren't being generated correctly for dependencies of
formulae that weren't installed.
2018-06-01 14:01:34 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid
f98304026b Deprecate 32-bit options.
These were formerly supported but as it has been a very long time since
32-bit software was necessary on macOS these have been deprecated with
a `brew audit` warning and a future `odeprecated`.
2016-12-20 10:22:30 +00:00
Mike McQuaid
cc3bf7bcb5 Don't warn about unused brew install arguments.
This is a step closer to better argument handling but for now just
fixes the issue in #1217 where it starts complaining about options like
`--build-from-source` being used.
2016-11-14 09:28:28 +00:00
Bruce Steedman
098974b2a1 @MikeMcQuaid requested changes 2016-11-12 12:03:04 +00:00
Bruce Steedman
62e14ea673 invalid build options - fixed conflicts; rename 2016-10-03 09:42:53 +01:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Alyssa Ross
cd1f761668 docs: add missing </pre> 2016-09-01 16:39:21 +01:00
Xu Cheng
2b9a2833bc
add BuildOptions#build_bottle?
This makes BuildOptions more compatible with Tab object. Otherwise,
`brew reinstall foo` will just crash if foo is not installed.
2016-07-21 14:38:59 +08:00
Mike McQuaid
e5ba31fcdc Allow multiple option_names in dep/reqs.
This means that dependencies can be merged but still maintain all
their option names.

Closes Homebrew/homebrew#46916.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-15 08:37:16 +00:00
Mike McQuaid
2c959a7d58 More API documentation.
And remove the documented stuff from the `example-formula.rb`.

Closes Homebrew/homebrew#43241.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-29 15:43:16 +01:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Jack Nagel
285f8f77e6 Tab#with? accepts the same types as BuildOptions#with? 2014-10-09 00:20:15 -05:00
Jack Nagel
e6498f4dfc Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
2014-08-16 01:39:33 -05:00
Jack Nagel
a980938773 Options is no longer used directly by BuildOptions 2014-08-13 11:09:57 -05:00
Jack Nagel
886c20ddba Set methods on Options already return Options instances 2014-08-13 11:09:57 -05:00
Jack Nagel
c5a888fb3a Always pass an Options instance to the BuildOptions constructor 2014-08-13 11:09:57 -05:00
Mike McQuaid
9f14262d92 Revert "Always pass an Options instance to the BuildOptions constructor"
This reverts commit e143bcef259ca76b2124e6e73bd9bdf872418723.

Closes Homebrew/homebrew#31557.
Closes Homebrew/homebrew#31559.
Closes Homebrew/homebrew#31561.
Closes Homebrew/homebrew#31562.
2014-08-13 08:46:17 +01:00
Mike McQuaid
d4aa7b8df0 Revert "Set methods on Options already return Options instances"
This reverts commit 4d1464c246861f7aedc355cb5f6360370d05114e.
2014-08-13 08:45:08 +01:00
Mike McQuaid
1e852a8f3f Revert "Options is no longer used directly by BuildOptions"
This reverts commit 1c05bc0238aa1abf7d5542b8afa11ead2bee66a8.
2014-08-13 08:45:07 +01:00
Jack Nagel
28bd10551f Options is no longer used directly by BuildOptions 2014-08-12 20:23:02 -05:00
Jack Nagel
1c49729222 Set methods on Options already return Options instances 2014-08-12 20:19:56 -05:00
Jack Nagel
ecaf1592a0 Always pass an Options instance to the BuildOptions constructor 2014-08-12 20:09:35 -05:00
Jack Nagel
15162911e3 Deep copies of the build object are no longer needed 2014-08-11 17:48:30 -05:00
Jack Nagel
b7b8b88cea Replace the build object rather than mutate it 2014-08-11 17:48:30 -05:00
Jack Nagel
161778f0f4 Stop exposing defined options from the build object 2014-08-10 22:55:28 -05:00
Jack Nagel
2f1d40a764 Disconnect defined options from the build object 2014-08-10 21:45:24 -05:00
Jack Nagel
f0b75b2869 Stop duping options when duping the build object
The options collection cannot be mutated from the build object, so it
can be shared among copies safely.
2014-08-09 10:30:43 -05:00
Jack Nagel
efd63447d8 Move management of options collection to the spec object 2014-08-07 10:45:32 -05:00
Jack Nagel
6718bc554f Spell out the empty string instead of calling to_s on nil 2014-08-07 00:48:13 -05:00
Jack Nagel
22d1f6516f Remove a defensive to_s call
This method is only used internally and we always pass strings.
2014-08-07 00:48:13 -05:00
Jack Nagel
dc9872eb83 Remove default argument
This method is called in two places, always with two arguments.
2014-08-07 00:48:13 -05:00
Jack Nagel
f4ae1c9e1b Hide the options data structure better 2014-07-31 19:59:09 -05:00
Jack Nagel
abdff27cd7 Make options available on the spec objects 2014-07-31 19:37:39 -05:00
Jack Nagel
fad2e26395 Reduce direct accesses of the args collection 2014-07-31 16:36:54 -05:00
Jack Nagel
fd86e6d636 Remove confusing implicit options handling
This code is supposed to allow

  depends_on "foo" => "with-bar"

to work when foo has only a "without-bar" option.

The options system was not designed to support this. Unfortunately, it
was bolted on anyway. The implementation is extremely difficult to
understand, and it only works for certain types of options, which is
confusing from a user's point of view. Luckily, no formulae in core or
the official taps rely on the behavior in order to function.

It is hindering progress in improving this code, so I am removing it.
2014-07-30 21:46:22 -05:00
Jack Nagel
dd331245ab Remove unused accessor 2014-07-30 20:19:43 -05:00
Jack Nagel
938110961d Use Dependency#option_name in BuildOptions#add_dep_option 2014-02-28 11:16:55 -06:00
Jack Nagel
08055e1776 Ensure option names are consistent for default formula requirements 2013-12-09 14:36:10 -06:00
Jack Nagel
55e9908799 Fix typo 2013-12-05 22:17:56 -06:00