Deprecate ancient formula syntax #13444
Comments
Sounds reasonable. Could you paste some code samples of before/after? |
Sounds reasonable to me. Third-party formulae didn't really pick up until significantly later than that. I wouldn't expect removing compatibility to break compatibility with anything in active use except with |
With |
@MikeMcQuaid True, but the command we provide users checks out only the formula to that version. Dependency tracking would get a little wonky if we checked out the whole repo for them. |
What would be deprecated is this syntax: class Git < Formula
@url='http://kernel.org/pub/software/scm/git/git-1.6.4.2.tar.bz2'
@md5='05c41dc84eae47e3d4fe5b3dee9cc73c'
@homepage='http://git-scm.com'
... and also this syntax class Git < Formula
def initialize
@url = ...
@homepage = ...
@md5 = ...
end (This second form is even more ancient, but is still in use in the test suite). doing so would allow us to get rid of Formula#ensure_specs_set, which only exists to serve these really old formulae. |
Yeh, seem depreciable. Not seen in the wild for aaaages. |
Fine IMO. Benefits are good. |
Just Pull It |
Closes Homebrew#13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Closes Homebrew#13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Closes Homebrew#13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Modern formulae do not actually carry a URL, checksum, etc., but delegate to SoftwareSpec objects depending on what mode we are in (stable, bottle, devel, HEAD). The current iteration of
Formula
contains some hacks that I added during the specs refactor to maintain compatibility with formulae that manipulate class ivars directly. It also provides compatibility with some classes in the test suite that set the actual object ivars in the constructor.This compatibility code is ugly and a burden, and the syntax it supports hasn't been in active use for a very long time. I suggest we update the test classes to use the DSL and deprecate the old syntax, which will significantly simplify the creation of formula objects.
The text was updated successfully, but these errors were encountered: