Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Deprecate ancient formula syntax #13444

Closed
jacknagel opened this issue Jul 17, 2012 · 9 comments
Closed

Deprecate ancient formula syntax #13444

jacknagel opened this issue Jul 17, 2012 · 9 comments
Labels

Comments

@jacknagel
Copy link
Contributor

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.

@MikeMcQuaid
Copy link
Member

Sounds reasonable. Could you paste some code samples of before/after?

@mistydemeo
Copy link
Member

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 brew versions, which is already a bit touchy when going that far back.

@MikeMcQuaid
Copy link
Member

With brew versions I already end up checking out the entire repository to that version anyway.

@mistydemeo
Copy link
Member

@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.

@jacknagel
Copy link
Contributor Author

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.

@MikeMcQuaid
Copy link
Member

Yeh, seem depreciable. Not seen in the wild for aaaages.

@mxcl
Copy link
Contributor

mxcl commented Aug 6, 2012

Fine IMO. Benefits are good.

@jacknagel
Copy link
Contributor Author

@adamv
Copy link
Contributor

adamv commented Aug 10, 2012

Just Pull It

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Aug 13, 2012
Closes Homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
fgeller pushed a commit to fgeller/homebrew that referenced this issue Aug 22, 2012
Closes Homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
Closes Homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants