-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linkage_checker: report linkage with system frameworks #13570
linkage_checker: report linkage with system frameworks #13570
Conversation
Currently, `brew linkage` reports linkage with system frameworks only if they can be found on the file system. This results in this linkage not being reported on Big Sur and newer, where system libraries are stored in the dyld cache instead. Let's fix that by avoiding silently ignoring system frameworks by moving them out of `#harmless_broken_link?`. We retain the behaviour desired from 7228e60 by deferring checking if a broken library is actually a system framework to just before we add it to `@broken_dylibs`. To see how this changes the behaviour of `brew linkage`, here's an example with this change: ❯ brew linkage neovim System libraries: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices /usr/lib/libSystem.B.dylib /usr/lib/libiconv.2.dylib /usr/lib/libutil.dylib Homebrew libraries: /usr/local/opt/gettext/lib/libintl.8.dylib (gettext) /usr/local/opt/libtermkey/lib/libtermkey.1.dylib (libtermkey) /usr/local/opt/libuv/lib/libuv.1.dylib (libuv) /usr/local/opt/luajit/lib/libluajit-5.1.2.dylib (luajit) /usr/local/opt/luv/lib/libluv.1.dylib (luv) /usr/local/opt/msgpack/lib/libmsgpackc.2.dylib (msgpack) /usr/local/opt/tree-sitter/lib/libtree-sitter.0.dylib (tree-sitter) /usr/local/opt/unibilium/lib/libunibilium.4.dylib (unibilium) and without this change: ❯ brew linkage neovim System libraries: /usr/lib/libSystem.B.dylib /usr/lib/libiconv.2.dylib /usr/lib/libutil.dylib Homebrew libraries: /usr/local/opt/gettext/lib/libintl.8.dylib (gettext) /usr/local/opt/libtermkey/lib/libtermkey.1.dylib (libtermkey) /usr/local/opt/libuv/lib/libuv.1.dylib (libuv) /usr/local/opt/luajit/lib/libluajit-5.1.2.dylib (luajit) /usr/local/opt/luv/lib/libluv.1.dylib (luv) /usr/local/opt/msgpack/lib/libmsgpackc.2.dylib (msgpack) /usr/local/opt/tree-sitter/lib/libtree-sitter.0.dylib (tree-sitter) /usr/local/opt/unibilium/lib/libunibilium.4.dylib (unibilium)
Review period will end on 2022-07-19 at 04:05:57 UTC. |
I'm not sure I understand the scenario presented in the original issue. It seems like the desire was to ship binaries built on older macOS versions linked with frameworks that only exist on newer macOS versions. Why? |
This is not clear to me either. Maybe @fxcoudert remembers? |
Nope, do not remember, sorry. |
Review period ended. |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Currently,
brew linkage
reports linkage with system frameworks only ifthey can be found on the file system. This results in this linkage not
being reported on Big Sur and newer, where system libraries are stored
in the dyld cache instead.
Let's fix that by avoiding silently ignoring system frameworks by moving
them out of
#harmless_broken_link?
. We retain the behaviour desiredfrom 7228e60 by deferring checking if a
broken library is actually a system framework to just before we add it
to
@broken_dylibs
.To see how this changes the behaviour of
brew linkage
, here's anexample with this change:
and without this change: