Jack Nagel 63e1c71c50 Eagerly initialize formula specs
Declarations of dependencies, options, and resources in the DSL only
apply to specs that have already been initialized. For example, given
this snippet:

  url ...
  sha1 ...

  depends_on 'foo'

  devel do
    url ...
    sha1 ...
  end

The dependency 'foo' will be recorded for the stable spec, but not the
devel spec, since it was not initialized prior to the call to
depends_on.

While it is considered best practice to declare all specs (stable,
devel, head, and bottle) prior to other declarations, there is nothing
that enforces this ordering, so when it happens it can be confusing and
hard to debug.

To prevent this, we can initialize all specs up front. This comes with
a performance penalty for commands that load all formulae into memory,
but that is probably outweighed by what we gain in correctness.

Fixes Homebrew/homebrew#23425.
2013-10-22 13:31:08 -05:00
..
2013-05-20 22:34:53 -05:00
2013-10-21 18:07:06 -07:00
2013-10-14 21:46:52 -05:00
2013-07-01 01:06:44 -05:00
2013-08-15 22:46:56 -07:00
2013-08-19 17:21:13 -05:00
2013-06-26 09:45:32 -07:00
2013-10-18 12:56:51 -05:00