aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirement.rb
AgeCommit message (Collapse)Author
2016-01-13Fix typo [ci skip]Satoshi Ohmori
Closes Homebrew/homebrew#48008. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-03utils: add which_allXu Cheng
Similar to which, except it returns all of paths where binary is found. i.e. it's equivalent to `which -a`.
2015-12-15Allow multiple option_names in dep/reqs.Mike McQuaid
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-09-01remove Requirement#pour_bottle?Xu Cheng
It's never used since a0a93f1b3b7b2be9b8a319be91086ffe220f8e32. Closes Homebrew/homebrew#43462. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-20Requirement: support tap formula as default_formulaXu Cheng
Closes Homebrew/homebrew#43107. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-07requirement: allow access default_formula directlyXu Cheng
2014-12-28requirement: add cask and download attributes.Mike McQuaid
Print out the message pointing to the Cask and/or download location too.a
2014-12-06Remove {start,stop}doc as we're using Yard now.Mike McQuaid
2014-11-12Fix Requirement equalityJack Nagel
2014-11-12Don't allocate arrays in Requirement#hashJack Nagel
2014-10-09Use alias_method instead of an extra ivarJack Nagel
2014-09-24Generate RDoc documentation.Mike McQuaid
This is currently still very messy and we probably want to work out the best way to declare what parts of our DSL/what files are "public". Still, even if this is a WIP I'd rather get something committed sooner rather than later and start iterating on this as a replacement for `example_formula.rb` and the formula cookbook. To test: ```bash cd $(brew --prefix)/Library/Homebrew && \ rdoc formula.rb requirement.rb utils.rb &&\ open doc/index.html ``` Closes Homebrew/homebrew#32470.
2014-08-14Remove two more unnecessary default argumentsJack Nagel
2014-07-07Eliminate some indirection in evaluating requirement env blocksJack Nagel
2014-07-07Don't set @env on instancesJack Nagel
2014-07-07Keep DSL related code in one placeJack Nagel
2014-07-03Replace ComparableSet with a Requirements collectionJack Nagel
2014-07-02Move require into method to avoid circular requireJack Nagel
There is a nasty circular dependency here: formula.rb requirement.rb extend/ENV.rb extend/ENV/shared.rb formula.rb Probably the information that the build environment needs from formula should be passed in at runtime, but that seems hard and I really just want to be able to run the tests with warnings turned on. :/
2014-07-01Always use class.name to build inspect stringsJack Nagel
2014-06-12Prefer self.class.name to self.class.to_sJack Nagel
2014-05-30Deprecate implicit build-time requirementsJack Nagel
2014-04-03requirement: add pour_bottle? method.Mike McQuaid
Allows disabling bottles from requirements.
2014-03-05Remove special X11 proxy depsJack Nagel
2014-02-27Eliminate mutation of Dependency objectsJack Nagel
2013-12-09Ensure option names are consistent for default formula requirementsJack Nagel
2013-08-19Use ENV.append_pathJack Nagel
2013-08-19No longer call ENV.userpaths! in requirementsJack Nagel
Instead we use which with a custom PATH.
2013-08-19Move common stuff to extend/ENV.rbJack Nagel
2013-06-27Fix some #eql? correctness issuesJack Nagel
The implementation of #eql? and #hash should ensure that if a.eql?(b), then a.hash == b.hash, but #eql? itself should not *depend* on #hash. For example, given class Thingy def eql? instance_of?(other.class) && hash == other.hash end def hash [name, *tags].hash end end if #hash produces a collision for different values of [name, *tags], two Thingy objects will appear to be eql?, even though this is not the case. Instead, #eql? should depend on the equality of name and tags directly.
2013-06-25Yield correct dependent when expanding requirementsJack Nagel
2013-06-24Requirement: callers are responsible for invoking #satisfied?Jack Nagel
This hack was necessary since requirements were not checked again in the forked build process, but now they are, and calling it again after the build environment has been set up can produce incorrect results. In fact, if it happens to return false the second time, the env modification will be skipped altogether.
2013-06-07Add Requirement#inspectJack Nagel
2013-06-04Extract attr_rw from Formula for reuseJack Nagel
Closes Homebrew/homebrew#20239.
2013-06-03Allow explicit conversion of requirements to depsJack Nagel
Fixes Homebrew/homebrew#19857.
2013-06-03Refactor Requirement.expandJack Nagel
2013-06-02Requirement: fix typoJack Nagel
2013-05-10Allow requirements to specify a default formula.Mike McQuaid
This allows default resolution of requirements without user intervention. Closes Homebrew/homebrew#19627.
2013-05-06Reduce allocations in dependency constructionJack Nagel
By always passing around a single, unnested array rather than splatting and then defensively flattening and compacting things, we can avoid allocating a bunch of unnecessary arrays. This gives a performance boost of roughly 4% when enumerating 2500 formulae, and has the side effect of cleaning up the dependency API.
2013-04-01Requirement: env DSL is evaluated in context of self, not ENVJack Nagel
This was meant to support: env do |req| append_path 'PATH', req.some_method ... end i.e., the block was evaluated in the context of ENV. But it turned out to be not so useful after all, so I'm ripping it out before something actually depends on it.
2013-02-12Simplify this regexpJack Nagel
2013-02-12Establish a convention for Requirement namesJack Nagel
The name attribute of requirements is used when generating options for the :optional and :recommended dependency tags. Unless otherwise specified, the name attribute of a Requirement will be populated by stripping any module prefixes from the beginning and "Dependency" or "Requirement" from end of the class name and downcasing the result. Closes Homebrew/homebrew#17759.
2013-02-07Fix typoJack Nagel
2013-01-31Proper recursive expansion of requirements with filteringJack Nagel
Expand requirements recursively while applying the same optional? and recommended? filters that dependencies are run through. Options generated by requirements are now checked against the correct list of requirements, eliminating the temporary "best guess" logic in the installer.
2013-01-31Create proxy classes for "partial" X11 dependenciesJack Nagel
When a formula's dependency tree contains more than one X11 dependency, they are de-duplicated by comparing the min_version attribute. However, this can result in broken dependency trees if one of the X11Dependency objects was actually specified as e.g. `:libpng`. In practice, this only matters when one or more of the dependencies has additional metadata that makes it distinct from the rest, i.e. an :optional or :recommended tag. To combat this, make these special, "partial" X11 dependencies instances of different classes so that they are not de-duped. It will still be necessary, at the time when requirements are expanded by the installer, to de-duplicate any remaining X11 dependencies after applying the optional/recommended filters in order to avoid duplicated modifications to the environment (as ENV.x11 is not idempotent). c.f. Homebrew/homebrew#17369.
2013-01-28Allow specifying a name attribute for X11DependencyJack Nagel
2013-01-26Split dependency classes into separate filesJack Nagel