Skip to content

Conversation

zmwangx
Copy link
Contributor

@zmwangx zmwangx commented Mar 8, 2017

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

Use Formula#runtime_dependencies to collect dependencies.

This inevitably pulls in all recursive deps, which might be controversial (I think this was discussed during the :linked dependency days, and no conclusion was reached; the discussion died off after :linked was dropped, but dependency resolution has improved since then, so it's worth taking another look), but IMO is a good idea.

Concrete example: in the case of ffmpeg, depending on either theora or libvorbis (both of which has a hard dependency on libogg) would introduce a libogg linkage, which is currently listed under "possible undeclared dependencies".

@MikeMcQuaid
Copy link
Member

Code looks sound to me but wondering if @ilovezfs @alyssais have thoughts on the results.

@ilovezfs
Copy link
Contributor

This will mean we have no easy way of telling which linkages are or are not explicitly included in the formula.

@zmwangx
Copy link
Contributor Author

zmwangx commented Mar 12, 2017

This will mean we have no easy way of telling which linkages are or are not explicitly included in the formula.

Yes. But keep in mind that recursive dependencies are explicitly exposed in LDFLAGS. Complaining about it later feels inconsistent.

@ilovezfs
Copy link
Contributor

Printing them as possibly undeclared doesn't necessarily amount to complaining.

Ideally I think we should print out the indirect, undeclared ones in one list and the flat-out opportunistic ones in another list rather than lumping them together in a generic undeclared pile. But just not printing the former makes it harder to answer the question: what's this linked to that's not noted explicitly with a depends_on?

@zmwangx
Copy link
Contributor Author

zmwangx commented Mar 12, 2017

what's this linked to that's not noted explicitly with a depends_on?

Aw, smells like :linked...

@ilovezfs
Copy link
Contributor

Yes, by definition. One hopes => :linked was never intended for the opportunistic ones.

@MikeMcQuaid
Copy link
Member

Not sure on the state of this. @ilovezfs? Feel free to point out what would need done from your perspective and/or close if we're at the end of this road.

@MikeMcQuaid
Copy link
Member

Ideally I think we should print out the indirect, undeclared ones in one list and the flat-out opportunistic ones in another list rather than lumping them together in a generic undeclared pile.

This seems like the best idea. It won't result in code simplification but printing out two different lists here feels like the right thing for now.

@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 5, 2017

This seems like the best idea. It won't result in code simplification but printing out two different lists here feels like the right thing for now.

Agreed. @zmwangx are you willing to implement it as two lists?

@zmwangx
Copy link
Contributor Author

zmwangx commented Apr 5, 2017

are you willing to implement it as two lists?

I may take a look this weekend, but I'm kind of short on time recently and is juggling free time between several things, so feel free.

@stale stale bot added the stale No recent activity label May 6, 2017
@stale
Copy link

stale bot commented May 6, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@zmwangx
Copy link
Contributor Author

zmwangx commented May 6, 2017

Sorry guys, I forgot about this. I'll close this since the improvement would be very minor anyway.

@zmwangx zmwangx closed this May 6, 2017
@zmwangx zmwangx deleted the undeclared-deps branch May 6, 2017 17:22
@stale stale bot removed the stale No recent activity label May 6, 2017
@lock lock bot added the outdated PR was locked due to age label Jan 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants