Skip to content

Commit

Permalink
linkage_checker: test indirect dependencies.
Browse files Browse the repository at this point in the history
Check for indirect dependencies with linkage with linkage in strict
test mode.

This should be done to ensure we accurately declare dependencies in
homebrew/core.
  • Loading branch information
MikeMcQuaid committed May 14, 2024
1 parent 0b7d679 commit 1c65495
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/linkage_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def display_test_output(puts_output: true, strict: false)
display_items("Conflicting libraries", @version_conflict_deps, puts_output:)
return unless strict

display_items("Indirect dependencies with linkage", @indirect_deps, puts_output:)

Check warning on line 70 in Library/Homebrew/linkage_checker.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/linkage_checker.rb#L70

Added line #L70 was not covered by tests
display_items("Undeclared dependencies with linkage", @undeclared_deps, puts_output:)
display_items("Files with missing rpath", @files_missing_rpaths, puts_output:)
display_items "@executable_path references in libraries", @executable_path_dylibs, puts_output:
Expand All @@ -79,7 +80,7 @@ def broken_library_linkage?(test: false, strict: false)
issues = [@broken_deps, @broken_dylibs]
if test
issues += [@unwanted_system_dylibs, @version_conflict_deps]
issues += [@undeclared_deps, @files_missing_rpaths, @executable_path_dylibs] if strict
issues += [@indirect_deps, @undeclared_deps, @files_missing_rpaths, @executable_path_dylibs] if strict
end
issues.any?(&:present?)
end
Expand Down

0 comments on commit 1c65495

Please sign in to comment.