Skip to content

Commit

Permalink
linkage_checker: skip broken linkage in Julia
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Sep 3, 2024
1 parent fafa618 commit 052de4e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Library/Homebrew/linkage_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ def dylib_to_dep(dylib)
Regexp.last_match(2)
end

sig { params(file: String).returns(T::Boolean) }
def allowed_broken_dylibs?(file)
return false if formula.name != "julia"

file.start_with?("#{formula.prefix.realpath}/share/julia/compiled/")

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

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/linkage_checker.rb#L99

Added line #L99 was not covered by tests
end

def check_dylibs(rebuild_cache:)
keg_files_dylibs = nil

Expand Down Expand Up @@ -156,7 +163,7 @@ def check_dylibs(rebuild_cache:)
# If we cannot associate the dylib with a dependency, then it may be a system library.
# If dlopen finds the dylib, then the linkage is not broken.
@system_dylibs << dylib
elsif !system_framework?(dylib)
elsif !system_framework?(dylib) && !allowed_broken_dylibs?(file.to_s)
@broken_dylibs << dylib
end
else
Expand Down

0 comments on commit 052de4e

Please sign in to comment.